KC's Workspace
    Preparing search index...
    interface TypeChecker {
        getIndexInfosOfIndexSymbol: (
            indexSymbol: Symbol,
            siblingSymbols?: Symbol[],
        ) => IndexInfo[];
        getAliasedSymbol(symbol: Symbol): Symbol;
        getAmbientModules(): Symbol[];
        getAnyType(): Type;
        getApparentType(type: Type): Type;
        getAugmentedPropertiesOfType(type: Type): Symbol[];
        getAwaitedType(type: Type): Type | undefined;
        getBaseConstraintOfType(type: Type): Type | undefined;
        getBaseTypeOfLiteralType(type: Type): Type;
        getBaseTypes(type: InterfaceType): BaseType[];
        getBigIntLiteralType(value: PseudoBigInt): BigIntLiteralType;
        getBigIntType(): Type;
        getBooleanType(): Type;
        getConstantValue(
            node: EnumMember | PropertyAccessExpression | ElementAccessExpression,
        ): string | number | undefined;
        getContextualType(node: Expression): Type | undefined;
        getDeclaredTypeOfSymbol(symbol: Symbol): Type;
        getDefaultFromTypeParameter(type: Type): Type | undefined;
        getESSymbolType(): Type;
        getExportsOfModule(moduleSymbol: Symbol): Symbol[];
        getExportSpecifierLocalTargetSymbol(
            location: Identifier | ExportSpecifier,
        ): Symbol | undefined;
        getExportSymbolOfSymbol(symbol: Symbol): Symbol;
        getFalseType(): Type;
        getFullyQualifiedName(symbol: Symbol): string;
        getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined;
        getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
        getIndexInfosOfType(type: Type): readonly IndexInfo[];
        getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
        getJsxIntrinsicTagNamesAt(location: Node): Symbol[];
        getMergedSymbol(symbol: Symbol): Symbol;
        getNeverType(): Type;
        getNonNullableType(type: Type): Type;
        getNonPrimitiveType(): Type;
        getNullableType(type: Type, flags: TypeFlags): Type;
        getNullType(): Type;
        getNumberLiteralType(value: number): NumberLiteralType;
        getNumberType(): Type;
        getPrivateIdentifierPropertyOfType(
            leftType: Type,
            name: string,
            location: Node,
        ): Symbol | undefined;
        getPropertiesOfType(type: Type): Symbol[];
        getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
        getPropertySymbolOfDestructuringAssignment(
            location: Identifier,
        ): Symbol | undefined;
        getResolvedSignature(
            node: CallLikeExpression,
            candidatesOutArray?: Signature[],
            argumentCount?: number,
        ): Signature | undefined;
        getReturnTypeOfSignature(signature: Signature): Type;
        getRootSymbols(symbol: Symbol): readonly Symbol[];
        getShorthandAssignmentValueSymbol(
            location: Node | undefined,
        ): Symbol | undefined;
        getSignatureFromDeclaration(
            declaration: SignatureDeclaration,
        ): Signature | undefined;
        getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
        getStringLiteralType(value: string): StringLiteralType;
        getStringType(): Type;
        getSymbolAtLocation(node: Node): Symbol | undefined;
        getSymbolOfExpando(
            node: Node,
            allowDeclaration: boolean,
        ): Symbol | undefined;
        getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
        getSymbolsOfParameterPropertyDeclaration(
            parameter: ParameterDeclaration,
            parameterName: string,
        ): Symbol[];
        getTrueType(): Type;
        getTypeArguments(type: TypeReference): readonly Type[];
        getTypeArgumentsForResolvedSignature(
            signature: Signature,
        ): readonly Type[] | undefined;
        getTypeAtLocation(node: Node): Type;
        getTypeFromTypeNode(node: TypeNode): Type;
        getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type;
        getTypeOfSymbol(symbol: Symbol): Type;
        getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
        getTypePredicateOfSignature(
            signature: Signature,
        ): TypePredicate | undefined;
        getUndefinedType(): Type;
        getUnknownType(): Type;
        getVoidType(): Type;
        getWidenedType(type: Type): Type;
        indexInfoToIndexSignatureDeclaration(
            indexInfo: IndexInfo,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): IndexSignatureDeclaration | undefined;
        isArgumentsSymbol(symbol: Symbol): boolean;
        isArrayLikeType(type: Type): boolean;
        isArrayType(type: Type): boolean;
        isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
        isOptionalParameter(node: ParameterDeclaration): boolean;
        isTupleType(type: Type): boolean;
        isTypeAssignableTo(source: Type, target: Type): boolean;
        isUndefinedSymbol(symbol: Symbol): boolean;
        isUnknownSymbol(symbol: Symbol): boolean;
        isValidPropertyAccess(
            node: QualifiedName | PropertyAccessExpression | ImportTypeNode,
            propertyName: string,
        ): boolean;
        resolveName(
            name: string,
            location: Node | undefined,
            meaning: SymbolFlags,
            excludeGlobals: boolean,
        ): Symbol | undefined;
        runWithCancellationToken<T>(
            token: CancellationToken,
            cb: (checker: TypeChecker) => T,
        ): T;
        signatureToSignatureDeclaration(
            signature: Signature,
            kind: SyntaxKind,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ):
            | (SignatureDeclaration & { typeArguments?: NodeArray<TypeNode>; })
            | undefined;
        signatureToString(
            signature: Signature,
            enclosingDeclaration?: Node,
            flags?: TypeFormatFlags,
            kind?: SignatureKind,
        ): string;
        symbolToEntityName(
            symbol: Symbol,
            meaning: SymbolFlags,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): EntityName | undefined;
        symbolToExpression(
            symbol: Symbol,
            meaning: SymbolFlags,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): Expression | undefined;
        symbolToParameterDeclaration(
            symbol: Symbol,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): ParameterDeclaration | undefined;
        symbolToString(
            symbol: Symbol,
            enclosingDeclaration?: Node,
            meaning?: SymbolFlags,
            flags?: SymbolFormatFlags,
        ): string;
        symbolToTypeParameterDeclarations(
            symbol: Symbol,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): NodeArray<TypeParameterDeclaration> | undefined;
        tryGetMemberInModuleExports(
            memberName: string,
            moduleSymbol: Symbol,
        ): Symbol | undefined;
        typeParameterToDeclaration(
            parameter: TypeParameter,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): TypeParameterDeclaration | undefined;
        typePredicateToString(
            predicate: TypePredicate,
            enclosingDeclaration?: Node,
            flags?: TypeFormatFlags,
        ): string;
        typeToString(
            type: Type,
            enclosingDeclaration?: Node,
            flags?: TypeFormatFlags,
        ): string;
        typeToTypeNode(
            type: Type,
            enclosingDeclaration: Node | undefined,
            flags: NodeBuilderFlags | undefined,
        ): TypeNode | undefined;
    }
    Index

    Properties

    Methods

    getAliasedSymbol getAmbientModules getAnyType getApparentType getAugmentedPropertiesOfType getAwaitedType getBaseConstraintOfType getBaseTypeOfLiteralType getBaseTypes getBigIntLiteralType getBigIntType getBooleanType getConstantValue getContextualType getDeclaredTypeOfSymbol getDefaultFromTypeParameter getESSymbolType getExportsOfModule getExportSpecifierLocalTargetSymbol getExportSymbolOfSymbol getFalseType getFullyQualifiedName getImmediateAliasedSymbol getIndexInfoOfType getIndexInfosOfType getIndexTypeOfType getJsxIntrinsicTagNamesAt getMergedSymbol getNeverType getNonNullableType getNonPrimitiveType getNullableType getNullType getNumberLiteralType getNumberType getPrivateIdentifierPropertyOfType getPropertiesOfType getPropertyOfType getPropertySymbolOfDestructuringAssignment getResolvedSignature getReturnTypeOfSignature getRootSymbols getShorthandAssignmentValueSymbol getSignatureFromDeclaration getSignaturesOfType getStringLiteralType getStringType getSymbolAtLocation getSymbolOfExpando getSymbolsInScope getSymbolsOfParameterPropertyDeclaration getTrueType getTypeArguments getTypeArgumentsForResolvedSignature getTypeAtLocation getTypeFromTypeNode getTypeOfAssignmentPattern getTypeOfSymbol getTypeOfSymbolAtLocation getTypePredicateOfSignature getUndefinedType getUnknownType getVoidType getWidenedType indexInfoToIndexSignatureDeclaration isArgumentsSymbol isArrayLikeType isArrayType isImplementationOfOverload isOptionalParameter isTupleType isTypeAssignableTo isUndefinedSymbol isUnknownSymbol isValidPropertyAccess resolveName runWithCancellationToken signatureToSignatureDeclaration signatureToString symbolToEntityName symbolToExpression symbolToParameterDeclaration symbolToString symbolToTypeParameterDeclarations tryGetMemberInModuleExports typeParameterToDeclaration typePredicateToString typeToString typeToTypeNode

    Properties

    getIndexInfosOfIndexSymbol: (
        indexSymbol: Symbol,
        siblingSymbols?: Symbol[],
    ) => IndexInfo[]

    Methods

    • Follow all aliases to get the original symbol.

      Parameters

      Returns Symbol

    • Gets the intrinsic any type. There are multiple types that act as any used internally in the compiler, so the type returned by this function should not be used in equality checks to determine if another type is any. Instead, use type.flags & TypeFlags.Any.

      Returns Type

    • Gets the "awaited type" of a type.

      If an expression has a Promise-like type, the "awaited type" of the expression is derived from the type of the first argument of the fulfillment callback for that Promise's then method. If the "awaited type" is itself a Promise-like, it is recursively unwrapped in the same manner until a non-promise type is found.

      If an expression does not have a Promise-like type, its "awaited type" is the type of the expression.

      If the resulting "awaited type" is a generic object type, then it is wrapped in an Awaited<T>.

      In the event the "awaited type" circularly references itself, or is a non-Promise object-type with a callable then() method, an "awaited type" cannot be determined and the value undefined will be returned.

      This is used to reflect the runtime behavior of the await keyword.

      Parameters

      Returns Type | undefined

    • Parameters

      Returns Type | undefined

    • Parameters

      Returns Type

    • Returns Type

    • Returns Type

    • Parameters

      Returns Type | undefined

    • Returns Type

    • 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

    • Parameters

      Returns string

    • Follow a single alias to get the immediately aliased symbol.

      Parameters

      Returns Symbol | undefined

    • Gets the intrinsic never type. There are multiple types that act as never used internally in the compiler, so the type returned by this function should not be used in equality checks to determine if another type is never. Instead, use type.flags & TypeFlags.Never.

      Returns Type

    • Gets the intrinsic object type.

      Returns Type

    • Gets the intrinsic null type. There are multiple types that act as null used internally in the compiler, so the type returned by this function should not be used in equality checks to determine if another type is null. Instead, use type.flags & TypeFlags.Null.

      Returns Type

    • Returns Type

    • Parameters

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

      Returns Symbol | undefined

    • Parameters

      • type: Type
      • propertyName: string

      Returns Symbol | undefined

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

      Parameters

      • node: CallLikeExpression
      • OptionalcandidatesOutArray: Signature[]
      • OptionalargumentCount: number

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

      Returns Signature | undefined

    • 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

      • location: Node | undefined

      Returns Symbol | undefined

    • Returns Type

    • Parameters

      Returns Symbol | undefined

    • Parameters

      • node: Node
      • allowDeclaration: boolean

      Returns Symbol | undefined

    • Parameters

      Returns readonly Type[] | undefined

    • Gets the intrinsic undefined type. There are multiple types that act as undefined used internally in the compiler depending on compiler options, so the type returned by this function should not be used in equality checks to determine if another type is undefined. Instead, use type.flags & TypeFlags.Undefined.

      Returns Type

    • Returns Type

    • Parameters

      Returns boolean

    • True if this type is assignable to ReadonlyArray<any>.

      Parameters

      Returns boolean

    • True if this type is the Array or ReadonlyArray type from lib.d.ts. This function will not return true if passed a type which extends Array (for example, the TypeScript AST's NodeArray type).

      Parameters

      Returns boolean

    • True if this type is a tuple type. This function will not return true if passed a type which extends from a tuple.

      Parameters

      Returns boolean

    • Returns true if the "source" type is assignable to the "target" type.

      declare const abcLiteral: ts.Type; // Type of "abc"
      declare const stringType: ts.Type; // Type of string

      isTypeAssignableTo(abcLiteral, abcLiteral); // true; "abc" is assignable to "abc"
      isTypeAssignableTo(abcLiteral, stringType); // true; "abc" is assignable to string
      isTypeAssignableTo(stringType, abcLiteral); // false; string is not assignable to "abc"
      isTypeAssignableTo(stringType, stringType); // true; string is assignable to string

      Parameters

      Returns boolean

    • Parameters

      Returns boolean

    • Parameters

      Returns boolean

    • Parameters

      • name: string
      • location: Node | undefined
      • meaning: SymbolFlags
      • excludeGlobals: boolean

      Returns Symbol | undefined

    • 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

    • Note that the resulting nodes cannot be checked.

      Parameters

      Returns (SignatureDeclaration & { typeArguments?: NodeArray<TypeNode>; }) | undefined

    • Parameters

      • memberName: string
      • moduleSymbol: Symbol

      Returns Symbol | undefined

    • Note that the resulting nodes cannot be checked.

      Parameters

      Returns TypeNode | undefined