KC's Workspace
    Preparing search index...

    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.

    Access to an Application instance can be retrieved with Application.bootstrap or Application.bootstrapWithPlugins. It can not be constructed manually.

    Hierarchy (View Summary)

    Index

    Properties

    componentName: string

    The name of this component as set by the @Component decorator.

    converter: Converter

    The converter used to create the declaration reflections.

    deserializer: Deserializer

    The deserializer used to restore previously serialized JSON output.

    Due for deprecation in 0.29, use the reference to this on ProjectReflection, this was the wrong place for this member to live.

    internationalization: Internationalization

    Internationalization module which supports translating according to the lang option.

    options: Options
    outputs: Outputs
    renderer: Renderer

    The renderer used to generate the HTML documentation output.

    serializer: Serializer

    The serializer used to generate JSON output.

    EVENT_BOOTSTRAP_END: "bootstrapEnd"

    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.

    EVENT_PROJECT_REVIVE: "reviveProject"

    Emitted after a project has been deserialized from JSON. The listener will be given an instance of ProjectReflection.

    EVENT_VALIDATE_PROJECT: "validateProject"

    Emitted when validation is being run. The listener will be given an instance of ProjectReflection.

    VERSION: string

    The version number of TypeDoc.

    Accessors

    entryPoints: GlobString[]
    entryPointStrategy: EntryPointStrategy
    lang: string
    • get owner(): O

      Return the owner of this component.

      Returns O

    skipErrorChecking: boolean

    Methods

    • Run a convert / watch process.

      Parameters

      Returns Promise<boolean>

      True if the watch process should be restarted due to a configuration change, false for an options error

    • Return the path to the TypeScript compiler.

      Returns string

    • Starts listening to an event.

      Type Parameters

      Parameters

      • event: K

        the event to listen to.

      • listener: (this: undefined, ...args: ApplicationEvents[K]) => void

        function to be called when an this event is emitted.

      • Optionalpriority: number

        optional priority to insert this hook with. Higher priority is placed earlier in the listener array.

      Returns void

    • Register that the current build depends on a file, so that in watch mode the build will be repeated. Has no effect if a watch build is not running, or if the file has already been registered.

      Parameters

      • path: string

        The file to watch. It does not need to exist, and you should in fact register files you look for, but which do not exist, so that if they are created the build will re-run. (e.g. if you look through a list of 5 possibilities and find the third, you should register the first 3.)

      • OptionalshouldRestart: boolean

        Should the build be completely restarted? (This is normally only used for configuration files -- i.e. files whose contents determine how conversion, rendering, or compiling will be done, as opposed to files that are only read during the conversion or rendering.)

      Returns void