You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CheckFlags.DeferredType, getTypeOfSymbolWithDeferredType], // Check for instantiated symbols
12292
+
[CheckFlags.Instantiated, getTypeOfInstantiatedSymbol], // Check for mapped symbols (cast to MappedSymbol)
12293
+
[CheckFlags.Mapped, (sym) => getTypeOfMappedSymbol(sym as MappedSymbol)], // Check for reverse-mapped symbols (cast to ReverseMappedSymbol)
12294
+
[CheckFlags.ReverseMapped, (sym) => getTypeOfReverseMappedSymbol(sym as ReverseMappedSymbol)], // Check for variables and properties
12295
+
[SymbolFlags.Variable | SymbolFlags.Property, getTypeOfVariableOrParameterOrProperty], // Check for functions, methods, classes, enums, and value modules
12296
+
[SymbolFlags.Function | SymbolFlags.Method | SymbolFlags.Class | SymbolFlags.Enum | SymbolFlags.ValueModule, getTypeOfFuncClassEnumModule], // Check for enum members
12297
+
[SymbolFlags.EnumMember, getTypeOfEnumMember], // Check for accessor symbols
12298
+
[SymbolFlags.Accessor, getTypeOfAccessors], // Check for alias symbols
12299
+
[SymbolFlags.Alias, getTypeOfAlias],
12300
+
];
12301
+
12302
+
// Iterate through the mapping and return the corresponding type if a flag matches
12303
+
for (const [flag, resolver] of typeResolvers) {
12304
+
if ((checkFlags & flag) || (symbol.flags & flag)) {
12305
+
return resolver(symbol);
12306
+
}
12307
+
}
12308
+
12309
+
// Return the error type if no conditions match
12313
12310
return errorType;
12314
-
}
12311
+
}
12315
12312
12316
12313
function getNonMissingTypeOfSymbol(symbol: Symbol) {
0 commit comments