Magic.happens('here'); This class is the parser of the whole extension. It uses the typescript compiler to parse a file or given source code into the token stream and therefore into the AST of the source. Afterwards an array of resources is generated and returned.

Export

Hierarchy

  • TypescriptParser

Constructors

Methods

  • Private

    Recursive function that runs through the AST of a source and parses the nodes. Creates the class / function / etc declarations and instanciates a new module / namespace resource if needed.

    Memberof

    TsResourceParser

    Parameters

    Returns void

  • Parses the given source into an anonymous File resource. Mainly used to parse source code of a document.

    Returns

    Memberof

    TsResourceParser

    Parameters

    • source: string
    • Optional scriptKind: ScriptKind = ScriptKind.TS

    Returns Promise<File>

  • Private

    Parses the typescript source into the file instance. Calls .parse afterwards to get the declarations and other information about the source.

    Returns

    Memberof

    TsResourceParser

    Parameters

    • source: SourceFile
    • rootPath: string

    Returns File

Generated using TypeDoc