Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Converter

Compiles source files using TypeScript and converts compiler symbols to reflections.

Hierarchy

  • ChildableComponent<Application, ConverterComponent>
    • Converter

Index

Constructors

constructor

  • Create new Component instance.

    Parameters

    Returns Converter

Events

Static Readonly EVENT_BEGIN

EVENT_BEGIN: "begin"

Triggered when the converter begins converting a project. The listener should implement [[IConverterCallback]].

Static Readonly EVENT_CREATE_DECLARATION

EVENT_CREATE_DECLARATION: "createDeclaration"

Triggered when the converter has created a declaration reflection. The listener should implement [[IConverterNodeCallback]].

Static Readonly EVENT_CREATE_PARAMETER

EVENT_CREATE_PARAMETER: "createParameter"

Triggered when the converter has created a parameter reflection. The listener should implement [[IConverterNodeCallback]].

Static Readonly EVENT_CREATE_SIGNATURE

EVENT_CREATE_SIGNATURE: "createSignature"

Triggered when the converter has created a signature reflection. The listener should implement [[IConverterNodeCallback]].

Static Readonly EVENT_CREATE_TYPE_PARAMETER

EVENT_CREATE_TYPE_PARAMETER: "createTypeParameter"

Triggered when the converter has created a type parameter reflection. The listener should implement [[IConverterNodeCallback]].

Static Readonly EVENT_END

EVENT_END: "end"

Triggered when the converter has finished converting a project. The listener should implement [[IConverterCallback]].

Static Readonly EVENT_RESOLVE

EVENT_RESOLVE: "resolveReflection"

Triggered when the converter resolves a reflection. The listener should implement [[IConverterResolveCallback]].

Static Readonly EVENT_RESOLVE_BEGIN

EVENT_RESOLVE_BEGIN: "resolveBegin"

Triggered when the converter begins resolving a project. The listener should implement [[IConverterCallback]].

Static Readonly EVENT_RESOLVE_END

EVENT_RESOLVE_END: "resolveEnd"

Triggered when the converter has finished resolving a project. The listener should implement [[IConverterCallback]].

Properties

Private compile

compile: any

Compile the files within the given context and convert the compiler symbols to reflections.

param

The context object describing the current state the converter is in.

returns

An array containing all errors generated by the TypeScript compiler.

componentName

componentName: string

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

Private convertExports

convertExports: any

Private convertReExports

convertReExports: any

Private Optional excludeCache

excludeCache: any

excludeExternals

excludeExternals: boolean

excludeNotDocumented

excludeNotDocumented: boolean

excludePrivate

excludePrivate: boolean

excludeProtected

excludeProtected: boolean

externalPattern

externalPattern: string[]

Private Optional externalPatternCache

externalPatternCache: any

Private isExcluded

isExcluded: any

name

name: string

The human readable name of the project. Used within the templates to set the title of the document.

Private resolve

resolve: any

Resolve the project within the given context.

param

The context object describing the current state the converter is in.

returns

The final project reflection.

Accessors

Private _listenId

  • get _listenId(): any
  • A unique id that identifies this instance.

    Returns any

application

  • Return the application / root component instance.

    Returns Application

owner

  • get owner(): O
  • Return the owner of this component.

    Returns O

Methods

addComponent

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

    • T: ConverterComponent<T>

    Parameters

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

    Returns T

Protected bubble

  • Parameters

    • name: string | Event | EventMap
    • Rest ...args: any[]

    Returns Converter

convert

  • Compile the given source files and create a project reflection for them.

    Parameters

    • entryPoints: readonly DocumentationEntryPoint[]

      the entry points of this program.

    Returns ProjectReflection

convertSymbol

  • convertSymbol(context: Context, symbol: Symbol): void
  • internal

    Parameters

    • context: Context
    • symbol: Symbol

    Returns void

convertType

  • convertType(context: Context, node: TypeNode | Type): Type
  • Convert the given TypeScript type into its TypeDoc type reflection.

    internal

    Parameters

    • context: Context

      The context object describing the current state the converter is in.

    • node: TypeNode | Type

    Returns Type

    The TypeDoc type reflection representing the given node and type.

getComponent

  • getComponent(name: string): ConverterComponent
  • Retrieve a plugin instance.

    Parameters

    • name: string

    Returns ConverterComponent

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

getComponents

  • getComponents(): ConverterComponent[]
  • Returns ConverterComponent[]

getNodesForSymbol

  • internal

    Parameters

    Returns Declaration[]

hasComponent

  • hasComponent(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

Protected initialize

  • initialize(): void
  • Initialize this component.

    Returns void

isExternal

  • isExternal(symbol: Symbol): boolean
  • internal

    Parameters

    Returns boolean

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

    • obj: EventDispatcher
    • name: string | EventMap
    • Optional callback: EventCallback
    • Optional priority: number

    Returns Converter

listenToOnce

  • Inversion-of-control versions of once.

    Parameters

    Returns Converter

  • Parameters

    • obj: EventDispatcher
    • name: string
    • callback: EventCallback
    • Optional priority: number

    Returns Converter

off

  • off(): Converter
  • off(eventMap: EventMap, context?: any): Converter
  • off(name: string, callback?: EventCallback, context?: any): Converter
  • 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 Converter

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns Converter

  • Parameters

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

    Returns Converter

on

  • on(eventMap: EventMap, context?: any): Converter
  • on(eventMap: EventMap, callback?: EventCallback, context?: any, priority?: number): Converter
  • on(name: string, callback: EventCallback, context?: any, priority?: number): Converter
  • Bind an event to a callback function. Passing "all" will bind the callback to all events fired.

    Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns Converter

  • Parameters

    • eventMap: EventMap
    • Optional callback: EventCallback
    • Optional context: any
    • Optional priority: number

    Returns Converter

  • Parameters

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

    Returns Converter

once

  • once(eventMap: EventMap, context?: any): Converter
  • once(name: string, callback: EventCallback, context?: any, priority?: any): Converter
  • 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

    • eventMap: EventMap
    • Optional context: any

    Returns Converter

  • Parameters

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

    Returns Converter

removeAllComponents

  • removeAllComponents(): void
  • Returns void

removeComponent

  • removeComponent(name: string): ConverterComponent
  • Parameters

    • name: string

    Returns ConverterComponent

shouldIgnore

  • internal

    Parameters

    Returns boolean

stopListening

  • Tell this object to stop listening to either specific events ... or to every object it's currently listening to.

    Parameters

    • Optional obj: EventDispatcher
    • Optional name: string | EventMap
    • Optional callback: EventCallback

    Returns Converter

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

    • name: string | Event | EventMap
    • Rest ...args: any[]

    Returns Converter

Generated using TypeDoc