Options
All
  • Public
  • Public/Protected
  • All
Menu

TypeDoc Documentation

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

CommandLineOption

IntersectionUnion

IntersectionUnion: IntersectionType | UnionType

Variables

Const DUMMY_APPLICATION_OWNER

DUMMY_APPLICATION_OWNER: unique symbol = Symbol()

Dummy owner to be passed in to AbstractComponent / ChildableComponents if the class being constructed is the application. The application does not have an owner and will return itself for component.application and component.owner.

Const IntrinsicTypeFlags

IntrinsicTypeFlags: any = (ts.TypeFlags as any).Intrinsic

Const ProgressBar

ProgressBar: any = require('progress')

Let REFLECTION_ID

REFLECTION_ID: number = 0

Current reflection id.

Const childMappings

childMappings: object[] = []

Const customMarkedRenderer

customMarkedRenderer: Renderer = new Marked.Renderer()

Const eventSplitter

eventSplitter: RegExp = /\s+/

Const existingDirectories

existingDirectories: MapLike<boolean>

List of known existent directories. Used to speed up directoryExists.

Const nonStaticKinds

nonStaticKinds: ReflectionKind[] = [ReflectionKind.Class,ReflectionKind.Interface,ReflectionKind.Module]

List of reflection kinds that never should be static.

Const nonStaticMergeKinds

nonStaticMergeKinds: SyntaxKind[] = [ts.SyntaxKind.ClassDeclaration,ts.SyntaxKind.ClassExpression,ts.SyntaxKind.InterfaceDeclaration]

List of ts kinds leading to none static merge.

Const optionDeclarations

optionDeclarations: CommandLineOption[] = tsany.optionDeclarations

Const preferred

preferred: SyntaxKind[] = [ts.SyntaxKind.ClassDeclaration,ts.SyntaxKind.InterfaceDeclaration,ts.SyntaxKind.EnumDeclaration]

Const relevantFlags

relevantFlags: ReflectionFlag[] = [ReflectionFlag.Private,ReflectionFlag.Protected,ReflectionFlag.Static,ReflectionFlag.ExportAssignment,ReflectionFlag.Optional,ReflectionFlag.DefaultValue,ReflectionFlag.Rest,ReflectionFlag.Abstract,ReflectionFlag.Let,ReflectionFlag.Const]

Const tsany

tsany: any = ts as any

Const unix

unix: boolean = Path.sep === '/'

Functions

Component

Option

  • Decorator that declares a configuration option.

    Use it on an instance property of a Component class.

    Parameters

    Returns PropertyDecorator

canMergeReflectionsByKind

compact

  • compact(options: any): string
  • Compress the given string by removing all newlines.

    Parameters

    • options: any

    Returns string

    The string with all newlines stripped.

convertDefaultValue

  • convertDefaultValue(node: VariableDeclaration | ParameterDeclaration | EnumMember): string | undefined
  • Return the default value of the given node.

    Parameters

    • node: VariableDeclaration | ParameterDeclaration | EnumMember

      The TypeScript node whose default value should be extracted.

    Returns string | undefined

    The default value as a string.

convertExpression

  • convertExpression(expression: Expression): string

createComment

  • createComment(node: Node): Comment | undefined
  • Return the parsed comment of the given TypeScript node.

    Parameters

    • node: Node

      The node whose comment should be returned.

    Returns Comment | undefined

    The parsed comment as a Comment instance or undefined if no comment is present.

createCompilerDiagnostic

  • createCompilerDiagnostic(message: DiagnosticMessage, ...args: (string | number)[]): Diagnostic
  • createCompilerDiagnostic(message: DiagnosticMessage): Diagnostic
  • Parameters

    • message: DiagnosticMessage
    • Rest ...args: (string | number)[]

    Returns Diagnostic

  • Parameters

    • message: DiagnosticMessage

    Returns Diagnostic

createDeclaration

  • Create a declaration reflection from the given TypeScript node.

    Parameters

    • context: Context

      The context object describing the current state the converter is in. The scope of the context will be the parent of the generated reflection.

    • node: Declaration

      The TypeScript node that should be converted to a reflection.

    • kind: ReflectionKind

      The desired kind of the reflection.

    • Optional name: undefined | string

      The desired name of the reflection.

    Returns DeclarationReflection | undefined

    The resulting reflection or undefined if an error is encountered.

createMinimatch

  • createMinimatch(patterns: string[]): IMinimatch[]
  • Convert array of glob patterns to array of minimatch instances.

    Handle a few Windows-Unix path gotchas.

    Parameters

    • patterns: string[]

    Returns IMinimatch[]

createParameter

  • Create a parameter reflection for the given node.

    Parameters

    • context: Context

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

    • node: ParameterDeclaration

      The parameter node that should be reflected.

    Returns ParameterReflection | undefined

    The newly created parameter reflection.

createReferenceType

  • createReferenceType(context: Context, symbol: Symbol | undefined, includeParent?: undefined | false | true): ReferenceType | undefined
  • Create a new reference type pointing to the given symbol.

    Parameters

    • context: Context

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

    • symbol: Symbol | undefined

      The symbol the reference type should point to.

    • Optional includeParent: undefined | false | true

      Should the name of the parent be provided within the fallback name?

    Returns ReferenceType | undefined

    A new reference type instance pointing to the given symbol.

createSignature

  • Create a new signature reflection from the given node.

    Parameters

    • context: Context

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

    • node: ts.SignatureDeclaration

      The TypeScript node containing the signature declaration that should be reflected.

    • name: string

      The name of the function or method this signature belongs to.

    • kind: ReflectionKind

      The desired kind of the reflection.

    Returns SignatureReflection

    The newly created signature reflection describing the given node.

createTypeParameter

  • Create a type parameter reflection for the given node.

    Parameters

    • context: Context

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

    • node: TypeParameterDeclaration

      The type parameter node that should be reflected.

    Returns TypeParameterType | undefined

    The newly created type parameter reflection.

directoryExists

  • directoryExists(directoryPath: string): boolean
  • Test whether the given directory exists.

    Parameters

    • directoryPath: string

      The directory that should be tested.

    Returns boolean

    TRUE if the given directory exists, FALSE otherwise.

ensureDirectoriesExist

  • ensureDirectoriesExist(directoryPath: string): void
  • Make sure that the given directory exists.

    Parameters

    • directoryPath: string

      The directory that should be validated.

    Returns void

eventsApi

  • Iterates over the standard event, callback (as well as the fancy multiple space-separated events "change blur", callback and jQuery-style event maps {event: callback}).

    Type parameters

    • T

    • U

    Parameters

    Returns U

extractSignatureType

  • extractSignatureType(context: Context, node: ts.SignatureDeclaration): Type | undefined
  • Extract the return type of the given signature declaration.

    Parameters

    • context: Context

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

    • node: ts.SignatureDeclaration

      The signature declaration whose return type should be determined.

    Returns Type | undefined

    The return type reflection of the given signature.

getJSDocCommentRanges

  • getJSDocCommentRanges(node: Node, text: string): CommentRange[]

getOptionsHelp

  • getOptionsHelp(options: Options): string

getParameterHelp

getRawComment

  • getRawComment(node: Node): string | undefined
  • Return the raw comment string for the given node.

    Parameters

    • node: Node

      The node whose comment should be resolved.

    Returns string | undefined

    The raw comment string or undefined if no comment could be found.

getRootModuleDeclaration

  • getRootModuleDeclaration(node: ModuleDeclaration): Node
  • Return the root module declaration of the given module declaration.

    In the following example this function would always return module A no matter which of the modules was passed in.

    module A.B.C { }

    Parameters

    • node: ModuleDeclaration

    Returns Node

ifCond

  • ifCond(v1: any, operator: any, v2: any, options: any): any
  • Handlebars if helper with condition.

    Parameters

    • v1: any

      The first value to be compared.

    • operator: any

      The operand to perform on the two given values.

    • v2: any

      The second value to be compared

    • options: any

      The current handlebars object.

    Returns any

ifSignature

  • ifSignature(obj: any, arg: any): any

isTopmostModuleDeclaration

  • isTopmostModuleDeclaration(node: ModuleDeclaration): boolean
  • Check whether the given module declaration is the topmost.

    This function returns TRUE if there is no trailing module defined, in the following example this would be the case only for module C.

    module A.B.C { }

    Parameters

    • node: ModuleDeclaration

      The module definition that should be tested.

    Returns boolean

    TRUE if the given node is the topmost module declaration, FALSE otherwise.

mergeDeclarations

  • Merge the properties of the given TypeScript node with the pre existent reflection.

    Parameters

    • context: Context

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

    • reflection: DeclarationReflection

      The pre existent reflection.

    • node: Node

      The TypeScript node whose properties should be merged with the given reflection.

    • kind: ReflectionKind

      The desired kind of the reflection.

    Returns undefined | DeclarationReflection

    The reflection merged with the values of the given node or NULL if the merge is invalid.

normalize

  • normalize(pattern: string): any

normalizeName

  • normalizeName(name: string): string

normalizePath

  • normalizePath(path: string): string
  • Normalize the given path.

    Parameters

    • path: string

      The path that should be normalized.

    Returns string

    The normalized path.

offApi

onApi

onceMap

  • Reduces the event callbacks into a map of {event: onceWrapper.} offer unbinds the onceWrapper after it has been called.

    Parameters

    Returns EventMap

parseComment

  • Parse the given doc comment string.

    Parameters

    • text: string

      The doc comment string that should be parsed.

    • Default value comment: Comment = new Comment()

      The [[Models.Comment]] instance the parsed results should be stored into.

    Returns Comment

    A populated [[Models.Comment]] instance.

readFile

  • readFile(file: string): string
  • Load the given file and return its contents.

    Parameters

    • file: string

      The path of the file to read.

    Returns string

    The files contents.

resetReflectionID

  • resetReflectionID(): void

setupDeclaration

  • Setup a newly created declaration reflection.

    Parameters

    • context: Context

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

    • reflection: DeclarationReflection

      The newly created blank reflection.

    • node: Declaration

      The TypeScript node whose properties should be applies to the given reflection.

    Returns DeclarationReflection

    The reflection populated with the values of the given node.

triggerApi

triggerEvents

  • A difficult-to-believe, but optimized internal dispatch function for triggering events. Tries to keep the usual cases speedy (most internal Backbone events have 3 arguments).

    Parameters

    Returns void

wbr

  • wbr(options: any): string
  • Insert word break tags <wbr> into the given string.

    Breaks the given string at _, - and captial letters.

    Parameters

    • options: any

    Returns string

    The original string containing <wbr> tags where possible.

writeFile

  • writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: undefined | function): void
  • Write a file to disc.

    If the containing directory does not exist it will be created.

    Parameters

    • fileName: string

      The name of the file that should be written.

    • data: string

      The contents of the file.

    • writeByteOrderMark: boolean

      Whether the UTF-8 BOM should be written or not.

    • Optional onError: undefined | function

      A callback that will be invoked if an error occurs.

    Returns void

Generated using TypeDoc