Shave off ~100ms by extracting ExpandingFlags

This commit is contained in:
Ron Buckton
2017-11-03 22:11:25 -07:00
parent 208dfa6b01
commit 211b2f01c2

View File

@@ -529,6 +529,13 @@ namespace ts {
Strict,
}
const enum ExpandingFlags {
None = 0,
Source = 1,
Target = 1 << 1,
Both = Source | Target,
}
const builtinGlobals = createSymbolTable();
builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol);
@@ -9229,12 +9236,6 @@ namespace ts {
let targetStack: Type[];
let maybeCount = 0;
let depth = 0;
const enum ExpandingFlags {
None = 0,
Source = 1,
Target = 1 << 1,
Both = Source | Target,
}
let expandingFlags = ExpandingFlags.None;
let overflow = false;
let isIntersectionConstituent = false;