Skip to content

Commit 4282067

Browse files
timocovjakebailey
andauthored
Exposed TypeChecker.resolveName API to public along with SymbolFlags.All (#56932)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
1 parent 0a2b0bb commit 4282067

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/types.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5257,7 +5257,7 @@ export interface TypeChecker {
52575257
* @internal
52585258
*/
52595259
getAllPossiblePropertiesOfTypes(type: readonly Type[]): Symbol[];
5260-
/** @internal */ resolveName(name: string, location: Node | undefined, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined;
5260+
resolveName(name: string, location: Node | undefined, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined;
52615261
/** @internal */ getJsxNamespace(location?: Node): string;
52625262
/** @internal */ getJsxFragmentFactory(location: Node): string | undefined;
52635263

@@ -5762,9 +5762,7 @@ export const enum SymbolFlags {
57625762
Transient = 1 << 25, // Transient symbol (created during type check)
57635763
Assignment = 1 << 26, // Assignment treated as declaration (eg `this.prop = 1`)
57645764
ModuleExports = 1 << 27, // Symbol for CommonJS `module` of `module.exports`
5765-
/** @internal */
5766-
All = FunctionScopedVariable | BlockScopedVariable | Property | EnumMember | Function | Class | Interface | ConstEnum | RegularEnum | ValueModule | NamespaceModule | TypeLiteral
5767-
| ObjectLiteral | Method | Constructor | GetAccessor | SetAccessor | Signature | TypeParameter | TypeAlias | ExportValue | Alias | Prototype | ExportStar | Optional | Transient,
5765+
All = -1,
57685766

57695767
Enum = RegularEnum | ConstEnum,
57705768
Variable = FunctionScopedVariable | BlockScopedVariable,

tests/baselines/reference/api/typescript.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6892,6 +6892,7 @@ declare namespace ts {
68926892
* True if this type is assignable to `ReadonlyArray<any>`.
68936893
*/
68946894
isArrayLikeType(type: Type): boolean;
6895+
resolveName(name: string, location: Node | undefined, meaning: SymbolFlags, excludeGlobals: boolean): Symbol | undefined;
68956896
getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined;
68966897
/**
68976898
* Depending on the operation performed, it may be appropriate to throw away the checker
@@ -7031,6 +7032,7 @@ declare namespace ts {
70317032
Transient = 33554432,
70327033
Assignment = 67108864,
70337034
ModuleExports = 134217728,
7035+
All = -1,
70347036
Enum = 384,
70357037
Variable = 3,
70367038
Value = 111551,

0 commit comments

Comments
 (0)