Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Converter

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

Hierarchy

Implements

Index

Constructors

constructor

Events

Static EVENT_BEGIN

EVENT_BEGIN: string = "begin"

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

Static EVENT_CREATE_DECLARATION

EVENT_CREATE_DECLARATION: string = "createDeclaration"

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

Static EVENT_CREATE_PARAMETER

EVENT_CREATE_PARAMETER: string = "createParameter"

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

Static EVENT_CREATE_SIGNATURE

EVENT_CREATE_SIGNATURE: string = "createSignature"

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

Static EVENT_CREATE_TYPE_PARAMETER

EVENT_CREATE_TYPE_PARAMETER: string = "createTypeParameter"

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

Static EVENT_END

EVENT_END: string = "end"

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

Static EVENT_FILE_BEGIN

EVENT_FILE_BEGIN: string = "fileBegin"

Triggered when the converter begins converting a source file. The listener should implement [[IConverterNodeCallback]].

Static EVENT_FUNCTION_IMPLEMENTATION

EVENT_FUNCTION_IMPLEMENTATION: string = "functionImplementation"

Triggered when the converter has found a function implementation. The listener should implement [[IConverterNodeCallback]].

Static EVENT_RESOLVE

EVENT_RESOLVE: string = "resolveReflection"

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

Static EVENT_RESOLVE_BEGIN

EVENT_RESOLVE_BEGIN: string = "resolveBegin"

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

Static EVENT_RESOLVE_END

EVENT_RESOLVE_END: string = "resolveEnd"

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

Properties

Private compilerHost

compilerHost: CompilerHost

componentName

componentName: string

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

excludeExternals

excludeExternals: boolean

excludeNotExported

excludeNotExported: boolean

excludePrivate

excludePrivate: boolean

excludeProtected

excludeProtected: boolean

externalPattern

externalPattern: string

includeDeclarations

includeDeclarations: boolean

name

name: string

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

Private nodeConverters

nodeConverters: object

Type declaration

Private typeNodeConverters

typeNodeConverters: TypeNodeConverter<Type, Node>[]

Private typeTypeConverters

typeTypeConverters: TypeTypeConverter<Type>[]

Accessors

application

owner

Methods

addComponent

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

Private addNodeConverter

Private addTypeConverter

Protected bubble

Private compile

  • compile(context: Context): ReadonlyArray<Diagnostic>
  • Compile the files within the given context and convert the compiler symbols to reflections.

    Parameters

    • context: Context

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

    Returns ReadonlyArray<Diagnostic>

    An array containing all errors generated by the TypeScript compiler.

convert

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

    Parameters

    • fileNames: string[]

      Array of the file names that should be compiled.

    Returns ConverterResult

convertNode

  • Analyze the given node and create a suitable reflection.

    This function checks the kind of the node and delegates to the matching function implementation.

    Parameters

    • context: Context

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

    • node: Node

      The compiler node that should be analyzed.

    Returns Reflection

    The resulting reflection or NULL.

convertType

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

    Parameters

    • context: Context

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

    • Optional node: Node

      The node whose type should be reflected.

    • Optional type: Type

      The type of the node if already known.

    Returns Type

    The TypeDoc type reflection representing the given node and type.

getComponent

getComponents

getDefaultLib

  • getDefaultLib(): string
  • Return the basename of the default library that should be used.

    Returns string

    The basename of the default library.

getOptionDeclarations

hasComponent

  • hasComponent(name: string): boolean

initialize

  • initialize(): void

listenTo

listenToOnce

off

  • off(): any
  • off(eventMap: EventMap, context?: any): any
  • off(name: string, callback?: EventCallback, context?: any): any

on

  • on(eventMap: EventMap, context?: any): any
  • on(eventMap: EventMap, callback?: EventCallback, context?: any, priority?: number): any
  • on(name: string, callback: EventCallback, context?: any, priority?: number): any

once

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

  • Parameters

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

    Returns any

removeAllComponents

  • removeAllComponents(): void

removeComponent

Private removeNodeConverter

Private removeTypeConverter

Private resolve

stopListening

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 this

Generated using TypeDoc