Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/ast/ts-ast-util"

Index

Variables

Const debug

debug: Debugger = debugFactory('ts-ast-util')

Functions

getChildComponents

  • getChildComponents(clazz: ClassDeclaration, defaultClassDeclaration: ClassDeclaration | undefined, getComponentClassFromObjectLiteral: (rawObjectExpr: ObjectLiteralExpression) => ClassDeclaration): Map<TagName, ComponentReference>
  • Parameters

    • clazz: ClassDeclaration
    • defaultClassDeclaration: ClassDeclaration | undefined
    • getComponentClassFromObjectLiteral: (rawObjectExpr: ObjectLiteralExpression) => ClassDeclaration
        • (rawObjectExpr: ObjectLiteralExpression): ClassDeclaration
        • Parameters

          • rawObjectExpr: ObjectLiteralExpression

          Returns ClassDeclaration

    Returns Map<TagName, ComponentReference>

getComponentClassIdentifier

  • getComponentClassIdentifier(sourceFile: SourceFile): string | undefined
  • import {Component as OtherName} from 'san'; 获取到 “OtherName”

    Parameters

    • sourceFile: SourceFile

    Returns string | undefined

getLiteralText

  • getLiteralText(expr: Node): undefined | string

getObjectLiteralPropertyKeys

  • getObjectLiteralPropertyKeys(clazz: ClassDeclaration, propertyName: string): string[]

getPropertyAssignmentName

  • getPropertyAssignmentName(prop: PropertyAssignment | ShorthandPropertyAssignment | MethodDeclaration): string
  • Parameters

    • prop: PropertyAssignment | ShorthandPropertyAssignment | MethodDeclaration

    Returns string

getPropertyStringArrayValue

  • getPropertyStringArrayValue<T>(clazz: ClassDeclaration, memberName: string): T | undefined
  • Type parameters

    • T: string[]

    Parameters

    • clazz: ClassDeclaration
    • memberName: string

    Returns T | undefined

getPropertyStringValue

  • getPropertyStringValue<T>(clazz: ClassDeclaration, memberName: string, defaultValue: T): T
  • getPropertyStringValue<T>(clazz: ClassDeclaration, memberName: string): T | undefined
  • Type parameters

    • T: string

    Parameters

    • clazz: ClassDeclaration
    • memberName: string
    • defaultValue: T

    Returns T

  • Type parameters

    • T: string

    Parameters

    • clazz: ClassDeclaration
    • memberName: string

    Returns T | undefined

getSanImportDeclaration

  • getSanImportDeclaration(sourceFile: SourceFile): ImportDeclaration | undefined

isChildClassOf

  • isChildClassOf(clazz: ClassDeclaration, parentClass: string): boolean

Generated using TypeDoc