@@ -139,6 +139,13 @@ declare module TypeDoc {
139139 public off ( event ?: string , handler ?: Function , scope ?: any ) : void ;
140140 }
141141}
142+ /**
143+ * The TypeDoc main module and namespace.
144+ *
145+ * The [[Application]] class holds the core logic of the cli application. All code related
146+ * to resolving reflections is stored in [[TypeDoc.Factories]], the actual data models can be found
147+ * in [[TypeDoc.Models]] and the final rendering is defined in [[TypeDoc.Output]].
148+ */
142149declare module TypeDoc {
143150 /**
144151 * List of known log levels. Used to specify the urgency of a log message.
@@ -370,6 +377,12 @@ declare module TypeDoc.Factories {
370377 public getDefaultLibraryFilePath ( ) : string ;
371378 }
372379}
380+ /**
381+ * Holds all logic used to analyze the output of the TypeScript compiler and generate reflections.
382+ *
383+ * The [[Dispatcher]] class is the central controller within this namespace. When invoked it fires a
384+ * series of [[DispatcherEvent]] events consumed by [[BaseHandler]] instances.
385+ */
373386declare module TypeDoc . Factories {
374387 /**
375388 * The dispatcher receives documents from the compiler and emits
@@ -749,59 +762,6 @@ declare module TypeDoc.Factories {
749762 constructor ( parent : DispatcherEvent , reflection ?: Models . DeclarationReflection ) ;
750763 }
751764}
752- declare module TypeDoc . Factories {
753- /**
754- * A handler that analyzes the AST and extracts data not represented by declarations.
755- */
756- class AstHandler extends BaseHandler {
757- /**
758- * The ast walker factory.
759- */
760- private factory ;
761- /**
762- * Collected ambient module export data.
763- */
764- private exports ;
765- /**
766- * Create a new AstHandler instance.
767- *
768- * @param dispatcher The dispatcher this handler should be attached to.
769- */
770- constructor ( dispatcher : Dispatcher ) ;
771- /**
772- * Triggered once per project before the dispatcher invokes the compiler.
773- *
774- * @param event An event object containing the related project and compiler instance.
775- */
776- private onBegin ( event ) ;
777- /**
778- * Triggered when the dispatcher starts processing a declaration.
779- *
780- * @param state The state that describes the current declaration and reflection.
781- */
782- private onBeginDeclaration ( state ) ;
783- /**
784- * Try to find the identifier of the export assignment within the given declaration.
785- *
786- * @param declaration The declaration whose export assignment should be resolved.
787- * @returns The found identifier or NULL.
788- */
789- public getExportedIdentifier ( declaration : TypeScript . PullDecl ) : TypeScript . Identifier ;
790- /**
791- * Try to find the compiler symbol exported by the given declaration.
792- *
793- * @param declaration The declaration whose export assignment should be resolved.
794- * @returns The found compiler symbol or NULL.
795- */
796- public getExportedSymbol ( declaration : TypeScript . PullDecl ) : TypeScript . PullSymbol ;
797- /**
798- * Mark the given reflection and all of its children as being exported.
799- *
800- * @param reflection The reflection that should be marked as being exported.
801- */
802- static markAsExported ( reflection : Models . DeclarationReflection ) : void ;
803- }
804- }
805765declare module TypeDoc . Factories {
806766 /**
807767 * A handler that parses javadoc comments and attaches [[Models.Comment]] instances to
@@ -880,6 +840,10 @@ declare module TypeDoc.Factories {
880840 * project's base path.
881841 */
882842 class DynamicModuleHandler extends BaseHandler {
843+ /**
844+ * The ast walker factory.
845+ */
846+ private factory ;
883847 /**
884848 * Helper class for determining the base path.
885849 */
@@ -918,6 +882,59 @@ declare module TypeDoc.Factories {
918882 private onBeginResolve ( event ) ;
919883 }
920884}
885+ declare module TypeDoc . Factories {
886+ /**
887+ * A handler that analyzes and resolves export statements of dynamic modules.
888+ */
889+ class ExportHandler extends BaseHandler {
890+ /**
891+ * The ast walker factory.
892+ */
893+ private factory ;
894+ /**
895+ * Collected ambient module export data.
896+ */
897+ private exports ;
898+ /**
899+ * Create a new AstHandler instance.
900+ *
901+ * @param dispatcher The dispatcher this handler should be attached to.
902+ */
903+ constructor ( dispatcher : Dispatcher ) ;
904+ /**
905+ * Triggered once per project before the dispatcher invokes the compiler.
906+ *
907+ * @param event An event object containing the related project and compiler instance.
908+ */
909+ private onBegin ( event ) ;
910+ /**
911+ * Triggered when the dispatcher starts processing a declaration.
912+ *
913+ * @param state The state that describes the current declaration and reflection.
914+ */
915+ private onBeginDeclaration ( state ) ;
916+ /**
917+ * Try to find the identifier of the export assignment within the given declaration.
918+ *
919+ * @param declaration The declaration whose export assignment should be resolved.
920+ * @returns The found identifier or NULL.
921+ */
922+ public getExportedIdentifier ( declaration : TypeScript . PullDecl ) : TypeScript . Identifier ;
923+ /**
924+ * Try to find the compiler symbol exported by the given declaration.
925+ *
926+ * @param declaration The declaration whose export assignment should be resolved.
927+ * @returns The found compiler symbol or NULL.
928+ */
929+ public getExportedSymbol ( declaration : TypeScript . PullDecl ) : TypeScript . PullSymbol ;
930+ /**
931+ * Mark the given reflection and all of its children as being exported.
932+ *
933+ * @param reflection The reflection that should be marked as being exported.
934+ */
935+ static markAsExported ( reflection : Models . DeclarationReflection ) : void ;
936+ }
937+ }
921938declare module TypeDoc . Factories {
922939 /**
923940 * A handler that marks files not passed as source files as being external.
@@ -1087,6 +1104,60 @@ declare module TypeDoc.Factories {
10871104 * @param state The state that describes the current declaration and reflection.
10881105 */
10891106 private onEndDeclaration ( state ) ;
1107+ /**
1108+ * Create a list of all declarations that are super declarations the given symbol.
1109+ *
1110+ * @param symbol The symbol whose parent declarations should be found.
1111+ * @returns A list of declarations that serve as parent declarations for the given symbol.
1112+ */
1113+ static collectExtendedTypes ( symbol : TypeScript . PullTypeSymbol ) : TypeScript . PullDecl [ ] ;
1114+ }
1115+ }
1116+ declare module TypeDoc . Factories {
1117+ /**
1118+ * A handler that extracts comments of containers like modules.
1119+ *
1120+ * The [[CommentHandler]] only extracts comments directly attached to the current
1121+ * declaration, while this handler looks up the comments of the parent ast of the given
1122+ * declaration if it is some container. As modules might be defined multiple times,
1123+ * this handler stores the found comments and applies them in the resolving phase.
1124+ *
1125+ * If multiple comments for the same module are found, the longest comment will be preferred.
1126+ * One may explicitly set the preferred module comment by appending the tag `@preferred`.
1127+ */
1128+ class ModuleCommentHandler extends BaseHandler {
1129+ /**
1130+ * The ast walker factory.
1131+ */
1132+ private factory ;
1133+ /**
1134+ * List of discovered module comments.
1135+ */
1136+ private comments ;
1137+ /**
1138+ * Create a new ModuleCommentHandler instance.
1139+ *
1140+ * @param dispatcher The dispatcher this handler should be attached to.
1141+ */
1142+ constructor ( dispatcher : Dispatcher ) ;
1143+ /**
1144+ * Triggered once per project before the dispatcher invokes the compiler.
1145+ *
1146+ * @param event An event object containing the related project and compiler instance.
1147+ */
1148+ private onBegin ( event ) ;
1149+ /**
1150+ * Triggered when the dispatcher processes a declaration.
1151+ *
1152+ * @param state The state that describes the current declaration and reflection.
1153+ */
1154+ private onDeclaration ( state ) ;
1155+ /**
1156+ * Triggered when the dispatcher enters the resolving phase.
1157+ *
1158+ * @param event An event object containing the related project and compiler instance.
1159+ */
1160+ private onBeginResolve ( event ) ;
10901161 }
10911162}
10921163declare module TypeDoc . Factories {
@@ -1270,7 +1341,6 @@ declare module TypeDoc.Factories {
12701341 */
12711342 static convertFunctionToCallSignature ( state : DeclarationState ) : void ;
12721343 /**
1273- *
12741344 * Applied when a container is merged with a variable.
12751345 *
12761346 * @param state
@@ -1580,6 +1650,17 @@ declare module TypeDoc.Models {
15801650 constructor ( tagName : string , paramName ?: string , text ?: string ) ;
15811651 }
15821652}
1653+ /**
1654+ * Holds all data models used by TypeDoc.
1655+ *
1656+ * The [[BaseReflection]] is base class of all reflection models. The subclass [[ProjectReflection]]
1657+ * serves as the root container for the current project while [[DeclarationReflection]] instances
1658+ * form the structure of the project. Most of the other classes in this namespace are referenced by this
1659+ * two base classes.
1660+ *
1661+ * The models [[NavigationItem]] and [[UrlMapping]] are special as they are only used by the [[Renderer]]
1662+ * while creating the final output.
1663+ */
15831664declare module TypeDoc . Models {
15841665 /**
15851666 * Base class for all reflection classes.
@@ -1713,15 +1794,15 @@ declare module TypeDoc.Models {
17131794 */
17141795 interface IDeclarationHierarchy {
17151796 /**
1716- * The type represented by this node in the hierarchy.
1797+ * The types represented by this node in the hierarchy.
17171798 */
1718- type : BaseType ;
1799+ types : BaseType [ ] ;
17191800 /**
1720- * A list of a children of this node .
1801+ * The next hierarchy level .
17211802 */
1722- children ?: IDeclarationHierarchy [ ] ;
1803+ next ?: IDeclarationHierarchy ;
17231804 /**
1724- * Is this the entry within the type hierarchy of the target type?
1805+ * Is this the entry containing the target type?
17251806 */
17261807 isTarget ?: boolean ;
17271808 }
@@ -2387,6 +2468,14 @@ declare module TypeDoc.Output {
23872468 static toStyleClass ( str : string ) : string ;
23882469 }
23892470}
2471+ /**
2472+ * Holds all logic used render and output the final documentation.
2473+ *
2474+ * The [[Renderer]] class is the central controller within this namespace. When invoked it creates
2475+ * an instance of [[BaseTheme]] which defines the layout of the documentation and fires a
2476+ * series of [[OutputEvent]] events. Instances of [[BasePlugin]] can listen to these events and
2477+ * alter the generated output.
2478+ */
23902479declare module TypeDoc . Output {
23912480 /**
23922481 * Interface representation of a handlebars template.
0 commit comments