- type ExternalResolveResult: { target: string, caption: string }
No description.
- type ExternalSymbolResolver: (ref: DeclarationReference, refl: Reflection, part: Readonly<> | undefined, symbolId: ReflectionSymbolId | undefined) => ExternalResolveResult | string | undefined
No description.
- type MeaningKeyword: MeaningKeywords[number]
No description.
- type RenderTemplate<T>: (data: T) => Element | string
No description.
- type SortStrategy: SORT_STRATEGIES[number]
No description.
namespace Configuration
All symbols documented under the Configuration namespace are also available in the root import.
- type
DeclarationOption: StringDeclarationOption | NumberDeclarationOption | BooleanDeclarationOption | MixedDeclarationOption | ObjectDeclarationOption | MapDeclarationOption<unknown> | ArrayDeclarationOption | FlagsDeclarationOption<Record<>string, boolean>
No description.
- type
DeclarationOptionToOptionType<T
extends
DeclarationOption>: T extends MapDeclarationOption<infer U> ? U : T extends FlagsDeclarationOption<infer U>? U : ParameterTypeToOptionTypeMap[Exclude<T["type"], undefined>]
No description.
- type
JsDocCompatibility: {defaultTag: boolean,}
exampleTag: boolean,
ignoreUnescapedBraces: boolean,
inheritDocTag: boolean No description.
- type
KeyToDeclaration<K
extends
keyof
TypeDocOptionMap>: TypeDocOptionMap[K] extends boolean ? BooleanDeclarationOption : TypeDocOptionMap[K] extends string ? StringDeclarationOption : TypeDocOptionMap[K] extends number ? NumberDeclarationOption : TypeDocOptionMap[K] extends string[] ? ArrayDeclarationOption : unknown extends TypeDocOptionMap[K] ? MixedDeclarationOption | ObjectDeclarationOption : TypeDocOptionMap[K] extends ManuallyValidatedOption<unknown> ? MixedDeclarationOption & {validate(value: unknown): void} | ObjectDeclarationOption & {validate(value: unknown): void} : TypeDocOptionMap[K] extends Record<string, boolean>? FlagsDeclarationOption<> : TypeDocOptionMap[K] extends Record<string | number, infer U>? MapDeclarationOption<U> : never
Converts a given TypeDoc option key to the type of the declaration expected.
- type ManuallyValidatedOption<T>: { __validated: T }
Wrapper type for values in TypeDocOptionMap which are represented with an unknown option type, but have a validation function that checks that they are the given type.
- type
ValidationOptions: {invalidLink: boolean,}
notDocumented: boolean,
notExported: boolean No description.
enum CommentStyle
Determines how TypeDoc searches for comments.
Enum does not seem to have an implementation. Please open an issue or pull request :)enum EmitStrategy
Enum does not seem to have an implementation. Please open an issue or pull request :)enum ParameterHint
Enum does not seem to have an implementation. Please open an issue or pull request :)enum ParameterType
Enum does not seem to have an implementation. Please open an issue or pull request :)class ArgumentsReader
Obtains option values from command-line arguments
- new ArgumentsReader(priority: number,): ArgumentsReader
args: any = ... No description.
- readonly name: "arguments"
The name of this reader so that it may be removed by plugins without the plugin accessing the instance performing the read. Multiple readers may have the same name.
- readonly order: number
Readers will be processed according to their orders. A higher order indicates that the reader should be called later.
Note that to preserve expected behavior, the argv reader must have both the lowest order so that it may set the location of config files used by other readers and the highest order so that it can override settings from lower order readers.
- readonly supportsPackages: false
Flag to indicate that this reader should be included in sub-options objects created to read options for packages mode.
Read options from the reader's source and place them in the options parameter. Options without a declared name may be treated as if they were declared with type
ParameterType.Mixed
. Options which have been declared must be converted to the correct type. As an alternative to doing this conversion in the reader, the reader may useOptions.setValue
, which will correctly convert values.Parameters
-
container
: the options container that provides declarations -
logger
: logger to be used to report errors
-
class Options
Maintains a collection of option declarations split into TypeDoc options and TypeScript options. Ensures options are of the correct type for calling code.
Option Discovery
Since plugins commonly add custom options, and TypeDoc does not permit options which have not been declared to be set, options must be read twice. The first time options are read, a noop logger is passed so that any errors are ignored. Then, after loading plugins, options are read again, this time with the logger specified by the application.
Options are read in a specific order.
- argv (0) - Must be read first since it should change the files read when passing --options or --tsconfig.
- typedoc-json (100) - Read next so that it can specify the tsconfig.json file to read.
- tsconfig-json (200) - Last config file reader, cannot specify the typedoc.json file to read.
- argv (300) - Read argv again since any options set there should override those set in config files.
No description.
- packageDir?: string
In packages mode, the directory of the package being converted.
- addDeclaration(declaration: never): void
Adds an option declaration to the container.
Parameters
-
declaration
: The option declaration that should be added.
-
- addDeclaration<K extends keyof TypeDocOptionMap>(declaration: { name: K } & KeyToDeclaration<K>): void
Adds an option declaration to the container with extra type checking to ensure that the runtime type is consistent with the declared type.
Parameters
-
declaration
: The option declaration that should be added.
-
- addReader(reader: OptionsReader): void
Adds an option reader that will be used to read configuration values from the command line, configuration files, or other locations.
- copyForPackage(packageDir: string): Options
Clones the options, intended for use in packages mode.
- fixCompilerOptions(options: CompilerOptions): CompilerOptions
Internal
- freeze(): void
Marks the options as readonly, enables caching when fetching options, which improves performance.
- getCompilerOptions(): CompilerOptions
Gets the set compiler options.
- getDeclaration(name: string): undefined | Readonly<DeclarationOption>
Gets a declaration by one of its names.
- getDeclarations(): Readonly<DeclarationOption>[]
Gets all declared options.
- getFileNames(): readonly string[]
Gets the file names discovered through reading a tsconfig file.
- getHelp(): string
Get the help message to be displayed to the user if
--help
is passed.- getProjectReferences(): readonly ProjectReference[]
Gets the project references - used in solution style tsconfig setups.
- getRawValues(): Readonly<Partial<TypeDocOptions>>
Gets all of the TypeDoc option values defined in this option container.
- getSimilarOptions(missingName: string): string[]
Discover similar option names to the given name, for use in error reporting.
- getValue(name: never): unknown
- getValue<K extends keyof TypeDocOptionMap>(name: K): TypeDocOptionValues[K]
Gets a value for the given option key, throwing if the option has not been declared.
- isFrozen(): boolean
Checks if the options object has been frozen, preventing future changes to option values.
- isSet(name: never): boolean
- isSet(name: keyof TypeDocOptionMap): boolean
Checks if the given option's value is deeply strict equal to the default.
- reset(name?: undefined): void
- reset(name?: unknown): void
Resets the option bag to all default values. If a name is provided, will only reset that name.
- restore(snapshot: { __optionSnapshot: never }): void
Take a snapshot of option values now, used in tests only.
Internal
- setCompilerOptions(fileNames: readonly string[],): void
options: CompilerOptions,
projectReferences: undefined | readonly ProjectReference[] Sets the compiler options that will be used to get a TS program.
- setValue(name: never,): void
value: never,
configPath?: undefined - setValue<K extends keyof TypeDocOptionMap>(name: K,): void
value: TypeDocOptions[K],
configPath?: string Sets the given declared option. Throws if setting the option fails.
Parameters
-
configPath
: the directory to resolve Path type values against
-
- snapshot(): { __optionSnapshot: never }
Take a snapshot of option values now, used in tests only.
Internal
class PackageJsonReader
Describes an option reader that discovers user configuration and converts it to the TypeDoc format.
No description.
- name: string
The name of this reader so that it may be removed by plugins without the plugin accessing the instance performing the read. Multiple readers may have the same name.
- order: number
Readers will be processed according to their orders. A higher order indicates that the reader should be called later.
Note that to preserve expected behavior, the argv reader must have both the lowest order so that it may set the location of config files used by other readers and the highest order so that it can override settings from lower order readers.
- supportsPackages: boolean
Flag to indicate that this reader should be included in sub-options objects created to read options for packages mode.
Read options from the reader's source and place them in the options parameter. Options without a declared name may be treated as if they were declared with type
ParameterType.Mixed
. Options which have been declared must be converted to the correct type. As an alternative to doing this conversion in the reader, the reader may useOptions.setValue
, which will correctly convert values.Parameters
-
container
: the options container that provides declarations -
logger
: logger to be used to report errors -
cwd
: the directory which should be treated as the current working directory for option file discovery
-
class TSConfigReader
Describes an option reader that discovers user configuration and converts it to the TypeDoc format.
No description.
- name: string
The name of this reader so that it may be removed by plugins without the plugin accessing the instance performing the read. Multiple readers may have the same name.
- order: number
Note: Runs after the
TypeDocReader
.- supportsPackages: boolean
Flag to indicate that this reader should be included in sub-options objects created to read options for packages mode.
Read options from the reader's source and place them in the options parameter. Options without a declared name may be treated as if they were declared with type
ParameterType.Mixed
. Options which have been declared must be converted to the correct type. As an alternative to doing this conversion in the reader, the reader may useOptions.setValue
, which will correctly convert values.Parameters
-
container
: the options container that provides declarations -
logger
: logger to be used to report errors -
cwd
: the directory which should be treated as the current working directory for option file discovery
-
class TypeDocReader
Obtains option values from typedoc.json
Changes need to happen here at some point. I think we should follow ESLint's new config system eventually: https://eslint.org/blog/2022/08/new-config-system-part-1/
No description.
- name: string
The name of this reader so that it may be removed by plugins without the plugin accessing the instance performing the read. Multiple readers may have the same name.
- order: number
Should run before the tsconfig reader so that it can specify a tsconfig file to read.
- supportsPackages: boolean
Flag to indicate that this reader should be included in sub-options objects created to read options for packages mode.
interface StringDeclarationOption implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- defaultValue?: string
If not specified defaults to the empty string for both
String
andPath
.An optional hint for the type of input expected, will be displayed in the help output.
Specifies the resolution strategy. If
Path
is provided, values will be resolved according to their location in a file. IfString
or no value is provided, values will not be resolved.- validate?: (value: string) => void
An optional validation function that validates a potential value of this option. The function must throw an Error if the validation fails and should do nothing otherwise.
interface ObjectDeclarationOption implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- defaultValue?: unknown
If not specified defaults to undefined.
- validate?: (value: unknown) => void
An optional validation function that validates a potential value of this option. The function must throw an Error if the validation fails and should do nothing otherwise.
interface NumberDeclarationOption implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- defaultValue?: number
If not specified defaults to 0.
- maxValue?: number
Highest possible value.
- minValue?: number
Lowest possible value.
- validate?: (value: number) => void
An optional validation function that validates a potential value of this option. The function must throw an Error if the validation fails and should do nothing otherwise.
interface MixedDeclarationOption implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- defaultValue?: unknown
If not specified defaults to undefined.
- validate?: (value: unknown) => void
An optional validation function that validates a potential value of this option. The function must throw an Error if the validation fails and should do nothing otherwise.
interface MapDeclarationOption<T> implements DeclarationOptionBase
Unlike the rest of the option types, there is no sensible generic default for mapped option types. The default value for a mapped type must be specified.
- help: string
The help text to be displayed to the user when --help is passed.
Maps a given value to the option type. The map type may be a TypeScript enum. In that case, when generating an error message for a mismatched key, the numeric keys will not be listed.
- name: string
The option name.
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- mapError?: string
Optional override for the error reported when an invalid key is provided.
interface FlagsDeclarationOption<T extends Record<string, boolean>> implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.
interface BooleanDeclarationOption implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- defaultValue?: boolean
If not specified defaults to false.
interface ArrayDeclarationOption implements DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
- type: Array | PathArray | ModuleArray | GlobArray
The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.- defaultValue?: readonly string[]
If not specified defaults to an empty array.
- validate?: (value: string[]) => void
An optional validation function that validates a potential value of this option. The function must throw an Error if the validation fails and should do nothing otherwise.
interface DeclarationOptionBase
- help: string
The help text to be displayed to the user when --help is passed.
- name: string
The option name.
- configFileOnly?: boolean
If set, this option will be omitted from
--help
, and attempting to specify it on the command line will produce an error.The parameter type, used to convert user configuration values into the expected type. If not set, the type will be a string.
interface OptionsReader
Describes an option reader that discovers user configuration and converts it to the TypeDoc format.
- readonly name: string
The name of this reader so that it may be removed by plugins without the plugin accessing the instance performing the read. Multiple readers may have the same name.
- readonly order: number
Readers will be processed according to their orders. A higher order indicates that the reader should be called later.
Note that to preserve expected behavior, the argv reader must have both the lowest order so that it may set the location of config files used by other readers and the highest order so that it can override settings from lower order readers.
- readonly supportsPackages: boolean
Flag to indicate that this reader should be included in sub-options objects created to read options for packages mode.
Read options from the reader's source and place them in the options parameter. Options without a declared name may be treated as if they were declared with type
ParameterType.Mixed
. Options which have been declared must be converted to the correct type. As an alternative to doing this conversion in the reader, the reader may useOptions.setValue
, which will correctly convert values.Parameters
-
container
: the options container that provides declarations -
logger
: logger to be used to report errors -
cwd
: the directory which should be treated as the current working directory for option file discovery
-
interface ParameterTypeToOptionTypeMap
- 0: string
No description.
- 1: string
No description.
- 10: unknown
No description.
- 11: Record<string, boolean>
No description.
- 2: number
No description.
- 3: boolean
No description.
- 4: unknown
No description.
- 5: unknown
No description.
- 6: string[]
No description.
- 7: string[]
No description.
- 8: string[]
No description.
- 9: string[]
No description.
interface TypeDocOptionMap
Describes all TypeDoc options. Used internally to provide better types when fetching options.
External consumers should likely use TypeDocOptions
instead.
If writing a plugin, you may find it useful to use declaration merging to add your options to this interface
so that you have autocomplete when using app.options.getValue
.
declare module "typedoc" {
export interface TypeDocOptionMap {
pluginOption: string[];
}
}
- basePath: string
No description.
- blockTags: Array<`@${string}`>
No description.
- cacheBust: boolean
No description.
- categorizeByGroup: boolean
No description.
- categoryOrder: string[]
No description.
- cleanOutputDir: boolean
No description.
- cname: string
No description.
- commentStyle: {All: "all",}
Block: "block",
JSDoc: "jsdoc",
Line: "line" No description.
- compilerOptions: unknown
No description.
- customCss: string
No description.
- darkHighlightTheme: ShikiTheme
No description.
- defaultCategory: string
No description.
- disableGit: boolean
No description.
- disableSources: boolean
No description.
- emit: { both: "both", docs: "docs", none: "none" }
No description.
- entryPointStrategy: {Expand: "expand",}
Merge: "merge",
Packages: "packages",
Resolve: "resolve" No description.
- entryPoints: string[]
No description.
- exclude: string[]
No description.
- excludeCategories: string[]
No description.
- excludeExternals: boolean
No description.
- excludeInternal: boolean
No description.
- excludeNotDocumented: boolean
No description.
- excludeNotDocumentedKinds: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "singularString" | "pluralString" | "classString" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- excludePrivate: boolean
No description.
- excludeProtected: boolean
No description.
- excludeReferences: boolean
No description.
- excludeTags: Array<`@${string}`>
No description.
- externalPattern: string[]
No description.
- externalSymbolLinkMappings: ManuallyValidatedOption<Record<>string, Record<>string, string>
No description.
- gaID: string
No description.
- gitRemote: string
No description.
- gitRevision: string
No description.
- githubPages: boolean
No description.
- groupOrder: string[]
No description.
- help: boolean
No description.
- hideGenerator: boolean
No description.
- hideParameterTypesInTitle: boolean
No description.
- htmlLang: string
No description.
- includeVersion: boolean
No description.
- includes: string
No description.
- inlineTags: Array<`@${string}`>
No description.
- intentionallyNotExported: string[]
No description.
No description.
- json: string
No description.
- kindSortOrder: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- lightHighlightTheme: ShikiTheme
No description.
- markedOptions: unknown
No description.
- maxTypeConversionDepth: number
No description.
- media: string
No description.
- modifierTags: Array<`@${string}`>
No description.
- name: string
No description.
- options: string
No description.
- out: string
No description.
- plugin: string[]
No description.
- preserveLinkText: boolean
No description.
- preserveWatchOutput: boolean
No description.
- pretty: boolean
No description.
- readme: string
No description.
- requiredToBeDocumented: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- searchCategoryBoosts: ManuallyValidatedOption<Record<string, number>>
No description.
- searchGroupBoosts: ManuallyValidatedOption<Record<string, number>>
No description.
- searchInComments: boolean
No description.
- showConfig: boolean
No description.
- sitemapBaseUrl: string
No description.
- skipErrorChecking: boolean
No description.
- sort: Array<"kind" | "source-order" | "alphabetical" | "enum-value-ascending" | "enum-value-descending" | "enum-member-source-order" | "static-first" | "instance-first" | "visibility" | "required-first" | "external-last">
No description.
- sortEntryPoints: boolean
No description.
- sourceLinkExternal: boolean
No description.
- sourceLinkTemplate: string
No description.
- stripYamlFrontmatter: boolean
No description.
- theme: string
No description.
- titleLink: string
No description.
- treatValidationWarningsAsErrors: boolean
No description.
- treatWarningsAsErrors: boolean
No description.
- tsconfig: string
No description.
- useTsLinkResolution: boolean
No description.
No description.
- version: boolean
No description.
- visibilityFilters: ManuallyValidatedOption<{external: boolean,}>
inherited: boolean,
private: boolean,
protected: boolean No description.
- watch: boolean
No description.
interface TypeDocOptionValues
Describes all TypeDoc specific options as returned by Options.getValue
, this is
slightly more restrictive than the TypeDocOptions
since it does not allow both
keys and values for mapped option types, and does not allow partials of flag values.
- basePath: string
No description.
- blockTags: Array<`@${string}`>
No description.
- cacheBust: boolean
No description.
- categorizeByGroup: boolean
No description.
- categoryOrder: string[]
No description.
- cleanOutputDir: boolean
No description.
- cname: string
No description.
- commentStyle: "jsdoc" | "block" | "line" | "all"
No description.
- compilerOptions: unknown
No description.
- customCss: string
No description.
- darkHighlightTheme: unknown
No description.
- defaultCategory: string
No description.
- disableGit: boolean
No description.
- disableSources: boolean
No description.
- emit: "none" | "both" | "docs"
No description.
- entryPointStrategy: "resolve" | "expand" | "packages" | "merge"
No description.
- entryPoints: string[]
No description.
- exclude: string[]
No description.
- excludeCategories: string[]
No description.
- excludeExternals: boolean
No description.
- excludeInternal: boolean
No description.
- excludeNotDocumented: boolean
No description.
- excludeNotDocumentedKinds: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "singularString" | "pluralString" | "classString" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- excludePrivate: boolean
No description.
- excludeProtected: boolean
No description.
- excludeReferences: boolean
No description.
- excludeTags: Array<`@${string}`>
No description.
- externalPattern: string[]
No description.
- externalSymbolLinkMappings: Record<string, Record<string, string>>
No description.
- gaID: string
No description.
- gitRemote: string
No description.
- gitRevision: string
No description.
- githubPages: boolean
No description.
- groupOrder: string[]
No description.
- help: boolean
No description.
- hideGenerator: boolean
No description.
- hideParameterTypesInTitle: boolean
No description.
- htmlLang: string
No description.
- includeVersion: boolean
No description.
- includes: string
No description.
- inlineTags: Array<`@${string}`>
No description.
- intentionallyNotExported: string[]
No description.
No description.
- json: string
No description.
- kindSortOrder: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- lightHighlightTheme: unknown
No description.
- markedOptions: unknown
No description.
- maxTypeConversionDepth: number
No description.
- media: string
No description.
- modifierTags: Array<`@${string}`>
No description.
- name: string
No description.
- options: string
No description.
- out: string
No description.
- plugin: string[]
No description.
- preserveLinkText: boolean
No description.
- preserveWatchOutput: boolean
No description.
- pretty: boolean
No description.
- readme: string
No description.
- requiredToBeDocumented: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- searchCategoryBoosts: Record<string, number>
No description.
- searchGroupBoosts: Record<string, number>
No description.
- searchInComments: boolean
No description.
- showConfig: boolean
No description.
- sitemapBaseUrl: string
No description.
- skipErrorChecking: boolean
No description.
- sort: Array<"kind" | "source-order" | "alphabetical" | "enum-value-ascending" | "enum-value-descending" | "enum-member-source-order" | "static-first" | "instance-first" | "visibility" | "required-first" | "external-last">
No description.
- sortEntryPoints: boolean
No description.
- sourceLinkExternal: boolean
No description.
- sourceLinkTemplate: string
No description.
- stripYamlFrontmatter: boolean
No description.
- theme: string
No description.
- titleLink: string
No description.
- treatValidationWarningsAsErrors: boolean
No description.
- treatWarningsAsErrors: boolean
No description.
- tsconfig: string
No description.
- useTsLinkResolution: boolean
No description.
No description.
- version: boolean
No description.
- visibilityFilters: {external: boolean,}
inherited: boolean,
private: boolean,
protected: boolean No description.
- watch: boolean
No description.
interface TypeDocOptions
An interface describing all TypeDoc specific options. Generated from a map which contains more information about each option for better types when defining said options.
- basePath: string
No description.
- blockTags: Array<`@${string}`>
No description.
- cacheBust: boolean
No description.
- categorizeByGroup: boolean
No description.
- categoryOrder: string[]
No description.
- cleanOutputDir: boolean
No description.
- cname: string
No description.
- commentStyle: "All" | "jsdoc" | "block" | "line" | "all" | "JSDoc" | "Block" | "Line"
No description.
- compilerOptions: unknown
No description.
- customCss: string
No description.
- darkHighlightTheme: unknown
No description.
- defaultCategory: string
No description.
- disableGit: boolean
No description.
- disableSources: boolean
No description.
- emit: "none" | "both" | "docs"
No description.
- entryPointStrategy: "resolve" | "expand" | "packages" | "merge" | "Resolve" | "Expand" | "Packages" | "Merge"
No description.
- entryPoints: string[]
No description.
- exclude: string[]
No description.
- excludeCategories: string[]
No description.
- excludeExternals: boolean
No description.
- excludeInternal: boolean
No description.
- excludeNotDocumented: boolean
No description.
- excludeNotDocumentedKinds: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "singularString" | "pluralString" | "classString" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- excludePrivate: boolean
No description.
- excludeProtected: boolean
No description.
- excludeReferences: boolean
No description.
- excludeTags: Array<`@${string}`>
No description.
- externalPattern: string[]
No description.
- externalSymbolLinkMappings: Record<string, Record<string, string>>
No description.
- gaID: string
No description.
- gitRemote: string
No description.
- gitRevision: string
No description.
- githubPages: boolean
No description.
- groupOrder: string[]
No description.
- help: boolean
No description.
- hideGenerator: boolean
No description.
- hideParameterTypesInTitle: boolean
No description.
- htmlLang: string
No description.
- includeVersion: boolean
No description.
- includes: string
No description.
- inlineTags: Array<`@${string}`>
No description.
- intentionallyNotExported: string[]
No description.
- jsDocCompatibility: boolean | Partial<JsDocCompatibility>
No description.
- json: string
No description.
- kindSortOrder: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- lightHighlightTheme: unknown
No description.
No description.
- markedOptions: unknown
No description.
- maxTypeConversionDepth: number
No description.
- media: string
No description.
- modifierTags: Array<`@${string}`>
No description.
- name: string
No description.
- options: string
No description.
- out: string
No description.
- plugin: string[]
No description.
- preserveLinkText: boolean
No description.
- preserveWatchOutput: boolean
No description.
- pretty: boolean
No description.
- readme: string
No description.
- requiredToBeDocumented: Array<"Function" | "Project" | "Module" | "Namespace" | "Enum" | "EnumMember" | "Variable" | "Class" | "Interface" | "Constructor" | "Property" | "Method" | "CallSignature" | "IndexSignature" | "ConstructorSignature" | "Parameter" | "TypeLiteral" | "TypeParameter" | "Accessor" | "GetSignature" | "SetSignature" | "TypeAlias" | "Reference" | "All" | "ClassOrInterface" | "VariableOrProperty" | "FunctionOrMethod" | "ClassMember" | "SomeSignature" | "SomeModule" | "SomeType" | "SomeValue" | "SomeMember" | "SomeExport" | "ExportContainer" | "Inheritable" | "ContainsCallSignatures" | "TypeReferenceTarget" | "ValueReferenceTarget" | "SignatureContainer" | "VariableContainer" | "MethodContainer">
No description.
- searchCategoryBoosts: Record<string, number>
No description.
- searchGroupBoosts: Record<string, number>
No description.
- searchInComments: boolean
No description.
- showConfig: boolean
No description.
- sitemapBaseUrl: string
No description.
- skipErrorChecking: boolean
No description.
- sort: Array<"kind" | "source-order" | "alphabetical" | "enum-value-ascending" | "enum-value-descending" | "enum-member-source-order" | "static-first" | "instance-first" | "visibility" | "required-first" | "external-last">
No description.
- sortEntryPoints: boolean
No description.
- sourceLinkExternal: boolean
No description.
- sourceLinkTemplate: string
No description.
- stripYamlFrontmatter: boolean
No description.
- theme: string
No description.
- titleLink: string
No description.
- treatValidationWarningsAsErrors: boolean
No description.
- treatWarningsAsErrors: boolean
No description.
- tsconfig: string
No description.
- useTsLinkResolution: boolean
No description.
- validation: boolean | Partial<ValidationOptions>
No description.
- version: boolean
No description.
- visibilityFilters: {external: boolean,}
inherited: boolean,
private: boolean,
protected: boolean No description.
- watch: boolean
No description.
function BindOption
Function does not seem to have an implementation. Please open an issue or pull request :)function Option
Function does not seem to have an implementation. Please open an issue or pull request :)namespace JSONOutput
Contains interfaces which describe the JSON output. Each interface is related to a specific type of serializer.
Plugins
Plugins which modify the serialization process can use declaration merging
to add custom properties to the exported interfaces.
For example, if your custom serializer adds a property to all Reflection
objects:
declare module 'typedoc/dist/lib/serialization/schema' {
export interface AbstractReflection {
myCustomProp: boolean
}
}
If a plugin defines a new Model type, ModelToObject
will not pick up the serializer type and
the resulting type will not be included in the return type of Serializer.toObject
.
To fix this, use declaration merging to augment the Serializer
class.
declare module 'typedoc/dist/lib/serialization/serializer' {
export interface Serializer {
toObject(value: CustomModel, obj?: Partial<CustomModel>): CustomOutput
}
}
For documentation on the JSON output properties, view the corresponding model.
- type
CommentDisplayPart: {kind: "text",} | {
text: stringkind: "code",} | InlineTagDisplayPart
text: string No description.
- type
ModelToObject<T>: T extends Array<infer U> ? _ModelToObject<U>[] : _ModelToObject<T>
Describes the mapping from Model types to the corresponding JSON output type.
- type SomeReflection: {}[keyof ReflectionVariant]
No description.
- type SomeType: ModelToObject<SomeType>
No description.
- type
TypeKindMap: {array: ArrayType,}
conditional: ConditionalType,
indexedAccess: IndexedAccessType,
inferred: InferredType,
intersection: IntersectionType,
intrinsic: IntrinsicType,
literal: LiteralType,
mapped: MappedType,
namedTupleMember: NamedTupleMemberType,
optional: OptionalType,
predicate: PredicateType,
query: QueryType,
reference: ReferenceType,
reflection: ReflectionType,
rest: RestType,
templateLiteral: TemplateLiteralType,
tuple: TupleType,
typeOperator: TypeOperatorType,
union: UnionType,
unknown: UnknownType No description.
interface UnknownType implements Type extends S<UnknownType, "type" | "name">
interface UnionType implements Type extends S<UnionType, "type" | "types">
- readonly type: "union"
No description.
- types: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
No description.
interface TypeOperatorType implements Type extends S<TypeOperatorType, "type" | "operator" | "target">
- operator: "keyof" | "unique" | "readonly"
No description.
- target: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- readonly type: "typeOperator"
No description.
interface TupleType implements Type extends S<TupleType, "type">
- readonly type: "tuple"
No description.
- elements?: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
No description.
interface ContainerReflection implements Reflection extends S<ContainerReflection, "children" | "groups" | "categories">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- abstract readonly variant: keyof ReflectionVariant
Discriminator representing the type of reflection represented by this object.
All children grouped by their category.
The children of this reflection.
All children grouped by their kind.
interface Reflection extends S<Reflection, "id" | "variant" | "name" | "kind" | "comment">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- abstract readonly variant: keyof ReflectionVariant
Discriminator representing the type of reflection represented by this object.
interface TemplateLiteralType implements Type extends S<TemplateLiteralType, "type" | "head">
interface RestType implements Type extends S<RestType, "type" | "elementType">
- elementType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- readonly type: "rest"
No description.
interface ReflectionType implements Type extends S<ReflectionType, "type" | "declaration">
No description.
- readonly type: "reflection"
No description.
interface ReferenceType implements Type extends S<ReferenceType, "type" | "name" | "typeArguments" | "package" | "externalUrl">
- name: string
The name of the referenced type.
If the symbol cannot be found because it's not part of the documentation this can be used to represent the type.
- target: number | ReflectionSymbolId
No description.
- readonly type: "reference"
No description.
- externalUrl?: string
If this reference type refers to a reflection defined by a project not being rendered, points to the url that this type should be linked to.
- package?: string
The package that this type is referencing.
- preferValues?: boolean
No description.
- qualifiedName?: string
No description.
- refersToTypeParameter?: boolean
No description.
- typeArguments?: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
The type arguments of this reference.
interface QueryType implements Type extends S<QueryType, "type" | "queryType">
No description.
- readonly type: "query"
No description.
interface PredicateType implements Type extends S<PredicateType, "type" | "name" | "asserts" | "targetType">
- asserts: boolean
True if the type is of the form
asserts val is string
, false if the type is of the formval is string
- name: string
The identifier name which is tested by the predicate.
- readonly type: "predicate"
No description.
- targetType?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
The type that the identifier is tested to be. May be undefined if the type is of the form
asserts val
. Will be defined if the type is of the formasserts val is string
orval is string
.
interface OptionalType implements Type extends S<OptionalType, "type" | "elementType">
- elementType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- readonly type: "optional"
No description.
interface NamedTupleMemberType implements Type extends S<NamedTupleMember, "type" | "name" | "isOptional" | "element">
- element: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- isOptional: boolean
No description.
- name: string
No description.
- readonly type: "namedTupleMember"
No description.
interface MappedType implements Type extends S<MappedType, "type" | "parameter" | "parameterType" | "templateType" | "readonlyModifier" | "optionalModifier" | "nameType">
- parameter: string
No description.
- parameterType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- templateType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- readonly type: "mapped"
No description.
- nameType?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- optionalModifier?: "+" | "-"
No description.
- readonlyModifier?: "+" | "-"
No description.
interface LiteralType implements Type extends S<LiteralType, "type" | "value">
interface IntrinsicType implements Type extends S<IntrinsicType, "type" | "name">
interface IntersectionType implements Type extends S<IntersectionType, "type" | "types">
- readonly type: "intersection"
No description.
- types: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
No description.
interface InferredType implements Type extends S<InferredType, "type" | "name" | "constraint">
- name: string
No description.
- readonly type: "inferred"
No description.
- constraint?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
interface IndexedAccessType implements Type extends S<IndexedAccessType, "type" | "indexType" | "objectType">
- indexType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- objectType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- readonly type: "indexedAccess"
No description.
interface ConditionalType implements Type extends S<ConditionalType, "type" | "checkType" | "extendsType" | "trueType" | "falseType">
- checkType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- extendsType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- falseType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- trueType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- readonly type: "conditional"
No description.
interface ArrayType implements Type extends S<ArrayType, "type" | "elementType">
- elementType: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
The type of the elements in the array.
- readonly type: "array"
No description.
interface Type
interface Comment extends Partial<S<Comment, "blockTags" | "label">>
No description.
- blockTags?: CommentTag[]
All associated block level tags.
- label?: string
Label associated with this reflection, if any (https://tsdoc.org/pages/tags/label/)
- modifierTags?: Array<`@${string}`>
No description.
interface CommentTag extends S<CommentTag, "tag" | "name">
interface DeclarationReflection extends Omit<ContainerReflection, "variant">,S<DeclarationReflection, "variant" | "packageVersion" | "sources" | "relevanceBoost" | "type" | "signatures" | "indexSignature" | "defaultValue" | "overwrites" | "inheritedFrom" | "implementationOf" | "extendedTypes" | "extendedBy" | "implementedTypes" | "implementedBy" | "getSignature" | "setSignature" | "typeParameters" | "readme">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- readonly variant: "declaration" | "reference"
No description.
All children grouped by their category.
The children of this reflection.
- defaultValue?: string
The default value of this reflection.
Applies to function parameters, variables, and properties.
A list of all types that extend this reflection (e.g. the subclasses).
- extendedTypes?: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
A list of all types this reflection extends (e.g. the parent classes).
The get signature of this declaration.
All children grouped by their kind.
A type that points to the reflection this reflection is the implementation of.
Applies to class members.
A list of all types that implement this reflection.
- implementedTypes?: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
A list of all types this reflection implements.
The index signature of this declaration.
A type that points to the reflection this reflection has been inherited from.
Applies to interface and class members.
A type that points to the reflection that has been overwritten by this reflection.
Applies to interface and class members.
- packageVersion?: string
The version of the module when found.
The contents of the readme file of the module when found.
- relevanceBoost?: number
A precomputed boost derived from the searchCategoryBoosts and searchGroupBoosts options, used when boosting search relevance scores at runtime. May be modified by plugins.
The set signature of this declaration.
A list of call signatures attached to this declaration.
TypeDoc creates one declaration per function that may contain one or more signature reflections.
A list of all source files that contributed to this reflection.
- type?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
The type of the reflection.
If the reflection represents a variable or a property, this is the value type.<br /> If the reflection represents a signature, this is the return type.
No description.
interface InlineTagDisplayPart
If target
is a number, it is a reflection ID. If a string, it is a URL.
target
will only be set for @link
, @linkcode
, and @linkplain
tags.
- kind: "inline-tag"
No description.
- tag: `@${string}`
No description.
- text: string
No description.
- target?: string | number | ReflectionSymbolId
No description.
- tsLinkText?: string
No description.
interface ParameterReflection extends Omit<Reflection, "variant">,S<ParameterReflection, "variant" | "type" | "defaultValue">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- variant: "param"
No description.
- defaultValue?: string
No description.
- type?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
interface ProjectReflection extends Omit<ContainerReflection, "variant">,S<ProjectReflection, "variant" | "packageName" | "packageVersion" | "readme">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- symbolIdMap: Record<number, ReflectionSymbolId>
No description.
- readonly variant: "project"
No description.
All children grouped by their category.
The children of this reflection.
All children grouped by their kind.
- packageName?: string
The name of the package that this reflection documents according to package.json.
- packageVersion?: string
The version of the package that this reflection documents according to package.json.
The contents of the readme.md file of the project when found.
interface ReferenceReflection extends Omit<DeclarationReflection, "variant">,S<ReferenceReflection, "variant">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- target: number
-1 if the reference refers to a symbol that does not exist in the documentation. Otherwise, the reflection ID.
- readonly variant: "reference"
No description.
All children grouped by their category.
The children of this reflection.
- defaultValue?: string
The default value of this reflection.
Applies to function parameters, variables, and properties.
A list of all types that extend this reflection (e.g. the subclasses).
- extendedTypes?: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
A list of all types this reflection extends (e.g. the parent classes).
The get signature of this declaration.
All children grouped by their kind.
A type that points to the reflection this reflection is the implementation of.
Applies to class members.
A list of all types that implement this reflection.
- implementedTypes?: Array<ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType>
A list of all types this reflection implements.
The index signature of this declaration.
A type that points to the reflection this reflection has been inherited from.
Applies to interface and class members.
A type that points to the reflection that has been overwritten by this reflection.
Applies to interface and class members.
- packageVersion?: string
The version of the module when found.
The contents of the readme file of the module when found.
- relevanceBoost?: number
A precomputed boost derived from the searchCategoryBoosts and searchGroupBoosts options, used when boosting search relevance scores at runtime. May be modified by plugins.
The set signature of this declaration.
A list of call signatures attached to this declaration.
TypeDoc creates one declaration per function that may contain one or more signature reflections.
A list of all source files that contributed to this reflection.
- type?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
The type of the reflection.
If the reflection represents a variable or a property, this is the value type.<br /> If the reflection represents a signature, this is the return type.
No description.
interface ReflectionCategory extends S<ReflectionCategory, "title" | "description">
interface ReflectionFlags extends Partial<S<ReflectionFlags, BoolKeys<ReflectionFlags>>>
- hasExportAssignment: undefined | boolean
No description.
- isAbstract: undefined | boolean
No description.
- isConst: undefined | boolean
No description.
- isExternal: undefined | boolean
No description.
- isOptional: undefined | boolean
No description.
- isPrivate: undefined | boolean
No description.
- isProtected: undefined | boolean
No description.
- isPublic: undefined | boolean
No description.
- isReadonly: undefined | boolean
No description.
- isRest: undefined | boolean
No description.
- isStatic: undefined | boolean
No description.
interface ReflectionGroup extends S<ReflectionGroup, "title" | "description" | "categories">
interface ReflectionSymbolId
- qualifiedName: string
No description.
- sourceFileName: string
No description.
interface SignatureReflection extends Omit<Reflection, "variant">,S<SignatureReflection, "variant" | "sources" | "parameters" | "type" | "overwrites" | "inheritedFrom" | "implementationOf">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- readonly variant: "signature"
No description.
A type that points to the reflection this reflection is the implementation of.
Applies to class members.
A type that points to the reflection this reflection has been inherited from.
Applies to interface and class members.
A type that points to the reflection that has been overwritten by this reflection.
Applies to interface and class members.
No description.
A list of all source files that contributed to this reflection.
- type?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
No description.
interface SourceReference extends S<SourceReference, "fileName" | "line" | "character" | "url">
interface TypeParameterReflection extends Omit<Reflection, "variant">,S<TypeParameterReflection, "variant" | "type" | "default" | "varianceModifier">
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
- readonly variant: "typeParam"
No description.
- default?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
- type?: ReferenceType | ArrayType | ConditionalType | IndexedAccessType | InferredType | IntersectionType | IntrinsicType | LiteralType | MappedType | OptionalType | PredicateType | QueryType | ReflectionType | RestType | TemplateLiteralType | TupleType | NamedTupleMemberType | TypeOperatorType | UnionType | UnknownType
No description.
No description.
namespace JSX
Custom JSX module designed specifically for TypeDoc's needs.
When overriding a default TypeDoc theme output, your implementation must create valid Element
instances, which can be most easily done by using TypeDoc's JSX implementation. To use it, set up
your tsconfig with the following compiler options:
{
"jsx": "react",
"jsxFactory": "JSX.createElement",
"jsxFragmentFactory": "JSX.Fragment"
}
- type JsxComponent<P>: (props: P) => Element | | undefined
No description.
interface Element
- props: | object
No description.
- tag: string | Fragment | JsxComponent<any>
No description.
variable Fragment
Variable does not seem to have an implementation. Please open an issue or pull request :)function Raw
Function does not seem to have an implementation. Please open an issue or pull request :)function createElement
Function does not seem to have an implementation. Please open an issue or pull request :)function renderElement
Function does not seem to have an implementation. Please open an issue or pull request :)function setRenderSettings
Function does not seem to have an implementation. Please open an issue or pull request :)namespace Models
All symbols documented under the Models namespace are also available in the root import.
- type
CommentDisplayPart: {kind: "text",} | {
text: stringkind: "code",} | InlineTagDisplayPart
text: string Represents a parsed piece of a comment.
- type ReflectionSymbolIdString: string & { __reflectionSymbolId: unique symbol }
- type ReflectionVisitor: {}
No description.
- type SomeType: TypeKindMap[keyof TypeKindMap]
No description.
- type TypeKind: keyof TypeKindMap
No description.
- type TypeVisitor<T>: {}
No description.
namespace ReflectionKind
- type KindString: EnumKeys<ReflectionKind>
No description.
variable All
Variable does not seem to have an implementation. Please open an issue or pull request :)variable ClassMember
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable ClassOrInterface
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable ContainsCallSignatures
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable ExportContainer
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable FunctionOrMethod
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable Inheritable
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable MethodContainer
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SignatureContainer
Note: This does not include Class/Interface, even though they technically could contain index signatures
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SomeExport
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SomeMember
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SomeModule
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SomeSignature
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SomeType
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable SomeValue
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable TypeReferenceTarget
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable ValueReferenceTarget
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)variable VariableContainer
Variable does not seem to have an implementation. Please open an issue or pull request :)variable VariableOrProperty
Internal
Variable does not seem to have an implementation. Please open an issue or pull request :)function classString
Function does not seem to have an implementation. Please open an issue or pull request :)function pluralString
Function does not seem to have an implementation. Please open an issue or pull request :)function singularString
Function does not seem to have an implementation. Please open an issue or pull request :)enum ConversionFlags
Internal
Enum does not seem to have an implementation. Please open an issue or pull request :)enum ReflectionFlag
Enum does not seem to have an implementation. Please open an issue or pull request :)enum ReflectionKind
Defines the available reflection kinds.
Enum does not seem to have an implementation. Please open an issue or pull request :)enum TraverseProperty
Enum does not seem to have an implementation. Please open an issue or pull request :)enum TypeContext
Enumeration that can be used when traversing types to track the location of recursion. Used by TypeDoc internally to track when to output parenthesis when rendering.
Enum does not seem to have an implementation. Please open an issue or pull request :)enum VarianceModifier
Modifier flags for type parameters, added in TS 4.7
Enum does not seem to have an implementation. Please open an issue or pull request :)class UnknownType extends Type
Represents all unknown types that cannot be converted by TypeDoc.
- new UnknownType(name: string): UnknownType
No description.
- name: string
A string representation of the type as returned from TypeScript compiler.
- readonly type: "unknown"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(context: TypeContext): boolean
Always returns true if not at the root level, we have no idea what's in here, so wrap it in parenthesis to be extra safe.
- stringify(context: TypeContext): string
No description.
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class UnionType extends Type
Represents an union type.
let value: string | string[];
- new UnionType(types: SomeType[]): UnionType
No description.
- readonly type: "union"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(context: TypeContext): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): UnionType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class TypeOperatorType extends Type
Represents a type operator type.
class A {}
class B<T extends keyof A> {}
- new TypeOperatorType(target: SomeType,): TypeOperatorType
operator: "keyof" | "unique" | "readonly" No description.
- operator: "keyof" | "unique" | "readonly"
No description.
- readonly type: "typeOperator"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(context: TypeContext): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): TypeOperatorType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class TupleType extends Type
Represents a tuple type.
let value: [string, boolean];
- new TupleType(elements: SomeType[]): TupleType
Parameters
-
elements
: The ordered type elements of the tuple type.
-
- readonly type: "tuple"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): TupleType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class TypeParameterReflection extends Reflection
- new TypeParameterReflection(name: string,): TypeParameterReflection
parent: Reflection,
varianceModifier: undefined | VarianceModifier No description.
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
- readonly variant: "typeParam"
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
The reflection this reflection is a child of.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
No description.
- fromObject(de: Deserializer,): void
obj: TypeParameterReflection No description.
- getAlias(): string
Return an url safe alias for this reflection.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): TypeParameterReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(_callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
_callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class SignatureReflection extends Reflection
- new SignatureReflection(name: string,): SignatureReflection
kind: CallSignature | IndexSignature | ConstructorSignature | GetSignature | SetSignature,
parent: DeclarationReflection No description.
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
The reflection this reflection is a child of.
No description.
- readonly variant: "signature"
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
A type that points to the reflection this reflection is the implementation of.
Applies to class members.
A type that points to the reflection this reflection has been inherited from.
Applies to interface and class members.
A type that points to the reflection that has been overwritten by this reflection.
Applies to interface and class members.
No description.
A list of all source files that contributed to this reflection.
No description.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer, obj: SignatureReflection): void
No description.
- getAlias(): string
Return an url safe alias for this reflection.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): SignatureReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class ReferenceReflection extends DeclarationReflection
Describes a reflection which does not exist at this location, but is referenced. Used for imported reflections.
// a.ts
export const a = 1;
// b.ts
import { a } from './a';
// Here to avoid extra work we create a reference to the original reflection in module a instead
// of copying the reflection.
export { a };
- new ReferenceReflection(name: string,): ReferenceReflection
reflection: Reflection,
parent?: Reflection Creates a reference reflection. Should only be used within the factory function.
Internal
Flags for information about a reflection which is needed solely during conversion.
Internal
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
- readonly variant: "reference"
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
All children grouped by their category.
The children of this reflection.
- defaultValue?: string
The default value of this reflection.
Applies to function parameters, variables, and properties.
- escapedName?: any
The escaped name of this declaration assigned by the TS compiler if there is an associated symbol. This is used to retrieve properties for analyzing inherited members.
Not serialized, only useful during conversion.
Internal
A list of all types that extend this reflection (e.g. the subclasses).
A list of all types this reflection extends (e.g. the parent classes).
The get signature of this declaration.
All children grouped by their kind.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
A type that points to the reflection this reflection is the implementation of.
Applies to class members.
A list of all types that implement this reflection.
A list of all types this reflection implements.
The index signature of this declaration.
A type that points to the reflection this reflection has been inherited from.
Applies to interface and class members.
A type that points to the reflection that has been overwritten by this reflection.
Applies to interface and class members.
- packageVersion?: string
The version of the module when found.
The reflection this reflection is a child of.
The contents of the readme file of the module when found.
- relevanceBoost?: number
A precomputed boost derived from the searchCategoryBoosts and searchGroupBoosts options, used when boosting search relevance scores at runtime. May be modified by plugins.
The set signature of this declaration.
A list of call signatures attached to this declaration.
TypeDoc creates one declaration per function that may contain one or more signature reflections.
A list of all source files that contributed to this reflection.
The type of the reflection.
If the reflection represents a variable or a property, this is the value type.<br /> If the reflection represents a signature, this is the return type.
Contains a simplified representation of the type hierarchy suitable for being rendered in templates.
No description.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer, obj: ReferenceReflection): void
No description.
- getAlias(): string
Return an url safe alias for this reflection.
No description.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
Return a list of all children of a certain kind.
Parameters
-
kind
: The desired kind of children.
Returns An array containing all children with the desired kind.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
Internal
Gets the reflection that is referenced. This may be another reference reflection. To fully resolve any references, use
getTargetReflectionDeep
.Gets the reflection that is referenced, this will fully resolve references. To only resolve one reference, use
getTargetReflection
.- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): ReferenceReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- tryGetTargetReflection(): undefined | Reflection
Tries to get the reflection that is referenced. This may be another reference reflection. To fully resolve any references, use
tryGetTargetReflectionDeep
.- tryGetTargetReflectionDeep(): undefined | Reflection
Tries to get the reflection that is referenced, this will fully resolve references. To only resolve one reference, use
tryGetTargetReflection
.- visit(visitor: ReflectionVisitor): void
No description.
class ProjectReflection extends ContainerReflection
A reflection that represents the root of the project.
The project reflection acts as a global index, one may receive all reflections and source files of the processed project through this reflection.
- new ProjectReflection(name: string): ProjectReflection
No description.
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
A list of all reflections within the project. DO NOT MUTATE THIS OBJECT. All mutation should be done via
registerReflection
andremoveReflection
to ensure that links to reflections remain valid.This may be replaced with a
Map<number, Reflection>
someday.- readonly variant: "project"
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
All children grouped by their category.
The children of this reflection.
All children grouped by their kind.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
- packageName?: string
The name of the package that this reflection documents according to package.json.
- packageVersion?: string
The version of the package that this reflection documents according to package.json.
The reflection this reflection is a child of.
The contents of the readme.md file of the project when found.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer, obj: ProjectReflection): void
No description.
- getAlias(): string
Return an url safe alias for this reflection.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
Return a list of all children of a certain kind.
Parameters
-
kind
: The desired kind of children.
Returns An array containing all children with the desired kind.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
- getReflectionById(id: number): undefined | Reflection
Gets the reflection registered for the given reflection ID, or undefined if it is not present in the project.
- getReflectionFromSymbol(symbol: Symbol): undefined | Reflection
Gets the reflection associated with the given symbol, if it exists.
Internal
- getReflectionFromSymbolId(symbolId: ReflectionSymbolId): undefined | Reflection
Gets the reflection associated with the given symbol id, if it exists. If there are multiple reflections associated with this symbol, gets the first one.
Internal
- getReflectionsByKind(kind: ReflectionKind): Reflection[]
Return a list of all reflections in this project of a certain kind.
Parameters
-
kind
: The desired kind of reflection.
Returns An array containing all reflections with the desired kind.
-
- getReflectionsFromSymbolId(symbolId: ReflectionSymbolId): Reflection[]
Internal
- getSymbolFromReflection(reflection: Reflection): any
THIS MAY NOT BE USED AFTER CONVERSION HAS FINISHED.
Internal
- getSymbolIdFromReflection(reflection: Reflection): undefined | ReflectionSymbolId
Internal
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- registerReflection(reflection: Reflection,): void
symbol?: any Registers the given reflection so that it can be quickly looked up by helper methods. Should be called for every reflection added to the project.
- registerSymbolId(reflection: Reflection,): void
id: ReflectionSymbolId Internal
- removeReflection(reflection: Reflection): void
Removes a reflection from the documentation. Can be used by plugins to filter reflections out of the generated documentation. Has no effect if the reflection is not present in the project.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): ProjectReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class ParameterReflection extends Reflection
- new ParameterReflection(name: string,): ParameterReflection
kind: ReflectionKind,
parent?: Reflection No description.
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
- readonly variant: "param"
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
- defaultValue?: string
No description.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
The reflection this reflection is a child of.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer, obj: ParameterReflection): void
No description.
- getAlias(): string
Return an url safe alias for this reflection.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): ParameterReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class DeclarationReflection extends ContainerReflection
A reflection that represents a single declaration emitted by the TypeScript compiler.
All parts of a project are represented by DeclarationReflection instances. The actual kind of a reflection is stored in its ´kind´ member.
- new DeclarationReflection(name: string,): DeclarationReflection
kind: ReflectionKind,
parent?: Reflection No description.
Flags for information about a reflection which is needed solely during conversion.
Internal
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
- readonly variant: "declaration" | "reference"
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
All children grouped by their category.
The children of this reflection.
- defaultValue?: string
The default value of this reflection.
Applies to function parameters, variables, and properties.
- escapedName?: any
The escaped name of this declaration assigned by the TS compiler if there is an associated symbol. This is used to retrieve properties for analyzing inherited members.
Not serialized, only useful during conversion.
Internal
A list of all types that extend this reflection (e.g. the subclasses).
A list of all types this reflection extends (e.g. the parent classes).
The get signature of this declaration.
All children grouped by their kind.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
A type that points to the reflection this reflection is the implementation of.
Applies to class members.
A list of all types that implement this reflection.
A list of all types this reflection implements.
The index signature of this declaration.
A type that points to the reflection this reflection has been inherited from.
Applies to interface and class members.
A type that points to the reflection that has been overwritten by this reflection.
Applies to interface and class members.
- packageVersion?: string
The version of the module when found.
The reflection this reflection is a child of.
The contents of the readme file of the module when found.
- relevanceBoost?: number
A precomputed boost derived from the searchCategoryBoosts and searchGroupBoosts options, used when boosting search relevance scores at runtime. May be modified by plugins.
The set signature of this declaration.
A list of call signatures attached to this declaration.
TypeDoc creates one declaration per function that may contain one or more signature reflections.
A list of all source files that contributed to this reflection.
The type of the reflection.
If the reflection represents a variable or a property, this is the value type.<br /> If the reflection represents a signature, this is the return type.
Contains a simplified representation of the type hierarchy suitable for being rendered in templates.
No description.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer,): void
obj: DeclarationReflection | ProjectReflection No description.
- getAlias(): string
Return an url safe alias for this reflection.
No description.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
Return a list of all children of a certain kind.
Parameters
-
kind
: The desired kind of children.
Returns An array containing all children with the desired kind.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
Internal
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): DeclarationReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class ContainerReflection extends Reflection
- new ContainerReflection(name: string,): ContainerReflection
kind: ReflectionKind,
parent?: Reflection No description.
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
- abstract readonly variant: keyof ReflectionVariant
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
All children grouped by their category.
The children of this reflection.
All children grouped by their kind.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
The reflection this reflection is a child of.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer, obj: ContainerReflection): void
No description.
- getAlias(): string
Return an url safe alias for this reflection.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
Return a list of all children of a certain kind.
Parameters
-
kind
: The desired kind of children.
Returns An array containing all children with the desired kind.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): ContainerReflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class Reflection
Base class for all reflection classes.
While generating a documentation, TypeDoc generates an instance of ProjectReflection
as the root for all reflections within the project. All other reflections are represented
by the DeclarationReflection
class.
This base class exposes the basic properties one may use to traverse the reflection tree.
You can use the ContainerReflection.children
and parent
properties to walk the tree. The ContainerReflection.groups
property
contains a list of all children grouped and sorted for rendering.
- new Reflection(name: string,): Reflection
kind: ReflectionKind,
parent?: Reflection No description.
No description.
- id: number
Unique id of this reflection.
The kind of this reflection.
- name: string
The symbol name of this reflection.
No description.
- abstract readonly variant: keyof ReflectionVariant
Discriminator representing the type of reflection represented by this object.
- anchor?: string
The name of the anchor of this child. TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
- hasOwnDocument?: boolean
Is the url pointing to an individual document?
When FALSE, the url points to an anchor tag on a page of a different reflection. TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
The reflection this reflection is a child of.
- url?: string
The url of this reflection in the generated documentation. TODO: Reflections shouldn't know urls exist. Move this to a serializer.
- fromObject(de: Deserializer, obj: Reflection): void
No description.
- getAlias(): string
Return an url safe alias for this reflection.
- getChildByName(arg: string | string[]): undefined | Reflection
Return a child by its name.
Parameters
-
arg
: The name hierarchy of the child to look for.
Returns The found child or undefined.
-
- getFriendlyFullName(): string
Return the full name of this reflection, with signature names dropped if possible without introducing ambiguity in the name.
- getFullName(separator: string = "."): string
Return the full name of this reflection. Intended for use in debugging. For log messages intended to be displayed to the user for them to fix, prefer
getFriendlyFullName
instead.The full name contains the name of this reflection and the names of all parent reflections.
Parameters
-
separator
: Separator used to join the names of the reflections.
Returns The full name of this reflection.
-
- hasComment(): boolean
Has this reflection a visible comment?
Returns TRUE when this reflection has a visible comment.
- hasGetterOrSetter(): boolean
No description.
- isDeclaration(): this
No description.
- isDeprecated(): boolean
Check if this reflection or any of its parents have been marked with the
@deprecated
tag.- isProject(): this
Return whether this reflection is the root / project reflection.
- kindOf(kind: ReflectionKind | ReflectionKind[]): boolean
Test whether this reflection is of the given kind.
- setFlag(flag: ReflectionFlag, value: boolean = true): void
Set a flag on this reflection.
- toObject(serializer: Serializer): Reflection
No description.
- toString(): string
Return a string representation of this reflection.
- toStringHierarchy(indent: string = ""): string
Return a string representation of this reflection and all of its children.
Note: This is intended as a debug tool only, output may change between patch versions.
Parameters
-
indent
: Used internally to indent child reflections.
-
- abstract traverse(callback: TraverseCallback): void
Traverse most potential child reflections of this reflection.
Note: This may not necessarily traverse child reflections contained within the
type
property of the reflection, and should not be relied on for this. Support for checking object types will likely be removed in v0.26.The given callback will be invoked for all children, signatures and type parameters attached to this reflection.
Parameters
-
callback
: The callback function that should be applied for each child reflection.
-
- visit(visitor: ReflectionVisitor): void
No description.
class TemplateLiteralType extends Type
TS 4.1 template literal types
type Z = `${'a' | 'b'}${'a' | 'b'}`
- new TemplateLiteralType(head: string,): TemplateLiteralType
tail: Array<[SomeType, string]> No description.
- head: string
No description.
- readonly type: "templateLiteral"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): TemplateLiteralType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class RestType extends Type
Represents a rest type
type Z = [1, ...2[]]
// ^^^^^^
- new RestType(elementType: SomeType): RestType
No description.
No description.
- readonly type: "rest"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): RestType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class ReflectionType extends Type
Represents a type which has it's own reflection like literal types.
This type will likely go away at some point and be replaced by a dedicated
ObjectType
. Allowing reflections to be nested within types causes much
pain in the rendering code.
let value: { a: string, b: number };
- new ReflectionType(declaration: DeclarationReflection): ReflectionType
No description.
No description.
- readonly type: "reflection"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): "Function" | "Object"
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): ReflectionType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class ReferenceType extends Type
Represents a type that refers to another reflection like a class, interface or enum.
let value: MyClass<T>;
- name: string
The name of the referenced type.
If the symbol cannot be found because it's not part of the documentation this can be used to represent the type.
- preferValues: boolean
If set, will prefer reflections with
ReflectionKinds
which represent values rather than those which represent types.- qualifiedName: string
The fully qualified name of the referenced type, relative to the file it is defined in. This will usually be the same as
name
, unless namespaces are used.- refersToTypeParameter: boolean
If set, no warnings about something not being exported should be created since this may be referring to a type created with
infer X
which will not be registered on the project.- readonly type: "reference"
The type name identifier.
- externalUrl?: string
If this reference type refers to a reflection defined by a project not being rendered, points to the url that this type should be linked to.
- package?: string
The package that this type is referencing.
The type arguments of this reference.
- reflection():
No description.
- symbolId():
No description.
- fromObject(de: Deserializer, obj: ReferenceType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- isIntentionallyBroken(): boolean
Checks if this type is a reference type because it uses a name, but is intentionally not pointing to a reflection. This happens for type parameters and when representing a mapped type.
- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
Convert this reference type to a declaration reference used for resolution of external types.
- toObject(serializer: Serializer): ReferenceType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
- static createBrokenReference(name: string,): ReferenceType
project: ProjectReflection This is used for type parameters, which don't actually point to something, and also for temporary references which will be cleaned up with real references later during conversion.
Internal
- static createResolvedReference(name: string,): ReferenceType
target: number | Reflection,
project: | ProjectReflection No description.
- static createSymbolReference(symbol: Symbol,): ReferenceType
context: Context,
name?: string No description.
class QueryType extends Type
Represents a type that is constructed by querying the type of a reflection.
const x = 1
type Z = typeof x // query on reflection for x
- new QueryType(queryType: ReferenceType): QueryType
No description.
No description.
- readonly type: "query"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): QueryType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class PredicateType extends Type
Represents a type predicate.
function isString(x: unknown): x is string {}
function assert(condition: boolean): asserts condition {}
- new PredicateType(name: string,): PredicateType
asserts: boolean,
targetType?: SomeType Create a new PredicateType instance.
Parameters
-
name
: The identifier name which is tested by the predicate. -
asserts
: True if the type is of the formasserts val is string
, false if the type is of the formval is string
-
targetType
: The type that the identifier is tested to be. May be undefined if the type is of the formasserts val
. Will be defined if the type is of the formasserts val is string
orval is string
.
-
- asserts: boolean
True if the type is of the form
asserts val is string
, false if the type is of the formval is string
- name: string
The identifier name which is tested by the predicate.
- readonly type: "predicate"
The type name identifier.
The type that the identifier is tested to be. May be undefined if the type is of the form
asserts val
. Will be defined if the type is of the formasserts val is string
orval is string
.- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Return a string representation of this type.
- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): PredicateType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class OptionalType extends Type
Represents an optional type
type Z = [1, 2?]
// ^^
- new OptionalType(elementType: SomeType): OptionalType
No description.
No description.
- readonly type: "optional"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): OptionalType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class NamedTupleMember extends Type
Represents a named member of a tuple type.
let value: [name: string];
- new NamedTupleMember(name: string,): NamedTupleMember
isOptional: boolean,
element: SomeType No description.
- isOptional: boolean
No description.
- name: string
No description.
- readonly type: "namedTupleMember"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Return a string representation of this type.
- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): NamedTupleMemberType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class MappedType extends Type
Represents a mapped type.
{ -readonly [K in Parameter as Name]?: Template }
- new MappedType(parameter: string,): MappedType
parameterType: SomeType,
templateType: SomeType,
readonlyModifier?: "+" | "-",
optionalModifier?: "+" | "-",
nameType?: SomeType No description.
- parameter: string
No description.
No description.
No description.
- readonly type: "mapped"
The type name identifier.
- optionalModifier?: "+" | "-"
No description.
- readonlyModifier?: "+" | "-"
No description.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): MappedType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class LiteralType extends Type
Represents a literal type.
type A = "A"
type B = 1
- new LiteralType(value: | string | number | bigint | boolean): LiteralType
No description.
- readonly type: "literal"
The type name identifier.
- value: | string | number | bigint | boolean
No description.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Return a string representation of this type.
- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class IntrinsicType extends Type
Represents an intrinsic type like string
or boolean
.
let value: number;
- new IntrinsicType(name: string): IntrinsicType
No description.
- name: string
No description.
- readonly type: "intrinsic"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class IntersectionType extends Type
Represents an intersection type.
let value: A & B;
- new IntersectionType(types: SomeType[]): IntersectionType
No description.
- readonly type: "intersection"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(context: TypeContext): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): IntersectionType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class InferredType extends Type
Represents an inferred type, U in the example below.
type Z = Promise<string> extends Promise<infer U> : never
- new InferredType(name: string,): InferredType
constraint?: SomeType No description.
- name: string
No description.
- readonly type: "inferred"
The type name identifier.
No description.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(context: TypeContext): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): InferredType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class IndexedAccessType extends Type
Represents an indexed access type.
No description.
No description.
- readonly type: "indexedAccess"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): IndexedAccessType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class ConditionalType extends Type
Represents a conditional type.
let value: Check extends Extends ? True : False;
No description.
No description.
- readonly type: "conditional"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(context: TypeContext): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): ConditionalType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class ArrayType extends Type
Represents an array type.
let value: string[];
- new ArrayType(elementType: SomeType): ArrayType
Parameters
-
elementType
: The type of the elements in the array.
-
The type of the elements in the array.
- readonly type: "array"
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- needsParenthesis(): boolean
No description.
- stringify(context: TypeContext): string
No description.
- toObject(serializer: Serializer): ArrayType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class Type
Base class of all type definitions.
- abstract readonly type: keyof TypeKindMap
The type name identifier.
- fromObject(_de: Deserializer, _obj: SomeType): void
No description.
- abstract getTypeString(): string
Implementation method for
toString
.needsParenthesis
will be used to determine if the returned string should be wrapped in parenthesis.- abstract needsParenthesis(context: TypeContext): boolean
No description.
- stringify(context: TypeContext): string
No description.
- abstract toObject(serializer: Serializer): SomeType
No description.
- toString(): string
Return a string representation of this type.
- visit<T>(visitor: Partial<TypeVisitor<T>>): undefined | T
- visit<T>(visitor: TypeVisitor<T>): T
Visit this type, returning the value returned by the visitor.
class Comment
A model that represents a comment.
Instances of this model are created by the CommentPlugin. You can retrieve comments
through the DeclarationReflection.comment
property.
- new Comment(summary: CommentDisplayPart[] = [],): Comment
blockTags: CommentTag[] = [],
modifierTags: Set<`@${string}`> = ... Creates a new Comment instance.
All associated block level tags.
- modifierTags: Set<`@${string}`>
All modifier tags present on the comment, e.g.
@alpha
,@beta
.The content of the comment which is not associated with a block tag.
- label?: string
Label associated with this reflection, if any (https://tsdoc.org/pages/tags/label/)
- fromObject(de: Deserializer, obj: Comment): void
No description.
- getIdentifiedTag(identifier: string,): undefined | CommentTag
tagName: `@${string}` No description.
- getTag(tagName: `@${string}`): undefined | CommentTag
Return the first tag with the given name.
Parameters
-
tagName
: The name of the tag to look for.
Returns The found tag or undefined.
-
- getTags(tagName: `@${string}`): CommentTag[]
Get all tags with the given tag name.
- hasModifier(tagName: `@${string}`): boolean
Test whether this comment contains a tag with the given name.
Parameters
-
tagName
: The name of the tag to look for.
Returns TRUE when this comment contains a tag with the given name, otherwise FALSE.
-
- hasVisibleComponent(): boolean
Has this comment a visible component?
Returns TRUE when this comment has a visible component.
- isEmpty(): boolean
Returns true if this comment is completely empty.
Internal
- removeModifier(tagName: `@${string}`): void
No description.
- removeTags(tagName: `@${string}`): void
Removes all block tags with the given tag name from the comment.
- toObject(serializer: Serializer): Comment
No description.
- static cloneDisplayParts(parts: readonly CommentDisplayPart[]): Array<{kind: "text",} | {
text: stringkind: "code",} | {
text: stringkind: "inline-tag",}>
tag: `@${string}`,
text: string,
target: string | Reflection | ReflectionSymbolId,
tsLinkText: string Helper utility to clone
Comment.summary
orCommentTag.content
- static combineDisplayParts(parts: undefined | readonly CommentDisplayPart[]): string
Debugging utility for combining parts into a simple string. Not suitable for rendering, but can be useful in tests.
- static deserializeDisplayParts(de: Deserializer,): CommentDisplayPart[]
parts: CommentDisplayPart[] No description.
- static displayPartsToMarkdown(parts: readonly CommentDisplayPart[],): string
urlTo: (ref: Reflection) => string Helper function to convert an array of comment display parts into markdown suitable for passing into Marked.
urlTo
will be used to resolve urls to any reflections linked to with@link
tags.- static serializeDisplayParts(serializer: Serializer,): CommentDisplayPart[]
parts: CommentDisplayPart[] No description.
- static splitPartsToHeaderAndBody(parts: readonly CommentDisplayPart[]): { body: CommentDisplayPart[], header: string }
Splits the provided parts into a header (first line, as a string) and body (remaining lines). If the header line contains inline tags they will be serialized to a string.
class CommentTag
A model that represents a single TypeDoc comment tag.
Tags are stored in the Comment.blockTags
property.
- new CommentTag(tag: `@${string}`,): CommentTag
text: CommentDisplayPart[] Create a new CommentTag instance.
The actual body text of this tag.
- tag: `@${string}`
The name of this tag, e.g.
@returns
,@example
- name?: string
Some tags, (
@typedef
,@param
,@property
, etc.) may have a user defined identifier associated with them. If this tag is one of those, it will be parsed out and included here.- clone(): CommentTag
No description.
- fromObject(de: Deserializer, obj: CommentTag): void
No description.
- toObject(serializer: Serializer): CommentTag
No description.
class ReflectionCategory
A category of reflections.
Reflection categories are created by the ´CategoryPlugin´ in the resolving phase of the dispatcher. The main purpose of categories is to be able to more easily render human readable children lists in templates.
- new ReflectionCategory(title: string): ReflectionCategory
Create a new ReflectionCategory instance.
Parameters
-
title
: The title of this category.
-
All reflections of this category.
- title: string
The title, a string representation of this category.
The user specified description, if any, set with
@categoryDescription
- allChildrenHaveOwnDocument(): boolean
Do all children of this category have a separate document?
- fromObject(de: Deserializer, obj: ReflectionCategory): void
No description.
- toObject(serializer: Serializer): ReflectionCategory
No description.
class ReflectionFlags extends Array<string>
This must extend Array in order to work with Handlebar's each helper.
- new ReflectionFlags(arrayLength: number): ReflectionFlags
- new ReflectionFlags(...items: string[]): ReflectionFlags
No description.
No description.
- isAbstract():
No description.
- isConst():
No description.
- isExternal():
No description.
- isOptional():
No description.
- isPrivate():
No description.
- isProtected():
No description.
- isPublic():
No description.
- isReadonly():
No description.
- isRest():
No description.
- isStatic():
No description.
- fromObject(obj: ReflectionFlags): void
No description.
- hasFlag(flag: ReflectionFlag): boolean
No description.
- setFlag(flag: ReflectionFlag, set: boolean): void
No description.
No description.
class ReflectionGroup
A group of reflections. All reflections in a group are of the same kind.
Reflection groups are created by the ´GroupHandler´ in the resolving phase of the dispatcher. The main purpose of groups is to be able to more easily render human readable children lists in templates.
- new ReflectionGroup(title: string,): ReflectionGroup
owningReflection: Reflection Create a new ReflectionGroup instance.
Parameters
-
title
: The title of this group. -
owningReflection
: The reflection containing this group, useful for changing rendering based on a comment on a reflection.
-
All reflections of this group.
- readonly owningReflection: Reflection
The reflection containing this group, useful for changing rendering based on a comment on a reflection.
- title: string
The title, a string representation of the typescript kind, of this group.
Categories contained within this group.
User specified description via
@groupDescription
, if specified.- allChildrenHaveOwnDocument(): boolean
Do all children of this group have a separate document?
- fromObject(de: Deserializer, obj: ReflectionGroup): void
No description.
- toObject(serializer: Serializer): ReflectionGroup
No description.
class ReflectionSymbolId
This exists so that TypeDoc can store a unique identifier for a ts.Symbol
without
keeping a reference to the ts.Symbol
itself. This identifier should be stable across
runs so long as the symbol is exported from the same file.
- new ReflectionSymbolId(symbol: Symbol,): ReflectionSymbolId
declaration?: any No description.
- readonly fileName: string
No description.
- pos: number
Note: This is not serialized. It exists for sorting by declaration order, but should not be needed when deserializing from JSON. Will be set to
Infinity
if the ID was deserialized from JSON.- readonly qualifiedName: string
No description.
- transientId: number
Note: This is not serialized. It exists to support detection of the differences between symbols which share declarations, but are instantiated with different type parameters. This will be
NaN
if the symbol reference is not transient. Note: This can only be non-NaN ifpos
is finite.No description.
- toObject(serializer: Serializer): { qualifiedName: string, sourceFileName: string }
No description.
class SourceReference
Represents references of reflections to their defining source files.
See also
DeclarationReflection.sources
- new SourceReference(fileName: string,): SourceReference
line: number,
character: number No description.
- character: number
The index of the character that emitted the declaration.
- fileName: string
The filename of the source file.
- fullFileName: string
The absolute filename of the source file.
Internal
- line: number
The one based number of the line that emitted the declaration.
- url?: string
URL for displaying the source file.
- equals(other: SourceReference): boolean
No description.
- fromObject(_de: Deserializer, obj: SourceReference): void
No description.
No description.
interface DeclarationHierarchy
Stores hierarchical type data.
See also
DeclarationReflection.typeHierarchy
- isTarget?: boolean
Is this the entry containing the target type?
The next hierarchy level.
interface InlineTagDisplayPart
The @link
, @linkcode
, and @linkplain
tags may have a target
property set indicating which reflection/url they link to. They may also
have a tsLinkText
property which includes the part of the text
which
TypeScript thinks should be displayed as the link text.
- kind: "inline-tag"
No description.
- tag: `@${string}`
No description.
- text: string
No description.
- target?: string | Reflection | ReflectionSymbolId
No description.
- tsLinkText?: string
No description.
interface ReflectionVariant
A map of known Reflection
concrete subclasses.
This is used during deserialization to reconstruct serialized objects.
No description.
No description.
No description.
No description.
No description.
No description.
interface TraverseCallback
interface TypeKindMap
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
No description.
function makeRecursiveVisitor
Function does not seem to have an implementation. Please open an issue or pull request :)function splitUnquotedString
Function does not seem to have an implementation. Please open an issue or pull request :)enum EntryPointStrategy
Defines how entry points are interpreted.
Enum does not seem to have an implementation. Please open an issue or pull request :)enum LogLevel
List of known log levels. Used to specify the urgency of a log message.
Enum does not seem to have an implementation. Please open an issue or pull request :)class Application extends ChildableComponent<Application, AbstractComponent<Application>>
The default TypeDoc main application class.
This class holds the two main components of TypeDoc, the Converter
and
the Renderer
. When running TypeDoc, first the Converter
is invoked which
generates a ProjectReflection
from the passed in source files. The
ProjectReflection
is a hierarchical model representation of the TypeScript
project. Afterwards the model is passed to the Renderer
which uses an instance
of Theme
to generate the final documentation.
Both the Converter
and the Renderer
emit a series of events while processing the project.
Subscribe to these Events to control the application flow or alter the output.
- componentName: string
The name of this component as set by the
@Component
decorator.The deserializer used to restore previously serialized JSON output.
The serializer used to generate JSON output.
- static readonly EVENT_BOOTSTRAP_END: string
Emitted after plugins have been loaded and options have been read, but before they have been frozen. The listener will be given an instance of
Application
.- static readonly EVENT_PROJECT_REVIVE: string
Emitted after a project has been deserialized from JSON. The listener will be given an instance of
ProjectReflection
.- static readonly EVENT_VALIDATE_PROJECT: string
Emitted when validation is being run. The listener will be given an instance of
ProjectReflection
.- static VERSION: string
The version number of TypeDoc.
- application():
No description.
Internal
- entryPoints():
Internal
- owner():
No description.
Internal
- addComponent<T extends AbstractComponent<Application>>(name: string,): T
componentClass: T | ComponentClass<T, Application> No description.
No description.
- convert(): Promise<undefined | ProjectReflection>
Run the converter for the given set of files and return the generated reflections.
Returns An instance of ProjectReflection on success, undefined otherwise.
- convertAndWatch(success: (project: ProjectReflection) => Promise<void>): void
No description.
- generateDocs(project: ProjectReflection,): Promise<void>
out: string Render HTML for the given project
- generateJson(project: ProjectReflection,): Promise<void>
out: string Write the reflections to a json file.
Parameters
-
out
: The path and file name of the target file.
Returns Whether the JSON file could be written successfully.
-
- getComponent(name: string): undefined | AbstractComponent<Application>
Retrieve a plugin instance.
Returns The instance of the plugin or undefined if no plugin with the given class is attached.
- getComponents(): AbstractComponent<Application>[]
No description.
- getEntryPoints(): undefined | DocumentationEntryPoint[]
Gets the entry points to be documented according to the current
entryPoints
andentryPointStrategy
options. May return undefined if entry points fail to be expanded.- getTypeScriptPath(): string
Return the path to the TypeScript compiler.
- getTypeScriptVersion(): string
No description.
- hasComponent(name: string): boolean
No description.
- initialize(): void
Initialize this component.
- listenTo(obj: EventDispatcher,): Application
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- removeAllComponents(): void
No description.
- removeComponent(name: string): undefined | AbstractComponent<Application>
No description.
- stopListening(obj?: EventDispatcher,): Application
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
- toString(): string
Print the version number.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).- validate(project: ProjectReflection): void
No description.
- static bootstrap(options: Partial<TypeDocOptions> = {},): Promise<Application>
readers: readonly OptionsReader[] = DEFAULT_READERS Initialize TypeDoc without loading plugins.
Parameters
-
options
: Options to set during initialization -
readers
: Option readers to use to discover options from config files.
Example
Initialize the application with pretty-printing output disabled.
const app = Application.bootstrap({ pretty: false });
-
- static bootstrapWithPlugins(options: Partial<TypeDocOptions> = {},): Promise<Application>
readers: readonly OptionsReader[] = DEFAULT_READERS Initialize TypeDoc, loading plugins if applicable.
class Context
The context describes the current state the converter is in.
- new Context(converter: Converter,): Context
programs: readonly Program[],
project: ProjectReflection,
scope: Reflection = project Create a new Context instance.
Parameters
-
converter
: The converter instance that has created the context.
Internal
-
- convertingClassOrInterface: boolean
No description.
- convertingTypeNode: boolean
No description.
- readonly programs: readonly Program[]
All programs being converted.
- readonly project: ProjectReflection
The project that is currently processed.
- readonly scope: Reflection
The scope or parent reflection that is currently processed.
- shouldBeStatic: boolean
No description.
- checker():
No description.
- logger():
No description.
- program():
No description.
- addChild(reflection: DeclarationReflection): void
No description.
- createDeclarationReflection(kind: ReflectionKind,): DeclarationReflection
symbol: any,
exportSymbol: any,
nameOverride?: string No description.
- expectSymbolAtLocation(node: Node): Symbol
No description.
- finalizeDeclarationReflection(reflection: DeclarationReflection): void
No description.
- getComment(symbol: Symbol,): undefined | Comment
kind: ReflectionKind No description.
- getFileComment(node: SourceFile): undefined | Comment
No description.
- getJsDocComment(declaration: any): undefined | Comment
No description.
- getNodeComment(node: Node,): undefined | Comment
kind: ReflectionKind No description.
- getSignatureComment(declaration: any): undefined | Comment
No description.
- getSymbolAtLocation(node: Node): any
No description.
- getTypeAtLocation(node: Node): any
Return the type declaration of the given node.
Parameters
-
node
: The TypeScript node whose type should be resolved.
Returns The type declaration of the given node.
-
- postReflectionCreation(reflection: Reflection,): void
symbol: any,
exportSymbol: any No description.
- registerReflection(reflection: Reflection, symbol: any): void
Register a newly generated reflection. All created reflections should be passed to this method to ensure that the project helper functions work correctly.
Parameters
-
reflection
: The reflection that should be registered. -
symbol
: The symbol the given reflection was resolved from.
-
- resolveAliasedSymbol(symbol: Symbol): Symbol
No description.
- setActiveProgram(program: any): void
Internal
- shouldIgnore(symbol: Symbol): any
No description.
- trigger(name: string,): void
reflection: Reflection,
node?: any Trigger a node reflection event.
All events are dispatched on the current converter instance.
Parameters
-
name
: The name of the event that should be triggered. -
reflection
: The triggering reflection. -
node
: The triggering TypeScript node if available.
-
- withScope(scope: Reflection): Context
No description.
class Converter extends ChildableComponent<Application, ConverterComponent>
Compiles source files using TypeScript and converts compiler symbols to reflections.
- new Converter(owner: Application): Converter
No description.
- componentName: string
The name of this component as set by the
@Component
decorator.- static readonly EVENT_BEGIN: "begin"
Triggered when the converter begins converting a project. The listener will be given a
Context
object.- static readonly EVENT_CREATE_DECLARATION: "createDeclaration"
Triggered when the converter has created a declaration reflection. The listener will be given
Context
and aModels.DeclarationReflection
.- static readonly EVENT_CREATE_PARAMETER: "createParameter"
Triggered when the converter has created a parameter reflection. The listener will be given
Context
,Models.ParameterReflection
and ats.Node?
- static readonly EVENT_CREATE_SIGNATURE: "createSignature"
Triggered when the converter has created a signature reflection. The listener will be given
Context
,Models.SignatureReflection
|Models.ProjectReflection
the declaration,ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined
, andts.Signature | undefined
. The signature will be undefined if the created signature is an index signature.- static readonly EVENT_CREATE_TYPE_PARAMETER: "createTypeParameter"
Triggered when the converter has created a type parameter reflection. The listener will be given
Context
and aModels.TypeParameterReflection
- static readonly EVENT_END: "end"
Triggered when the converter has finished converting a project. The listener will be given a
Context
object.- static readonly EVENT_RESOLVE: "resolveReflection"
Triggered when the converter resolves a reflection. The listener will be given
Context
and aReflection
.- static readonly EVENT_RESOLVE_BEGIN: "resolveBegin"
Triggered when the converter begins resolving a project. The listener will be given
Context
.- static readonly EVENT_RESOLVE_END: "resolveEnd"
Triggered when the converter has finished resolving a project. The listener will be given
Context
.- application():
No description.
- commentStyle():
Internal
- config():
No description.
Internal
Internal
Internal
Internal
Internal
Internal
Internal
Internal
- owner():
No description.
Internal
Internal
- validation():
Internal
- addComponent<T extends ConverterComponent>(name: string,): T
componentClass: T | ComponentClass<T, Application> No description.
- addUnknownSymbolResolver(resolver: ExternalSymbolResolver): void
Adds a new resolver that the theme can use to try to figure out how to link to a symbol declared by a third-party library which is not included in the documentation.
The resolver function will be passed a declaration reference which it can attempt to resolve. If resolution fails, the function should return undefined.
Note: This will be used for both references to types declared in node_modules (in which case the reference passed will have the
moduleSource
set and thesymbolReference
will navigate via.
) and user defined {@link} tags which cannot be resolved. If the link being resolved is inferred from a type, then nopart
will be passed to the resolver function.Since
0.22.14
- convert(entryPoints: readonly DocumentationEntryPoint[]): ProjectReflection
Compile the given source files and create a project reflection for them.
- convertSymbol(context: Context,): void
symbol: Symbol,
exportSymbol?: any Internal
- convertType(context: Context, node: any): SomeType
Convert the given TypeScript type into its TypeDoc type reflection.
Parameters
-
context
: The context object describing the current state the converter is in.
Returns The TypeDoc type reflection representing the given node and type.
Internal
-
- getComponent(name: string): undefined | ConverterComponent
Retrieve a plugin instance.
Returns The instance of the plugin or undefined if no plugin with the given class is attached.
- getComponents(): ConverterComponent[]
No description.
- hasComponent(name: string): boolean
No description.
- initialize(): void
Initialize this component.
- isExternal(symbol: Symbol): any
Internal
- listenTo(obj: EventDispatcher,): Converter
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- parseRawComment(file: MinimalSourceFile): Comment
Parse the given file into a comment. Intended to be used with markdown files.
- removeAllComponents(): void
No description.
- removeComponent(name: string): undefined | ConverterComponent
No description.
- resolveExternalLink(ref: DeclarationReference,): undefined | string | ExternalResolveResult
refl: Reflection,
part: undefined | CommentDisplayPart,
symbolId: undefined | ReflectionSymbolId Internal
- resolveLinks(comment: Comment, owner: Reflection): void
- resolveLinks(parts: readonly CommentDisplayPart[],): CommentDisplayPart[]
owner: Reflection No description.
- shouldIgnore(symbol: Symbol): any
Used to determine if we should immediately bail when creating a reflection. Note: This should not be used for excludeNotDocumented because we don't have enough information at this point since comment discovery hasn't happened.
Internal
- stopListening(obj?: EventDispatcher,): Converter
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).
class DefaultTheme extends Theme
Default theme implementation of TypeDoc. If a theme does not provide a custom
Theme
implementation, this theme class will be used.
- new DefaultTheme(renderer: Renderer): DefaultTheme
Create a new DefaultTheme instance.
Parameters
-
renderer
: The renderer this theme is attached to.
-
- componentName: string
The name of this component as set by the
@Component
decorator.- icons: {1: () => Element,}
1024: () => Element,
1048576: () => Element,
128: () => Element,
131072: () => Element,
16: () => Element,
16384: () => Element,
2: () => Element,
2048: () => Element,
2097152: () => Element,
256: () => Element,
262144: () => Element,
32: () => Element,
32768: () => Element,
4: () => Element,
4096: () => Element,
4194304: () => Element,
512: () => Element,
524288: () => Element,
64: () => Element,
65536: () => Element,
8: () => Element,
8192: () => Element,
anchor: () => Element,
checkbox: () => Element,
chevronDown: () => Element,
chevronSmall: () => Element,
menu: () => Element,
search: () => Element The icons which will actually be rendered. The source of truth lives on the theme, and the
DefaultThemeRenderContext.icons
member will produce references to these.These icons will be written twice. Once to an
icons.svg
file in the assets directory which will be referenced by icons on the context, and once to anicons.js
file so that references to the icons can be dynamically embedded within the page for use by the search dropdown and when loading the page onfile://
urls.Custom themes may overwrite this entire object or individual properties on it to customize the icons used within the page, however TypeDoc currently assumes that all icons are svg elements, so custom themes must also use svg elements.
- markedPlugin: MarkedPlugin
Internal
- static URL_PREFIX: RegExp
No description.
- application():
No description.
- owner():
No description.
No description.
- buildUrls(reflection: DeclarationReflection,): UrlMapping<any>[]
urls: UrlMapping<any>[] Build the url for the the given reflection and all of its children.
Parameters
-
reflection
: The reflection the url should be created for. -
urls
: The array the url should be appended to.
Returns The altered urls array.
-
- defaultLayoutTemplate(pageEvent: PageEvent<Reflection>,): Element
template: RenderTemplate<PageEvent<Reflection>> No description.
- getReflectionClasses(reflection: DeclarationReflection): string
No description.
- getRenderContext(pageEvent: PageEvent<Reflection>): DefaultThemeRenderContext
No description.
- getUrls(project: ProjectReflection): UrlMapping<any>[]
Map the models of the given project to the desired output files.
Parameters
-
project
: The project whose urls should be generated.
Returns A list of
UrlMapping
instances defining which models should be rendered to which files.-
- hierarchyTemplate(pageEvent: PageEvent<ProjectReflection>): Element
No description.
- indexTemplate(pageEvent: PageEvent<ProjectReflection>): Element
No description.
- initialize(): void
Initialize this component.
- listenTo(obj: EventDispatcher,): DefaultTheme
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- reflectionTemplate(pageEvent: PageEvent<ContainerReflection>): Element
No description.
- render(page: PageEvent<Reflection>,): string
template: RenderTemplate<PageEvent<Reflection>> Renders the provided page to a string, which will be written to disk by the
Renderer
- stopListening(obj?: EventDispatcher,): DefaultTheme
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).- static applyAnchorUrl(reflection: Reflection,): void
container: Reflection Generate an anchor url for the given reflection and all of its children.
Parameters
-
reflection
: The reflection an anchor url should be created for. -
container
: The nearest reflection having an own document.
-
- static getUrl(reflection: Reflection,): string
relative?: Reflection,
separator: string = "." Return a url for the given reflection.
Parameters
-
reflection
: The reflection the url should be generated for. -
relative
: The parent reflection the url generation should stop on. -
separator
: The separator used to generate the url.
Returns The generated url.
-
class Theme extends RendererComponent
Base class of all themes.
The theme class controls which files will be created through the Theme.getUrls
function. It returns an array of UrlMapping
instances defining the target files, models
and templates to use. Additionally themes can subscribe to the events emitted by
Renderer
to control and manipulate the output process.
Create a new BaseTheme instance.
Parameters
-
renderer
: The renderer this theme is attached to.
-
- componentName: string
The name of this component as set by the
@Component
decorator.- application():
No description.
- owner():
No description.
- abstract getUrls(project: ProjectReflection): UrlMapping<Reflection>[]
Map the models of the given project to the desired output files. It is assumed that with the project structure:
A |- B |- C
If
B
has a UrlMapping, thenA
also has a UrlMapping, andC
may or may not have a UrlMapping. IfB
does not have a UrlMapping, thenA
may or may not have a UrlMapping, butC
must not have a UrlMapping.Parameters
-
project
: The project whose urls should be generated.
Returns A list of
UrlMapping
instances defining which models should be rendered to which files.-
- initialize(): void
Initialize this component.
- listenTo(obj: EventDispatcher,): Theme
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- abstract render(page: PageEvent<Reflection>,): string
template: RenderTemplate<PageEvent<Reflection>> Renders the provided page to a string, which will be written to disk by the
Renderer
- stopListening(obj?: EventDispatcher,): Theme
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).
class DefaultThemeRenderContext
- new DefaultThemeRenderContext(theme: DefaultTheme,): DefaultThemeRenderContext
page: PageEvent<Reflection>,
options: Options No description.
- commentSummary: (...r: [props]) => undefined | Element
No description.
- commentTags: (...r: [props]) => undefined | Element
No description.
- defaultLayout: (...r: [template, props]) => Element
No description.
- hierarchyTemplate: (...r: [props]) => Element
No description.
- indexTemplate: (...r: [props]) => Element
No description.
- memberDeclaration: (...r: [props]) => Element
No description.
- memberGetterSetter: (...r: [props]) => Element
No description.
- memberReference: (...r: [props]) => Element
No description.
- memberSignatureBody: (...r: [props, ]) => Element
No description.
- memberSignatureTitle: (...r: [props, ]) => Element
No description.
- memberSignatures: (...r: [props]) => Element
No description.
- memberSources: (...r: [props]) => Element
No description.
- membersGroup: (...r: [group]) => Element
No description.
No description.
- pageSidebar: (...r: [props]) => Element
No description.
- reflectionFlags: (...r: [props]) => Element
No description.
- reflectionPreview: (...r: [props]) => undefined | Element
Rendered just after the description for a reflection. This can be used to render a shortened type display of a reflection that the rest of the page expands on.
Note: Will not be called for variables/type aliases, as they are summarized by their type declaration, which is already rendered by
DefaultThemeRenderContext.memberDeclaration
- reflectionTemplate: (...r: [props]) => Element
No description.
- typeAndParent: (...r: [props]) => Element
No description.
- typeParameters: (...r: [typeParameters]) => Element
No description.
- icons():
No description.
- getReflectionClasses(refl: DeclarationReflection): string
No description.
- hook(name: keyof RendererHooks): Element[]
No description.
Deprecated
Will be removed in 0.26, no longer required.
- markdown(md: readonly CommentDisplayPart[]): string
No description.
- relativeURL(url: string, cacheBust: boolean = false): string
Avoid this in favor of urlTo if possible
- urlTo(reflection: Reflection): string
No description.
class SerializeEvent extends Event
An event emitted by the Serializer
class at the very beginning and
ending of the a project serialization process.
See also
- new SerializeEvent(name: string,): SerializeEvent
project: ProjectReflection,
output?: ProjectReflection No description.
- output: undefined | ProjectReflection
No description.
- readonly project: ProjectReflection
The project the renderer is currently processing.
No description.
No description.
- name():
No description.
- preventDefault(): void
Prevent the default action associated with this event from being executed.
- stopPropagation(): void
Stop the propagation of this event. Remaining event handlers will not be executed.
class Serializer extends EventDispatcher
A class that provides a custom event channel.
You may bind a callback to an event with on
or remove with off
;
trigger
-ing an event fires all callbacks in succession.
No description.
- projectRoot: string
Only set when serializing.
- static EVENT_BEGIN: string
Triggered when the
Serializer
begins transforming a project. EVENT_BEGIN- static EVENT_END: string
Triggered when the
Serializer
has finished transforming a project. EVENT_END- addSerializer(serializer: SerializerComponent<any>): void
No description.
- listenTo(obj: EventDispatcher,): Serializer
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- projectToObject(value: ProjectReflection,): ProjectReflection
projectRoot: string Same as toObject but emits
Serializer.EVENT_BEGIN
andSerializer.EVENT_END
events.- stopListening(obj?: EventDispatcher,): Serializer
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
- toObject<T extends { toObject(serializer: Serializer): ModelToObject<T>}>(value: T): ModelToObject<T>
- toObject<T extends { toObject(serializer: Serializer): ModelToObject<T>}>(value: undefined | T): undefined | ModelToObject<T>
No description.
- toObjectsOptional<T extends { toObject(serializer: Serializer): ModelToObject<T>}>(value: undefined | T[]): undefined | ModelToObject<T>[]
No description.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).
class EventDispatcher
A class that provides a custom event channel.
You may bind a callback to an event with on
or remove with off
;
trigger
-ing an event fires all callbacks in succession.
No description.
- listenTo(obj: EventDispatcher,): EventDispatcher
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- stopListening(obj?: EventDispatcher,): EventDispatcher
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).
class RendererEvent extends Event
An event emitted by the Renderer
class at the very beginning and
ending of the entire rendering process.
See also
- new RendererEvent(name: string,): RendererEvent
outputDirectory: string,
project: ProjectReflection No description.
- readonly outputDirectory: string
The path of the directory the documentation should be written to.
- readonly project: ProjectReflection
The project the renderer is currently processing.
- urls?: UrlMapping<Reflection>[]
A list of all pages that should be generated.
This list can be altered during the
Renderer.EVENT_BEGIN
event.- static readonly BEGIN: "beginRender"
Triggered before the renderer starts rendering a project.
- static readonly END: "endRender"
Triggered after the renderer has written all documents.
No description.
No description.
- name():
No description.
- createPageEvent<Model>(mapping: UrlMapping<Model>): [RenderTemplate<PageEvent<Model>>, PageEvent<Model>]
Create an
PageEvent
event based on this event and the given url mapping.Parameters
-
mapping
: The mapping that defines the generatedPageEvent
state.
Returns A newly created
PageEvent
instance.Internal
-
- preventDefault(): void
Prevent the default action associated with this event from being executed.
- stopPropagation(): void
Stop the propagation of this event. Remaining event handlers will not be executed.
class PageEvent<Model> extends Event
An event emitted by the Renderer
class before and after the
markup of a page is rendered.
See also
- new PageEvent<Model>(name: string,): PageEvent<Model>
model: Model No description.
- filename: string
The filename the page will be written to.
- pageHeadings: Array<{link: string,}>
text: string,
classes: string,
kind: ReflectionKind,
level: number Links to content within this page that should be rendered in the page navigation. This is built when rendering the document content.
The project the renderer is currently processing.
- url: string
The url this page will be located at.
- contents?: string
The final html content of this page.
Should be rendered by layout templates and can be modified by plugins.
- static readonly BEGIN: "beginPage"
Triggered before a document will be rendered.
- static readonly END: "endPage"
Triggered after a document has been rendered, just before it is written to disc.
No description.
No description.
- name():
No description.
- preventDefault(): void
Prevent the default action associated with this event from being executed.
- stopPropagation(): void
Stop the propagation of this event. Remaining event handlers will not be executed.
class MarkdownEvent extends Event
An event emitted when markdown is being parsed. Allows other plugins to manipulate the result.
See also
- new MarkdownEvent(name: string,): MarkdownEvent
page: PageEvent<unknown>,
originalText: string,
parsedText: string No description.
- readonly originalText: string
The unparsed original text.
- parsedText: string
The parsed output.
- static readonly INCLUDE: "includeMarkdown"
Triggered on the renderer when this plugin includes a markdown file through a markdown include tag.
- static readonly PARSE: "parseMarkdown"
Triggered on the renderer when this plugin parses a markdown string.
No description.
No description.
- name():
No description.
- preventDefault(): void
Prevent the default action associated with this event from being executed.
- stopPropagation(): void
Stop the propagation of this event. Remaining event handlers will not be executed.
class IndexEvent extends Event
An event emitted when the search index is being prepared.
- new IndexEvent(name: string,): IndexEvent
searchResults: DeclarationReflection[] No description.
- readonly searchFieldWeights: Record<string, number>
Weights for the fields defined in
searchFields
. The default will weightname
as 10x more important than comment content.If a field added to
searchFields
is not added to this object, it will not be searchable.Do not replace this object, instead, set new properties on it for custom search fields added by your plugin.
- searchFields: Record<string, string>[]
Additional search fields to be used when creating the search index.
name
andcomment
may be specified to overwrite TypeDoc's search fields.Do not use
id
as a custom search field.May be filtered by plugins to reduce the results available. Additional items should not be added to this array.
If you remove an index from this array, you must also remove the same index from
searchFields
. TheremoveResult
helper will do this for you.- static readonly PREPARE_INDEX: "prepareIndex"
Triggered on the renderer when the search index is being prepared.
No description.
No description.
- name():
No description.
- preventDefault(): void
Prevent the default action associated with this event from being executed.
- removeResult(index: number): void
Remove a search result by index.
- stopPropagation(): void
Stop the propagation of this event. Remaining event handlers will not be executed.
class Event
An event object.
No description.
No description.
- name():
No description.
- preventDefault(): void
Prevent the default action associated with this event from being executed.
- stopPropagation(): void
Stop the propagation of this event. Remaining event handlers will not be executed.
class Deserializer
No description.
- oldIdToNewId: Record<number, undefined | number>
No description.
- project: undefined | ProjectReflection
No description.
- reflectionBuilders: {declaration: (parent: Reflection, obj: DeclarationReflection) => DeclarationReflection,}
param: (parent: SignatureReflection, obj: ParameterReflection) => ParameterReflection,
project: (parent: Reflection, obj: ProjectReflection) => ProjectReflection,
reference: (parent: Reflection, obj: DeclarationReflection) => ReferenceReflection,
signature: (parent: DeclarationReflection, obj: SignatureReflection) => SignatureReflection,
typeParam: (parent: NonNullable<undefined | DeclarationReflection | SignatureReflection>, obj: TypeParameterReflection) => TypeParameterReflection No description.
- typeBuilders: {array: (obj: ArrayType, de: Deserializer) => ArrayType,}
conditional: (obj: ConditionalType, de: Deserializer) => ConditionalType,
indexedAccess: (obj: IndexedAccessType, de: Deserializer) => IndexedAccessType,
inferred: (obj: InferredType, de: Deserializer) => InferredType,
intersection: (obj: IntersectionType, de: Deserializer) => IntersectionType,
intrinsic: (obj: IntrinsicType, de: Deserializer) => IntrinsicType,
literal: (obj: LiteralType, de: Deserializer) => LiteralType,
mapped: (obj: MappedType, de: Deserializer) => MappedType,
namedTupleMember: (obj: NamedTupleMemberType, de: Deserializer) => NamedTupleMember,
optional: (obj: OptionalType, de: Deserializer) => OptionalType,
predicate: (obj: PredicateType, de: Deserializer) => PredicateType,
query: (obj: QueryType, de: Deserializer) => QueryType,
reference: (obj: ReferenceType, de: Deserializer) => ReferenceType,
reflection: (obj: ReflectionType, de: Deserializer) => ReflectionType,
rest: (obj: RestType, de: Deserializer) => RestType,
templateLiteral: (obj: TemplateLiteralType, de: Deserializer) => TemplateLiteralType,
tuple: (obj: TupleType, de: Deserializer) => TupleType,
typeOperator: (obj: TypeOperatorType, de: Deserializer) => TypeOperatorType,
union: (obj: UnionType, de: Deserializer) => UnionType,
unknown: (obj: UnknownType, de: Deserializer) => UnknownType No description.
- logger():
No description.
- addDeserializer(de: DeserializerComponent): void
No description.
- constructReflection<T extends SomeReflection>(obj: T): ReflectionVariant[T["variant"]]
No description.
- constructType<T extends SomeType>(obj: T): TypeKindMap[T["type"]]
No description.
- defer(cb: (project: ProjectReflection) => void): void
Defers work until the initial pass of serialization has been completed. This can be used to set up references which cannot be immediately restored.
May only be called when deserializing.
- fromObject<T>(receiver: { fromObject(d: Deserializer, o: T): void}, obj: T): void
No description.
- revive<T, U extends Deserializable<T>>(): undefined | U
No description.
- reviveMany<T, U extends Deserializable<T>>(): U[]
- reviveMany<T, U extends Deserializable<T>>(): undefined | U[]
No description.
- reviveProject(projectObj: ProjectReflection,): ProjectReflection
name?: string Revive a single project into the structure it was originally created with. This is generally not appropriate for merging multiple projects since projects may contain reflections in their root, not inside a module.
- reviveProjects(name: string,): ProjectReflection
projects: readonly ProjectReflection[] No description.
- reviveType<T extends SomeType>(obj: T): TypeKindMap[T["type"]]
- reviveType<T extends SomeType>(obj: undefined | T): undefined | TypeKindMap[T["type"]]
No description.
class EventHooks<T extends Record<keyof T, unknown[]>, R>
Event emitter which allows listeners to return a value.
This is beneficial for the themes since it allows plugins to modify the HTML output without doing unsafe text replacement.
Very simple event emitter class which collects the return values of its listeners.
Example
const x = new EventHooks<{ a: [string] }, string>()
x.on('a', a => a.repeat(123)) // ok, returns a string
x.on('b', console.log) // error, 'b' is not assignable to 'a'
x.on('a' a => 1) // error, returns a number but expected a string
- new EventHooks<T extends Record<keyof T, unknown[]>,>(): EventHooks<T, R>
R No description.
Emits an event to all currently subscribed listeners.
Parameters
-
event
: the event to emit. -
args
: any arguments required for the event.
-
Stops listening to an event.
Parameters
-
event
: the event to stop listening to. -
listener
: the function to remove from the listener array.
-
- on<K extends string | number | symbol>(): void
Starts listening to an event.
Parameters
-
event
: the event to listen to. -
listener
: function to be called when an this event is emitted. -
order
: optional order to insert this hook with.
-
- once<K extends string | number | symbol>(): void
Listens to a single occurrence of an event.
Parameters
-
event
: the event to listen to. -
listener
: function to be called when an this event is emitted. -
order
: optional order to insert this hook with.
-
- restoreMomento(momento: EventHooksMomento<T, R>): void
No description.
- saveMomento(): EventHooksMomento<T, R>
No description.
class Logger
A logger that will not produce any output.
This logger also serves as the base class of other loggers as it implements all the required utility functions.
- new Logger(): Logger
No description.
- errorCount: number
How many error messages have been logged?
- warningCount: number
How many warning messages have been logged?
- addContext(message: string,): string
_level: LogLevel,
..._args: [] | [number, MinimalSourceFile] No description.
- deprecated(text: string, addStack: boolean = true): void
Internal
- diagnostic(diagnostic: Diagnostic): void
Print the given TypeScript log message.
Parameters
-
diagnostic
: The TypeScript message that should be logged.
-
- diagnostics(diagnostics: readonly Diagnostic[]): void
Print the given TypeScript log messages.
Parameters
-
diagnostics
: The TypeScript messages that should be logged.
-
- error(text: string,): void
pos: number,
file: MinimalSourceFile - error(text: string, node?: any): void
Log the given error.
Parameters
-
text
: The error that should be logged.
-
- hasErrors(): boolean
Has an error been raised through the log method?
- hasWarnings(): boolean
Has a warning been raised through the log method?
- info(text: string): void
Log the given info message.
Print a log message.
Parameters
-
_message
: The message itself. -
level
: The urgency of the log message.
-
- resetErrors(): void
Reset the error counter.
- resetWarnings(): void
Reset the warning counter.
- verbose(text: string): void
Log the given verbose message.
Parameters
-
text
: The message that should be logged.
-
- warn(text: string,): void
pos: number,
file: MinimalSourceFile - warn(text: string, node?: any): void
Log the given warning.
Parameters
-
text
: The warning that should be logged.
-
class MinimalSourceFile
- new MinimalSourceFile(text: string,): MinimalSourceFile
fileName: string No description.
- readonly fileName: string
No description.
- readonly text: string
No description.
- getLineAndCharacterOfPosition(pos: number): LineAndCharacter
No description.
class Renderer extends ChildableComponent<Application, RendererComponent>
The renderer processes a ProjectReflection
using a Theme
instance and writes
the emitted html documents to a output directory. You can specify which theme should be used
using the --theme <name>
command line argument.
Renderer
is a subclass of EventDispatcher
and triggers a series of events while
a project is being processed. You can listen to these events to control the flow or manipulate
the output.
-
Renderer.EVENT_BEGIN
<br> Triggered before the renderer starts rendering a project. The listener receives an instance ofRendererEvent
. By callingRendererEvent.preventDefault
the entire render process can be canceled.-
Renderer.EVENT_BEGIN_PAGE
<br> Triggered before a document will be rendered. The listener receives an instance ofPageEvent
. By callingPageEvent.preventDefault
the generation of the document can be canceled. -
Renderer.EVENT_END_PAGE
<br> Triggered after a document has been rendered, just before it is written to disc. The listener receives an instance ofPageEvent
. When callingPageEvent.preventDefault
the the document will not be saved to disc.
-
-
Renderer.EVENT_END
<br> Triggered after the renderer has written all documents. The listener receives an instance ofRendererEvent
. -
Renderer.EVENT_PREPARE_INDEX
<br> Triggered when the JavascriptIndexPlugin is preparing the search index. Listeners receive an instance ofIndexEvent
.
- new Renderer(owner: Application): Renderer
Create new Component instance.
- componentName: string
The name of this component as set by the
@Component
decorator.Hooks which will be called when rendering pages. Note:
- Hooks added during output will be discarded at the end of rendering.
- Hooks added during a page render will be discarded at the end of that page's render.
See
RendererHooks
for a description of each available hook, and when it will be called.- postRenderAsyncJobs: Array<(output: RendererEvent) => Promise<void>>
A list of async jobs which must be completed after rendering output files but before generation is considered successful. These functions will be called after all documents have been written to the filesystem.
This may be used by plugins to register work that must be done to finalize output files. For example: asynchronously generating an image referenced in a render hook.
Note: This array is cleared after calling the contained functions on each
Renderer.render
call.- preRenderAsyncJobs: Array<(output: RendererEvent) => Promise<void>>
A list of async jobs which must be completed before rendering output. They will be called after
RendererEvent.BEGIN
has fired, but before any files have been written.This may be used by plugins to register work that must be done to prepare output files. For example: asynchronously transform markdown to HTML.
Note: This array is cleared after calling the contained functions on each
Renderer.render
call.- renderStartTime: number
No description.
- static readonly EVENT_BEGIN: "beginRender"
No description.
- static readonly EVENT_BEGIN_PAGE: "beginPage"
No description.
- static readonly EVENT_END: "endRender"
No description.
- static readonly EVENT_END_PAGE: "endPage"
No description.
- static readonly EVENT_PREPARE_INDEX: "prepareIndex"
No description.
- application():
No description.
- cacheBust():
Internal
Internal
- cname():
Internal
- darkTheme():
Internal
- githubPages():
Internal
- lightTheme():
Internal
- owner():
No description.
- pretty():
Internal
- themeName():
Internal
- addComponent<T extends RendererComponent>(name: string,): T
componentClass: T | ComponentClass<T, Application> No description.
- defineTheme(): void
Define a new theme that can be used to render output. This API will likely be changing at some point, to allow more easily overriding parts of the theme without requiring additional boilerplate.
- getComponent(name: string): undefined | RendererComponent
Retrieve a plugin instance.
Returns The instance of the plugin or undefined if no plugin with the given class is attached.
- getComponents(): RendererComponent[]
No description.
- hasComponent(name: string): boolean
No description.
- initialize(): void
Initialize this component.
- listenTo(obj: EventDispatcher,): Renderer
name: string | EventMap,
callback?: EventCallback,
priority?: number Inversion-of-control versions of
on
. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.- listenToOnce(obj: EventDispatcher,): this
name: string,
callback: EventCallback,
priority?: number - listenToOnce(obj: EventDispatcher, eventMap: EventMap): this
Inversion-of-control versions of
once
.- off(name: undefined | string,): this
callback?: EventCallback,
context?: any - off(): this
Remove one or many callbacks. If
context
is null, removes all callbacks with that function. Ifcallback
is null, removes all callbacks for the event. Ifname
is null, removes all bound callbacks for all events.- on(eventMap: EventMap,): this
callback?: EventCallback,
context?: any,
priority?: number - on(name: string,): this
callback: EventCallback,
context?: any,
priority?: number Bind an event to a
callback
function. Passing"all"
will bind the callback to all events fired.- once(name: string,): this
callback: EventCallback,
context?: any,
priority?: any Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
- removeAllComponents(): void
No description.
- removeComponent(name: string): undefined | RendererComponent
No description.
- render(project: ProjectReflection,): Promise<void>
outputDirectory: string Render the given project reflection to the specified output directory.
Parameters
-
project
: The project that should be rendered. -
outputDirectory
: The path of the directory the documentation should be rendered to.
-
- stopListening(obj?: EventDispatcher,): Renderer
name?: string | EventMap,
callback?: EventCallback Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as
trigger
is, apart from the event name (unless you're listening on"all"
, which will cause your callback to receive the true name of the event as the first argument).
class UrlMapping<Model>
- new UrlMapping<Model>(url: string,): UrlMapping<Model>
model: Model,
template: RenderTemplate<PageEvent<Model>> No description.
No description.
- url: string
No description.
interface CommentParserConfig
- blockTags: Set<string>
No description.
- inlineTags: Set<string>
No description.
No description.
- modifierTags: Set<string>
No description.
interface ComponentPath
- path: string
No description.
interface DeclarationReference
- resolutionStart: "global" | "local"
No description.
- moduleSource?: string
No description.
No description.
interface Deserializable<T>
- fromObject(d: Deserializer, o: T): void
No description.
interface DeserializerComponent
- priority: number
No description.
- fromObject(model: unknown, obj: unknown): void
No description.
- supports(model: unknown, obj: unknown): boolean
No description.
interface DocumentationEntryPoint
- displayName: string
No description.
- program: Program
No description.
- sourceFile: SourceFile
No description.
- readmeFile?: string
No description.
- version?: string
No description.
interface EventCallback extends Function
- _callback?: Function
No description.
interface EventMap
No description.
interface Meaning
interface NavigationElement
interface RendererHooks
Describes the hooks available to inject output in the default theme. If the available hooks don't let you put something where you'd like, please open an issue!
Applied immediately after the opening
<body>
tag.Applied immediately before the closing
</body>
tag.Applied immediately before the main template.
Applied immediately after the main template.
Applied immediately after the opening
<head>
tag.Applied immediately before the closing
</head>
tag.Applied immediately before calling
context.pageSidebar
.Applied immediately after calling
context.pageSidebar
.
interface SerializerComponent<T extends >
Represents Serializer plugin component.
Like Converter
plugins each Serializer
plugin defines a predicate that instructs if an
object can be serialized by it. This is done dynamically at runtime via a supports
method.
Additionally, each Serializer
plugin must define a predicate that instructs the group
it belongs to.
- readonly priority: number
The priority this serializer should be executed with. A higher priority means the
Serializer
will be applied earlier.- supports(item: unknown): boolean
Technically this should return
item is T
, but that doesn't play nicely with inference, so allow the looserboolean
return type.- toObject(item: T,): Partial<ModelToObject<T>>
obj: Partial<ModelToObject<T>>,
serializer: Serializer No description.
interface SymbolReference
- path?: ComponentPath[]
No description.