Class Converter

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

Hierarchy

Accessors

commentStyle: any
excludeExternals: any
excludeNotDocumented: any
excludePrivate: any
excludeProtected: any
excludeReferences: any
externalPattern: any
externalSymbolLinkMappings: any
maxTypeConversionDepth: any
  • get owner(): O
  • Return the owner of this component.

    Returns O

preserveLinkText: any
validation: any

Constructors

Events

EVENT_BEGIN: "begin" = ConverterEvents.BEGIN

Triggered when the converter begins converting a project. The listener will be given a Context object.

EVENT_CREATE_DECLARATION: "createDeclaration" = ConverterEvents.CREATE_DECLARATION

Triggered when the converter has created a declaration reflection. The listener will be given Context and a Models.DeclarationReflection.

EVENT_CREATE_DOCUMENT: "createDocument" = ConverterEvents.CREATE_DOCUMENT

Triggered when the converter has created a document reflection. The listener will be given undefined (for consistency with the other create events) and a Models.DocumentReflection.

EVENT_CREATE_PARAMETER: "createParameter" = ConverterEvents.CREATE_PARAMETER

Triggered when the converter has created a parameter reflection. The listener will be given Context, Models.ParameterReflection and a ts.Node?

EVENT_CREATE_PROJECT: "createProject" = ConverterEvents.CREATE_PROJECT

Triggered when the converter has created a project reflection. The listener will be given Context and a Models.ProjectReflection.

EVENT_CREATE_SIGNATURE: "createSignature" = ConverterEvents.CREATE_SIGNATURE

Triggered when the converter has created a signature reflection. The listener will be given Context, Models.SignatureReflection | Models.ProjectReflection the declaration, ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined, and ts.Signature | undefined. The signature will be undefined if the created signature is an index signature.

EVENT_CREATE_TYPE_PARAMETER: "createTypeParameter" = ConverterEvents.CREATE_TYPE_PARAMETER

Triggered when the converter has created a type parameter reflection. The listener will be given Context and a Models.TypeParameterReflection

EVENT_END: "end" = ConverterEvents.END

Triggered when the converter has finished converting a project. The listener will be given a Context object.

EVENT_RESOLVE: "resolveReflection" = ConverterEvents.RESOLVE

Triggered when the converter resolves a reflection. The listener will be given Context and a Reflection.

EVENT_RESOLVE_BEGIN: "resolveBegin" = ConverterEvents.RESOLVE_BEGIN

Triggered when the converter begins resolving a project. The listener will be given Context.

EVENT_RESOLVE_END: "resolveEnd" = ConverterEvents.RESOLVE_END

Triggered when the converter has finished resolving a project. The listener will be given Context.

Methods

  • Adds a new resolver that the theme can use to try to figure out how to link to a symbol declared by a third-party library which is not included in the documentation.

    The resolver function will be passed a declaration reference which it can attempt to resolve. If resolution fails, the function should return undefined.

    Note: This will be used for both references to types declared in node_modules (in which case the reference passed will have the moduleSource set and the symbolReference will navigate via .) and user defined {@link} tags which cannot be resolved. If the link being resolved is inferred from a type, then no part will be passed to the resolver function.

    Parameters

    Returns void

  • Internal

    Convert the given TypeScript type into its TypeDoc type reflection.

    Parameters

    • context: Context

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

    • node: undefined | TypeNode | Type

    Returns Models.SomeType

    The TypeDoc type reflection representing the given node and type.

  • Stops listening to an event.

    Type Parameters

    Parameters

    • event: K

      the event to stop listening to.

    • listener: (this: undefined, ...args: ConverterEvents[K]) => void

      the function to remove from the listener array.

    Returns void

  • Starts listening to an event.

    Type Parameters

    Parameters

    • event: K

      the event to listen to.

    • listener: (this: undefined, ...args: ConverterEvents[K]) => void

      function to be called when an this event is emitted.

    • priority: number = 0

      optional priority to insert this hook with.

    Returns void

  • Internal

    Used to determine if we should immediately bail when creating a reflection. Note: This should not be used for excludeNotDocumented because we don't have enough information at this point since comment discovery hasn't happened.

    Parameters

    • symbol: Symbol

    Returns boolean

Properties

componentName: string

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