11import {
22 __String,
3- __TSGO_COMPAT__,
43 AccessExpression,
54 AccessFlags,
65 AccessorDeclaration,
@@ -1065,6 +1064,7 @@ import {
10651064 tryGetModuleSpecifierFromDeclaration,
10661065 tryGetPropertyAccessOrIdentifierToString,
10671066 TryStatement,
1067+ TSGO_COMPAT,
10681068 TupleType,
10691069 TupleTypeNode,
10701070 TupleTypeReference,
@@ -5396,7 +5396,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
53965396 }
53975397
53985398 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));
54005400 }
54015401
54025402 function createTypeParameter(symbol?: Symbol) {
@@ -17655,11 +17655,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1765517655 }
1765617656
1765717657 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;
1765917659 }
1766017660
1766117661 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);
1766317663 if (index < 0) {
1766417664 types.splice(~index, 0, type);
1766517665 return true;
@@ -17681,7 +17681,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1768117681 }
1768217682 else {
1768317683 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));
1768517685 if (index < 0) {
1768617686 typeSet.splice(~index, 0, type);
1768717687 }
@@ -52857,7 +52857,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
5285752857 function sortSymbolsIfTSGoCompat(array: Symbol[]): Symbol[];
5285852858 function sortSymbolsIfTSGoCompat(array: Symbol[] | undefined): Symbol[] | undefined;
5285952859 function sortSymbolsIfTSGoCompat(array: Symbol[] | undefined): Symbol[] | undefined {
52860- if (__TSGO_COMPAT__ && array) {
52860+ if (TSGO_COMPAT && array) {
5286152861 return array.sort(compareSymbols); // eslint-disable-line local/no-array-mutating-method-expressions
5286252862 }
5286352863 return array;
0 commit comments