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.

Hierarchy

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.

logger: Logger = ...

The logger that should be used to output messages.

options: Options = ...
renderer: Renderer

The renderer used to generate the documentation output.

serializer: Serializer = ...

The serializer used to generate JSON output.

EVENT_BOOTSTRAP_END: string = 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: string = ApplicationEvents.REVIVE

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

EVENT_VALIDATE_PROJECT: string = 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.

Accessors

entryPointStrategy
entryPoints
skipErrorChecking

Methods

  • Write the reflections to a json file.

    Parameters

    Returns Promise<void>

    Whether the JSON file could be written successfully.

  • Retrieve a plugin instance.

    Parameters

    • name: string

    Returns undefined | AbstractComponent<Application>

    The instance of the plugin or undefined if no plugin with the given class is attached.

  • Parameters

    • name: string

    Returns boolean

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

    Parameters

    Returns Application

  • Remove one or many callbacks. If context is null, removes all callbacks with that function. If callback is null, removes all callbacks for the event. If name is null, removes all bound callbacks for all events.

    Returns this

  • Parameters

    • eventMap: undefined | EventMap
    • Optional context: any

    Returns this

  • Parameters

    • name: undefined | string
    • Optional callback: EventCallback
    • Optional context: any

    Returns this

  • Bind an event to a callback function. Passing "all" will bind the callback to all events fired.

    Parameters

    Returns this

  • Parameters

    Returns this

  • Parameters

    • name: string
    • callback: EventCallback
    • Optional context: any
    • Optional priority: number

    Returns this

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

    Parameters

    Returns this

  • Parameters

    • name: string
    • callback: EventCallback
    • Optional context: any
    • Optional priority: any

    Returns this

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

    Parameters

    Returns Application

  • Initialize TypeDoc without loading plugins.

    Parameters

    • options: Partial<TypeDocOptions> = {}

      Options to set during initialization

    • readers: readonly OptionsReader[] = DEFAULT_READERS

      Option readers to use to discover options from config files.

    Returns Promise<Application>

    Example

    Initialize the application with pretty-printing output disabled.

    const app = Application.bootstrap({ pretty: false });
    

Generated using TypeDoc