Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

constructor

  • Create a new TypeDoc application instance.

    Returns Application

Properties

componentName

componentName: string

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

converter

converter: Converter

The converter used to create the declaration reflections.

logger

logger: Logger

The logger that should be used to output messages.

options

options: Options

renderer

renderer: Renderer

The renderer used to generate the documentation output.

serializer

serializer: Serializer

The serializer used to generate JSON output.

Static VERSION

VERSION: string = packageInfo.version

The version number of TypeDoc.

Accessors

application

owner

  • get owner(): O

Methods

addComponent

  • addComponent<T>(name: string, componentClass: T | ComponentClass<T, Application>): T

bootstrap

Protected bubble

convert

  • Run the converter for the given set of files and return the generated reflections.

    Returns undefined | ProjectReflection

    An instance of ProjectReflection on success, undefined otherwise.

convertAndWatch

generateDocs

generateJson

  • Run the converter for the given set of files and write the reflections to a json file.

    Parameters

    Returns Promise<void>

    Whether the JSON file could be written successfully.

getComponent

  • getComponent(name: string): undefined | AbstractComponent<Application>
  • 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.

getComponents

getEntryPoints

  • Gets the entry points to be documented according to the current entryPoints and entryPointStrategy options. May return undefined if entry points fail to be expanded.

    Returns undefined | DocumentationEntryPoint[]

getTypeScriptPath

  • getTypeScriptPath(): string

getTypeScriptVersion

  • getTypeScriptVersion(): string

hasComponent

  • hasComponent(name: string): boolean

Protected initialize

  • initialize(): void

listenTo

  • 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

listenToOnce

off

on

once

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

  • Parameters

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

    Returns Application

removeAllComponents

  • removeAllComponents(): void

removeComponent

  • removeComponent(name: string): undefined | AbstractComponent<Application>

stopListening

toString

  • toString(): string

trigger

  • 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

validate

Generated using TypeDoc