TypeDoc API - v0.28.2

    Class 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.

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

    Hierarchy

    Index

    Accessors

    entryPoints: any
    entryPointStrategy: any
    lang: any
    • get owner(): O

      Return the owner of this component.

      Returns O

    skipErrorChecking: any

    Methods

    • Run a convert / watch process.

      Parameters

      • success: (project: Models.ProjectReflection) => Promise<void>

        Callback to run after each convert, receiving the project

      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.

      • priority: number = 0

        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.)

      • shouldRestart: boolean = false

        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

    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.

    files: Models.FileRegistry = ...
    internationalization: Internationalization.Internationalization = ...

    Internationalization module which supports translating according to the lang option.

    options: Configuration.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" = ApplicationEvents.BOOTSTRAP_END

    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" = ApplicationEvents.REVIVE

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

    EVENT_VALIDATE_PROJECT: "validateProject" = ApplicationEvents.VALIDATE_PROJECT

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

    VERSION: string = packageInfo.version

    The version number of TypeDoc.

    MMNEPVFCICPMFPCPTTAAATR