Options
All
  • Public
  • Public/Protected
  • All
Menu

TypeDoc Documentation

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

IntersectionUnion

IntersectionUnion: IntersectionType | UnionType

Variables

Const CharacterCodes

CharacterCodes: object = tsany.CharacterCodes

Faking the enum as a var (only certain codes are used by TypeDoc)

Type declaration

  • [key: string]: number
  • at: number
  • doubleQuote: number
  • minus: number
  • space: number

Const Diagnostics

Diagnostics: object = tsany.Diagnostics

Type declaration

Const ERROR_UNSUPPORTED_FILE_ENCODING

ERROR_UNSUPPORTED_FILE_ENCODING: -2147024809 = -2147024809

Return code of ts.sys.readFile when the file encoding is unsupported.

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 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 optionDeclarations

optionDeclarations: CommandLineOption[] = tsany.optionDeclarations

Const prefered

prefered: 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

Functions

Option

combinePaths

  • combinePaths(path1: string, path2: string): string

compact

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

    Parameters

    • options: any

    Returns string

    The string with all newlines stripped.

compareValues

  • compareValues<T>(a: T, b: T): number

convertDefaultValue

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

    Parameters

    • node: VariableDeclaration | ParameterDeclaration | EnumMember

      The TypeScript node whose default value should be extracted.

    Returns string

    The default value as a string.

convertExpression

  • convertExpression(expression: Expression): string

createComment

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

    Parameters

    • node: Node

      The node whose comment should be returned.

    Returns Comment

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

createCompilerDiagnostic

  • createCompilerDiagnostic(message: DiagnosticMessage, ...args: (string | number)[]): Diagnostic
  • createCompilerDiagnostic(message: DiagnosticMessage): 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: Node

      The TypeScript node that should be converted to a reflection.

    • kind: ReflectionKind

      The desired kind of the reflection.

    • Optional name: string

      The desired name of the reflection.

    Returns DeclarationReflection

    The resulting reflection.

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

    The newly created parameter reflection.

createReferenceType

  • 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

      The symbol the reference type should point to.

    • Optional includeParent: boolean

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

    Returns ReferenceType

    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

    The newly created type parameter reflection.

declarationNameToString

  • declarationNameToString(name: ts.DeclarationName): string

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

    The return type reflection of the given signature.

getClassExtendsHeritageClauseElement

  • getClassExtendsHeritageClauseElement(node: ts.ClassLikeDeclaration | InterfaceDeclaration): any
  • Parameters

    • node: ts.ClassLikeDeclaration | InterfaceDeclaration

    Returns any

getClassImplementsHeritageClauseElements

  • getClassImplementsHeritageClauseElements(node: ts.ClassLikeDeclaration): any

getDirectoryPath

  • getDirectoryPath(path: ts.Path): ts.Path
  • getDirectoryPath(path: string): string

getInterfaceBaseTypeNodes

  • getInterfaceBaseTypeNodes(node: InterfaceDeclaration): any

getJSDocCommentRanges

  • getJSDocCommentRanges(node: Node, text: string): any

getOptionsHelp

  • getOptionsHelp(options: Options): string

getParameterHelp

getRawComment

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

    Parameters

    • node: Node

      The node whose comment should be resolved.

    Returns string

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

getRootLength

  • getRootLength(path: string): number

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

getSourceFileOfNode

  • getSourceFileOfNode(node: Node): SourceFile

getTextOfNode

  • getTextOfNode(node: Node, includeTrivia?: boolean): string
  • Parameters

    • node: Node
    • Default value includeTrivia: boolean = false

    Returns string

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

isBindingPattern

  • isBindingPattern(node: Node): boolean

isTopmostModuleDeclaration

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

    This funtion 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 DeclarationReflection

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

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.

normalizeSlashes

  • normalizeSlashes(path: string): string

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: Node

      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?: 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: function

      A callback that will be invoked if an error occurs.

        • (message: string): void
        • Parameters

          • message: string

          Returns void

    Returns void

Generated using TypeDoc