Home Reference Source Repository
import {ProjectSymbols} from 'ngast/dist-docs/lib/project-symbols.js'
public class | source

ProjectSymbols

Creates a proxy which provides us access to the symbols defined in given context (could be lazy loaded module or the root module).

Constructor Summary

Public Constructor
public

constructor(program: ts.Program, resourceResolver: ResourceResolver)

Creates an instance of ProjectSymbols.

Method Summary

Public Methods
public
public

getDirectiveFromNode(declaration: ts.ClassDeclaration, fileName: string): *

Returns directive based on ClassDeclaration node and a filename.

public

Returns all the directives available in the context.

public

getModules(): ModuleSymbol[]

Returns the metadata associated to this module.

public

Returns all the pipes available in this module.

public

getProviders(): ProviderSymbol[]

Returns all the providers available in this module.

public

updateProgram(program: ts.Program)

Updates the program which has impact over the loaded symbols.

Public Constructors

public constructor(program: ts.Program, resourceResolver: ResourceResolver) source

Creates an instance of ProjectSymbols.

Params:

NameTypeAttributeDescription
program ts.Program
resourceResolver ResourceResolver

Public Methods

public getAnalyzedModules(): * source

Return:

*

public getDirectiveFromNode(declaration: ts.ClassDeclaration, fileName: string): * source

Returns directive based on ClassDeclaration node and a filename.

Params:

NameTypeAttributeDescription
declaration ts.ClassDeclaration
fileName string

Return:

*

public getDirectives(): DirectiveSymbol[] source

Returns all the directives available in the context.

Return:

DirectiveSymbol[]

public getModules(): ModuleSymbol[] source

Returns the metadata associated to this module.

Return:

ModuleSymbol[]

public getPipes(): PipeSymbol[] source

Returns all the pipes available in this module.

Return:

PipeSymbol[]

public getProviders(): ProviderSymbol[] source

Returns all the providers available in this module.

Return:

ProviderSymbol[]

public updateProgram(program: ts.Program) source

Updates the program which has impact over the loaded symbols. In case the update method is called with program different from the current one, all the internal caches will be cleared.

Params:

NameTypeAttributeDescription
program ts.Program