@@ -5,12 +5,16 @@ import {
55 Comment ,
66 type CommentDisplayPart ,
77 type ContainerReflection ,
8+ type DeclarationReflection ,
89 DocumentReflection ,
10+ type ParameterReflection ,
911 ProjectReflection ,
1012 type Reflection ,
1113 ReflectionKind ,
1214 type ReflectionSymbolId ,
15+ type SignatureReflection ,
1316 type SomeType ,
17+ type TypeParameterReflection ,
1418} from "../models/index" ;
1519import { Context } from "./context" ;
1620import { ConverterComponent } from "./components" ;
@@ -49,6 +53,31 @@ import {
4953import { basename , dirname , resolve } from "path" ;
5054import type { FileRegistry } from "../models/FileRegistry" ;
5155
56+ export interface ConverterEvents {
57+ begin : [ Context ] ;
58+ end : [ Context ] ;
59+ createDeclaration : [ Context , DeclarationReflection ] ;
60+ createSignature : [
61+ Context ,
62+ SignatureReflection ,
63+ (
64+ | ts . SignatureDeclaration
65+ | ts . IndexSignatureDeclaration
66+ | ts . JSDocSignature
67+ ) ?,
68+ ts . Signature ?,
69+ ] ;
70+ createParameter : [ Context , ParameterReflection , ts . Node ?] ;
71+ createTypeParameter : [
72+ Context ,
73+ TypeParameterReflection ,
74+ ts . TypeParameterDeclaration ?,
75+ ] ;
76+ resolveBegin : [ Context ] ;
77+ resolveReflection : [ Context , Reflection ] ;
78+ resolveEnd : [ Context ] ;
79+ }
80+
5281/**
5382 * Compiles source files using TypeScript and converts compiler symbols to reflections.
5483 */
@@ -59,7 +88,8 @@ import type { FileRegistry } from "../models/FileRegistry";
5988} )
6089export class Converter extends ChildableComponent <
6190 Application ,
62- ConverterComponent
91+ ConverterComponent ,
92+ ConverterEvents
6393> {
6494 /** @internal */
6595 @Option ( "externalPattern" )
@@ -440,10 +470,6 @@ export class Converter extends ChildableComponent<
440470 ? context . getComment ( symbol , context . project . kind )
441471 : context . getFileComment ( node ) ;
442472 this . processDocumentTags ( context . project , context . project ) ;
443- context . trigger (
444- Converter . EVENT_CREATE_DECLARATION ,
445- context . project ,
446- ) ;
447473 moduleContext = context ;
448474 } else {
449475 const reflection = context . createDeclarationReflection (
0 commit comments