Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TypeChecker

Hierarchy

  • TypeChecker

Index

Methods

getAliasedSymbol

  • Follow all aliases to get the original symbol.

    Parameters

    Returns Symbol

getAmbientModules

  • getAmbientModules(): Symbol[]
  • Returns Symbol[]

getApparentType

  • Parameters

    Returns Type

getAugmentedPropertiesOfType

  • getAugmentedPropertiesOfType(type: Type): Symbol[]
  • Parameters

    Returns Symbol[]

getBaseConstraintOfType

  • getBaseConstraintOfType(type: Type): Type
  • Parameters

    Returns Type

getBaseTypeOfLiteralType

  • getBaseTypeOfLiteralType(type: Type): Type
  • Parameters

    Returns Type

getBaseTypes

  • Parameters

    Returns BaseType[]

getConstantValue

getContextualType

  • Parameters

    Returns Type

getDeclaredTypeOfSymbol

  • Parameters

    Returns Type

getDefaultFromTypeParameter

  • getDefaultFromTypeParameter(type: Type): Type
  • Parameters

    Returns Type

getExportSpecifierLocalTargetSymbol

getExportSymbolOfSymbol

  • If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. Otherwise returns its input. For example, at export type T = number;: - getSymbolAtLocation at the location T will return the exported symbol for T. - But the result of getSymbolsInScope will contain the local symbol for T, not the exported symbol. - Calling getExportSymbolOfSymbol on that local symbol will return the exported symbol.

    Parameters

    Returns Symbol

getExportsOfModule

  • Parameters

    Returns Symbol[]

getFullyQualifiedName

  • getFullyQualifiedName(symbol: Symbol): string
  • Parameters

    Returns string

getIndexInfoOfType

  • Parameters

    Returns IndexInfo

getIndexTypeOfType

  • Parameters

    Returns Type

getJsxIntrinsicTagNamesAt

  • getJsxIntrinsicTagNamesAt(location: Node): Symbol[]
  • Parameters

    Returns Symbol[]

getNonNullableType

  • Parameters

    Returns Type

getNullableType

  • Parameters

    Returns Type

getPrivateIdentifierPropertyOfType

  • getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol
  • Parameters

    • leftType: Type
    • name: string
    • location: Node

    Returns Symbol

getPropertiesOfType

  • Parameters

    Returns Symbol[]

getPropertyOfType

  • getPropertyOfType(type: Type, propertyName: string): Symbol
  • Parameters

    • type: Type
    • propertyName: string

    Returns Symbol

getPropertySymbolOfDestructuringAssignment

  • Parameters

    Returns Symbol

getResolvedSignature

  • returns unknownSignature in the case of an error. returns undefined if the node is not valid.

    Parameters

    • node: CallLikeExpression
    • Optional candidatesOutArray: Signature[]
    • Optional argumentCount: number

      Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See signatureHelp.ts.

    Returns Signature

getReturnTypeOfSignature

  • Parameters

    Returns Type

getRootSymbols

  • Parameters

    Returns readonly Symbol[]

getShorthandAssignmentValueSymbol

  • getShorthandAssignmentValueSymbol(location: Node): Symbol
  • The function returns the value (local variable) symbol of an identifier in the short-hand property assignment. This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.

    Parameters

    Returns Symbol

getSignatureFromDeclaration

getSignaturesOfType

  • Parameters

    Returns readonly Signature[]

getSymbolAtLocation

  • Parameters

    Returns Symbol

getSymbolOfExpando

  • getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol
  • Parameters

    • node: Node
    • allowDeclaration: boolean

    Returns Symbol

getSymbolsInScope

  • Parameters

    Returns Symbol[]

getSymbolsOfParameterPropertyDeclaration

  • Parameters

    Returns Symbol[]

getTypeArguments

  • Parameters

    Returns readonly Type[]

getTypeAtLocation

  • Parameters

    Returns Type

getTypeFromTypeNode

  • Parameters

    Returns Type

getTypeOfAssignmentPattern

  • Parameters

    Returns Type

getTypeOfSymbolAtLocation

  • Parameters

    Returns Type

getWidenedType

  • Parameters

    Returns Type

indexInfoToIndexSignatureDeclaration

isArgumentsSymbol

  • isArgumentsSymbol(symbol: Symbol): boolean
  • Parameters

    Returns boolean

isImplementationOfOverload

  • Parameters

    Returns boolean

isOptionalParameter

  • Parameters

    Returns boolean

isUndefinedSymbol

  • isUndefinedSymbol(symbol: Symbol): boolean
  • Parameters

    Returns boolean

isUnknownSymbol

  • isUnknownSymbol(symbol: Symbol): boolean
  • Parameters

    Returns boolean

isValidPropertyAccess

runWithCancellationToken

  • Depending on the operation performed, it may be appropriate to throw away the checker if the cancellation token is triggered. Typically, if it is used for error checking and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.

    Type parameters

    • T

    Parameters

    Returns T

signatureToSignatureDeclaration

signatureToString

  • Parameters

    Returns string

symbolToEntityName

symbolToExpression

symbolToParameterDeclaration

symbolToString

  • Parameters

    Returns string

symbolToTypeParameterDeclarations

tryGetMemberInModuleExports

  • tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol
  • Parameters

    • memberName: string
    • moduleSymbol: Symbol

    Returns Symbol

typeParameterToDeclaration

typePredicateToString

  • Parameters

    Returns string

typeToString

  • Parameters

    Returns string

typeToTypeNode

  • Note that the resulting nodes cannot be checked.

    Parameters

    Returns TypeNode

Generated using TypeDoc