1
1
import {
2
2
__String,
3
- __TSGO_COMPAT__,
4
3
AccessExpression,
5
4
AccessFlags,
6
5
AccessorDeclaration,
@@ -1065,6 +1064,7 @@ import {
1065
1064
tryGetModuleSpecifierFromDeclaration,
1066
1065
tryGetPropertyAccessOrIdentifierToString,
1067
1066
TryStatement,
1067
+ TSGO_COMPAT,
1068
1068
TupleType,
1069
1069
TupleTypeNode,
1070
1070
TupleTypeReference,
@@ -5396,7 +5396,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
5396
5396
}
5397
5397
5398
5398
function createTypeofType() {
5399
- return getUnionType(map(__TSGO_COMPAT__ ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
5399
+ return getUnionType(map(TSGO_COMPAT ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
5400
5400
}
5401
5401
5402
5402
function createTypeParameter(symbol?: Symbol) {
@@ -17655,11 +17655,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
17655
17655
}
17656
17656
17657
17657
function containsType(types: readonly Type[], type: Type): boolean {
17658
- return __TSGO_COMPAT__ ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
17658
+ return TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
17659
17659
}
17660
17660
17661
17661
function insertType(types: Type[], type: Type): boolean {
17662
- const index = __TSGO_COMPAT__ ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
17662
+ const index = TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
17663
17663
if (index < 0) {
17664
17664
types.splice(~index, 0, type);
17665
17665
return true;
@@ -17681,7 +17681,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
17681
17681
}
17682
17682
else {
17683
17683
const len = typeSet.length;
17684
- const index = __TSGO_COMPAT__ ? binarySearch(typeSet, type, identity, compareTypes) : (len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues));
17684
+ const index = TSGO_COMPAT ? binarySearch(typeSet, type, identity, compareTypes) : (len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues));
17685
17685
if (index < 0) {
17686
17686
typeSet.splice(~index, 0, type);
17687
17687
}
@@ -52857,7 +52857,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
52857
52857
function sortSymbolsIfTSGoCompat(array: Symbol[]): Symbol[];
52858
52858
function sortSymbolsIfTSGoCompat(array: Symbol[] | undefined): Symbol[] | undefined;
52859
52859
function sortSymbolsIfTSGoCompat(array: Symbol[] | undefined): Symbol[] | undefined {
52860
- if (__TSGO_COMPAT__ && array) {
52860
+ if (TSGO_COMPAT && array) {
52861
52861
return array.sort(compareSymbols); // eslint-disable-line local/no-array-mutating-method-expressions
52862
52862
}
52863
52863
return array;
0 commit comments