mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Make getTypeOfSymbol, isArrayType, isTupleType public on TypeChecker (#52467)
This commit is contained in:
+16
-4
@@ -4927,7 +4927,7 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost {
|
||||
|
||||
export interface TypeChecker {
|
||||
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
|
||||
/** @internal */ getTypeOfSymbol(symbol: Symbol): Type;
|
||||
getTypeOfSymbol(symbol: Symbol): Type;
|
||||
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
|
||||
getPropertiesOfType(type: Type): Symbol[];
|
||||
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
|
||||
@@ -5153,9 +5153,21 @@ export interface TypeChecker {
|
||||
/** @internal */ getRecursionIdentity(type: Type): object | undefined;
|
||||
/** @internal */ getUnmatchedProperties(source: Type, target: Type, requireOptionalProperties: boolean, matchDiscriminantProperties: boolean): IterableIterator<Symbol>;
|
||||
|
||||
/** @internal */ isArrayType(type: Type): boolean;
|
||||
/** @internal */ isTupleType(type: Type): boolean;
|
||||
/** @internal */ isArrayLikeType(type: Type): 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).
|
||||
*/
|
||||
isArrayType(type: Type): boolean;
|
||||
/**
|
||||
* True if this type is a tuple type. This function will _not_ return true if
|
||||
* passed a type which extends from a tuple.
|
||||
*/
|
||||
isTupleType(type: Type): boolean;
|
||||
/**
|
||||
* True if this type is assignable to `ReadonlyArray<any>`.
|
||||
*/
|
||||
isArrayLikeType(type: Type): boolean;
|
||||
|
||||
/**
|
||||
* True if `contextualType` should not be considered for completions because
|
||||
|
||||
@@ -6310,6 +6310,7 @@ declare namespace ts {
|
||||
}
|
||||
interface TypeChecker {
|
||||
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
|
||||
getTypeOfSymbol(symbol: Symbol): Type;
|
||||
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
|
||||
getPropertiesOfType(type: Type): Symbol[];
|
||||
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
|
||||
@@ -6400,6 +6401,21 @@ declare namespace ts {
|
||||
getApparentType(type: Type): Type;
|
||||
getBaseConstraintOfType(type: Type): Type | undefined;
|
||||
getDefaultFromTypeParameter(type: Type): Type | undefined;
|
||||
/**
|
||||
* 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).
|
||||
*/
|
||||
isArrayType(type: Type): boolean;
|
||||
/**
|
||||
* True if this type is a tuple type. This function will _not_ return true if
|
||||
* passed a type which extends from a tuple.
|
||||
*/
|
||||
isTupleType(type: Type): boolean;
|
||||
/**
|
||||
* True if this type is assignable to `ReadonlyArray<any>`.
|
||||
*/
|
||||
isArrayLikeType(type: Type): boolean;
|
||||
getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined;
|
||||
/**
|
||||
* Depending on the operation performed, it may be appropriate to throw away the checker
|
||||
|
||||
+16
@@ -2335,6 +2335,7 @@ declare namespace ts {
|
||||
}
|
||||
interface TypeChecker {
|
||||
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
|
||||
getTypeOfSymbol(symbol: Symbol): Type;
|
||||
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
|
||||
getPropertiesOfType(type: Type): Symbol[];
|
||||
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
|
||||
@@ -2425,6 +2426,21 @@ declare namespace ts {
|
||||
getApparentType(type: Type): Type;
|
||||
getBaseConstraintOfType(type: Type): Type | undefined;
|
||||
getDefaultFromTypeParameter(type: Type): Type | undefined;
|
||||
/**
|
||||
* 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).
|
||||
*/
|
||||
isArrayType(type: Type): boolean;
|
||||
/**
|
||||
* True if this type is a tuple type. This function will _not_ return true if
|
||||
* passed a type which extends from a tuple.
|
||||
*/
|
||||
isTupleType(type: Type): boolean;
|
||||
/**
|
||||
* True if this type is assignable to `ReadonlyArray<any>`.
|
||||
*/
|
||||
isArrayLikeType(type: Type): boolean;
|
||||
getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined;
|
||||
/**
|
||||
* Depending on the operation performed, it may be appropriate to throw away the checker
|
||||
|
||||
Reference in New Issue
Block a user