Module ASTHelpers

Index

Functions

Functions

docComments(ast: AST): Comment[]

Parameters

Returns

Comment[]

enumIsElided(declaration: EnumDeclaration): boolean

Parameters

Returns

boolean

getAstAtPosition(script: AST, pos: number, useTrailingTriviaAsLimChar?: boolean, forceInclusive?: boolean): AST

Parameters

  • script: AST
  • pos: number
  • useTrailingTriviaAsLimChar?: boolean optional
  • forceInclusive?: boolean optional

Returns

AST

getEnclosingMemberVariableDeclaration(ast: AST): MemberVariableDeclaration

Parameters

Returns

MemberVariableDeclaration

getEnclosingModuleDeclaration(ast: AST): ModuleDeclaration

Parameters

Returns

ModuleDeclaration

getEnclosingParameterForInitializer(ast: AST): Parameter

Parameters

Returns

Parameter

getExtendsHeritageClause(clauses: ISyntaxList2): HeritageClause

Parameters

Returns

HeritageClause

getImplementsHeritageClause(clauses: ISyntaxList2): HeritageClause

Parameters

Returns

HeritageClause

getModuleDeclarationFromNameAST(ast: AST): ModuleDeclaration

Parameters

Returns

ModuleDeclaration

getModuleNames(name: AST, result?: Identifier[]): Identifier[]

Parameters

Returns

Identifier[]

getNameOfIdenfierOrQualifiedName(name: AST): string

Parameters

Returns

string

getParameterList(ast: AST): ParameterList

Parameters

Returns

ParameterList

getType(ast: AST): AST

Parameters

Returns

AST

getVariableDeclaratorModifiers(variableDeclarator: VariableDeclarator): PullElementFlags[]

Parameters

Returns

PullElementFlags[]

isCallExpression(ast: AST): boolean

Parameters

Returns

boolean

isCallExpressionTarget(ast: AST): boolean

Parameters

Returns

boolean

isDeclarationAST(ast: AST): boolean

Parameters

Returns

boolean

isDeclarationASTOrDeclarationNameAST(ast: AST): boolean

Parameters

Returns

boolean

isIntegerLiteralAST(expression: AST): boolean

Parameters

  • expression: AST

Returns

boolean

isLastNameOfModule(ast: ModuleDeclaration, astName: AST): boolean

Parameters

Returns

boolean

isNameOfFunction(ast: AST): boolean

Parameters

Returns

boolean

isNameOfMemberAccessExpression(ast: AST): boolean

Parameters

Returns

boolean

isNameOfMemberFunction(ast: AST): boolean

Parameters

Returns

boolean

isRightSideOfQualifiedName(ast: AST): boolean

Parameters

Returns

boolean

isValidAstNode(ast: IASTSpan): boolean

Parameters

Returns

boolean

moduleIsElided(declaration: ModuleDeclaration): boolean

Parameters

Returns

boolean

parametersFromIdentifier(id: Identifier): IParameters

Parameters

Returns

IParameters

parametersFromParameter(parameter: Parameter): IParameters

Parameters

Returns

IParameters

parametersFromParameterList(list: ParameterList): IParameters

Parameters

Returns

IParameters

parentIsModuleDeclaration(ast: AST): boolean

Parameters

Returns

boolean

scriptIsElided(sourceUnit: SourceUnit): boolean

Parameters

Returns

boolean