mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
move TypeVarDepth further up, so its declared before it's used
This commit is contained in:
@@ -1240,6 +1240,13 @@ export class TypeTable {
|
||||
let indexOnStack = stack.length;
|
||||
stack.push(id);
|
||||
|
||||
/** Indicates if a type contains no type variables, is a type variable, or strictly contains type variables. */
|
||||
const enum TypeVarDepth {
|
||||
noTypeVar = 0,
|
||||
isTypeVar = 1,
|
||||
containsTypeVar = 2,
|
||||
}
|
||||
|
||||
for (let symbol of type.getProperties()) {
|
||||
let propertyType = typeTable.tryGetTypeOfSymbol(symbol);
|
||||
if (propertyType == null) continue;
|
||||
@@ -1267,13 +1274,6 @@ export class TypeTable {
|
||||
|
||||
return lowlinkTable.get(id);
|
||||
|
||||
/** Indicates if a type contains no type variables, is a type variable, or strictly contains type variables. */
|
||||
const enum TypeVarDepth {
|
||||
noTypeVar = 0,
|
||||
isTypeVar = 1,
|
||||
containsTypeVar = 2,
|
||||
}
|
||||
|
||||
function traverseType(type: ts.Type): TypeVarDepth {
|
||||
if (isTypeVariable(type)) return TypeVarDepth.isTypeVar;
|
||||
let depth = TypeVarDepth.noTypeVar;
|
||||
|
||||
Reference in New Issue
Block a user