typescript 5.0.0-dev.20230105 → 5.0.0-dev.20230107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/lib/tsc.js +293 -176
- package/lib/tsserver.js +370 -416
- package/lib/tsserverlibrary.d.ts +2 -17
- package/lib/tsserverlibrary.js +374 -412
- package/lib/typescript.d.ts +2 -17
- package/lib/typescript.js +359 -375
- package/lib/typingsInstaller.js +49 -71
- package/package.json +1 -1
package/lib/typescript.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230107`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -53,17 +53,6 @@ var ts = (() => {
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
// src/compiler/core.ts
|
|
56
|
-
function getIterator(iterable) {
|
|
57
|
-
if (iterable) {
|
|
58
|
-
if (isArray(iterable))
|
|
59
|
-
return arrayIterator(iterable);
|
|
60
|
-
if (iterable instanceof Map)
|
|
61
|
-
return iterable.entries();
|
|
62
|
-
if (iterable instanceof Set)
|
|
63
|
-
return iterable.values();
|
|
64
|
-
throw new Error("Iteration not supported.");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
56
|
function length(array) {
|
|
68
57
|
return array ? array.length : 0;
|
|
69
58
|
}
|
|
@@ -102,22 +91,21 @@ var ts = (() => {
|
|
|
102
91
|
return void 0;
|
|
103
92
|
}
|
|
104
93
|
function firstDefinedIterator(iter, callback) {
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
if (iterResult.done) {
|
|
108
|
-
return void 0;
|
|
109
|
-
}
|
|
110
|
-
const result = callback(iterResult.value);
|
|
94
|
+
for (const value of iter) {
|
|
95
|
+
const result = callback(value);
|
|
111
96
|
if (result !== void 0) {
|
|
112
97
|
return result;
|
|
113
98
|
}
|
|
114
99
|
}
|
|
100
|
+
return void 0;
|
|
115
101
|
}
|
|
116
102
|
function reduceLeftIterator(iterator, f, initial) {
|
|
117
103
|
let result = initial;
|
|
118
104
|
if (iterator) {
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
let pos = 0;
|
|
106
|
+
for (const value of iterator) {
|
|
107
|
+
result = f(result, value, pos);
|
|
108
|
+
pos++;
|
|
121
109
|
}
|
|
122
110
|
}
|
|
123
111
|
return result;
|
|
@@ -130,27 +118,6 @@ var ts = (() => {
|
|
|
130
118
|
}
|
|
131
119
|
return result;
|
|
132
120
|
}
|
|
133
|
-
function zipToIterator(arrayA, arrayB) {
|
|
134
|
-
Debug.assertEqual(arrayA.length, arrayB.length);
|
|
135
|
-
let i = 0;
|
|
136
|
-
return {
|
|
137
|
-
next() {
|
|
138
|
-
if (i === arrayA.length) {
|
|
139
|
-
return { value: void 0, done: true };
|
|
140
|
-
}
|
|
141
|
-
i++;
|
|
142
|
-
return { value: [arrayA[i - 1], arrayB[i - 1]], done: false };
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function zipToMap(keys, values) {
|
|
147
|
-
Debug.assert(keys.length === values.length);
|
|
148
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
149
|
-
for (let i = 0; i < keys.length; ++i) {
|
|
150
|
-
map2.set(keys[i], values[i]);
|
|
151
|
-
}
|
|
152
|
-
return map2;
|
|
153
|
-
}
|
|
154
121
|
function intersperse(input, element) {
|
|
155
122
|
if (input.length <= 1) {
|
|
156
123
|
return input;
|
|
@@ -301,13 +268,10 @@ var ts = (() => {
|
|
|
301
268
|
}
|
|
302
269
|
return result;
|
|
303
270
|
}
|
|
304
|
-
function mapIterator(iter, mapFn) {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return iterRes.done ? iterRes : { value: mapFn(iterRes.value), done: false };
|
|
309
|
-
}
|
|
310
|
-
};
|
|
271
|
+
function* mapIterator(iter, mapFn) {
|
|
272
|
+
for (const x of iter) {
|
|
273
|
+
yield mapFn(x);
|
|
274
|
+
}
|
|
311
275
|
}
|
|
312
276
|
function sameMap(array, f) {
|
|
313
277
|
if (array) {
|
|
@@ -371,30 +335,12 @@ var ts = (() => {
|
|
|
371
335
|
}
|
|
372
336
|
return result;
|
|
373
337
|
}
|
|
374
|
-
function flatMapIterator(iter, mapfn) {
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
return {
|
|
381
|
-
next() {
|
|
382
|
-
while (true) {
|
|
383
|
-
const currentRes = currentIter.next();
|
|
384
|
-
if (!currentRes.done) {
|
|
385
|
-
return currentRes;
|
|
386
|
-
}
|
|
387
|
-
const iterRes = iter.next();
|
|
388
|
-
if (iterRes.done) {
|
|
389
|
-
return iterRes;
|
|
390
|
-
}
|
|
391
|
-
currentIter = getIterator2(iterRes.value);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
function getIterator2(x) {
|
|
396
|
-
const res = mapfn(x);
|
|
397
|
-
return res === void 0 ? emptyIterator : isArray(res) ? arrayIterator(res) : res;
|
|
338
|
+
function* flatMapIterator(iter, mapfn) {
|
|
339
|
+
for (const x of iter) {
|
|
340
|
+
const iter2 = mapfn(x);
|
|
341
|
+
if (!iter2)
|
|
342
|
+
continue;
|
|
343
|
+
yield* iter2;
|
|
398
344
|
}
|
|
399
345
|
}
|
|
400
346
|
function sameFlatMap(array, mapfn) {
|
|
@@ -440,21 +386,13 @@ var ts = (() => {
|
|
|
440
386
|
}
|
|
441
387
|
return result;
|
|
442
388
|
}
|
|
443
|
-
function mapDefinedIterator(iter, mapFn) {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
if (res.done) {
|
|
449
|
-
return res;
|
|
450
|
-
}
|
|
451
|
-
const value = mapFn(res.value);
|
|
452
|
-
if (value !== void 0) {
|
|
453
|
-
return { value, done: false };
|
|
454
|
-
}
|
|
455
|
-
}
|
|
389
|
+
function* mapDefinedIterator(iter, mapFn) {
|
|
390
|
+
for (const x of iter) {
|
|
391
|
+
const value = mapFn(x);
|
|
392
|
+
if (value !== void 0) {
|
|
393
|
+
yield value;
|
|
456
394
|
}
|
|
457
|
-
}
|
|
395
|
+
}
|
|
458
396
|
}
|
|
459
397
|
function mapDefinedEntries(map2, f) {
|
|
460
398
|
if (!map2) {
|
|
@@ -472,18 +410,6 @@ var ts = (() => {
|
|
|
472
410
|
});
|
|
473
411
|
return result;
|
|
474
412
|
}
|
|
475
|
-
function mapDefinedValues(set, f) {
|
|
476
|
-
if (set) {
|
|
477
|
-
const result = /* @__PURE__ */ new Set();
|
|
478
|
-
set.forEach((value) => {
|
|
479
|
-
const newValue = f(value);
|
|
480
|
-
if (newValue !== void 0) {
|
|
481
|
-
result.add(newValue);
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
return result;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
413
|
function getOrUpdate(map2, key, callback) {
|
|
488
414
|
if (map2.has(key)) {
|
|
489
415
|
return map2.get(key);
|
|
@@ -499,15 +425,8 @@ var ts = (() => {
|
|
|
499
425
|
}
|
|
500
426
|
return false;
|
|
501
427
|
}
|
|
502
|
-
function singleIterator(value) {
|
|
503
|
-
|
|
504
|
-
return {
|
|
505
|
-
next() {
|
|
506
|
-
const wasDone = done;
|
|
507
|
-
done = true;
|
|
508
|
-
return wasDone ? { value: void 0, done: true } : { value, done: false };
|
|
509
|
-
}
|
|
510
|
-
};
|
|
428
|
+
function* singleIterator(value) {
|
|
429
|
+
yield value;
|
|
511
430
|
}
|
|
512
431
|
function spanMap(array, keyfn, mapfn) {
|
|
513
432
|
let result;
|
|
@@ -751,13 +670,6 @@ var ts = (() => {
|
|
|
751
670
|
}
|
|
752
671
|
return result;
|
|
753
672
|
}
|
|
754
|
-
function sum(array, prop) {
|
|
755
|
-
let result = 0;
|
|
756
|
-
for (const v of array) {
|
|
757
|
-
result += v[prop];
|
|
758
|
-
}
|
|
759
|
-
return result;
|
|
760
|
-
}
|
|
761
673
|
function append(to, value) {
|
|
762
674
|
if (value === void 0)
|
|
763
675
|
return to;
|
|
@@ -816,29 +728,10 @@ var ts = (() => {
|
|
|
816
728
|
function sort(array, comparer) {
|
|
817
729
|
return array.length === 0 ? array : array.slice().sort(comparer);
|
|
818
730
|
}
|
|
819
|
-
function
|
|
820
|
-
let i = 0;
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
return { value: void 0, done: true };
|
|
824
|
-
} else {
|
|
825
|
-
i++;
|
|
826
|
-
return { value: array[i - 1], done: false };
|
|
827
|
-
}
|
|
828
|
-
} };
|
|
829
|
-
}
|
|
830
|
-
function arrayReverseIterator(array) {
|
|
831
|
-
let i = array.length;
|
|
832
|
-
return {
|
|
833
|
-
next: () => {
|
|
834
|
-
if (i === 0) {
|
|
835
|
-
return { value: void 0, done: true };
|
|
836
|
-
} else {
|
|
837
|
-
i--;
|
|
838
|
-
return { value: array[i], done: false };
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
};
|
|
731
|
+
function* arrayReverseIterator(array) {
|
|
732
|
+
for (let i = array.length - 1; i >= 0; i--) {
|
|
733
|
+
yield array[i];
|
|
734
|
+
}
|
|
842
735
|
}
|
|
843
736
|
function stableSort(array, comparer) {
|
|
844
737
|
const indices = indicesOf(array);
|
|
@@ -854,22 +747,27 @@ var ts = (() => {
|
|
|
854
747
|
}
|
|
855
748
|
return true;
|
|
856
749
|
}
|
|
857
|
-
function
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
750
|
+
function firstOrUndefined(array) {
|
|
751
|
+
return array === void 0 || array.length === 0 ? void 0 : array[0];
|
|
752
|
+
}
|
|
753
|
+
function firstOrUndefinedIterator(iter) {
|
|
754
|
+
if (iter) {
|
|
755
|
+
for (const value of iter) {
|
|
756
|
+
return value;
|
|
862
757
|
}
|
|
863
758
|
}
|
|
864
759
|
return void 0;
|
|
865
760
|
}
|
|
866
|
-
function firstOrUndefined(array) {
|
|
867
|
-
return array === void 0 || array.length === 0 ? void 0 : array[0];
|
|
868
|
-
}
|
|
869
761
|
function first(array) {
|
|
870
762
|
Debug.assert(array.length !== 0);
|
|
871
763
|
return array[0];
|
|
872
764
|
}
|
|
765
|
+
function firstIterator(iter) {
|
|
766
|
+
for (const value of iter) {
|
|
767
|
+
return value;
|
|
768
|
+
}
|
|
769
|
+
Debug.fail("iterator is empty");
|
|
770
|
+
}
|
|
873
771
|
function lastOrUndefined(array) {
|
|
874
772
|
return array === void 0 || array.length === 0 ? void 0 : array[array.length - 1];
|
|
875
773
|
}
|
|
@@ -972,9 +870,6 @@ var ts = (() => {
|
|
|
972
870
|
}
|
|
973
871
|
return values;
|
|
974
872
|
}
|
|
975
|
-
function getEntries(obj) {
|
|
976
|
-
return obj ? _entries(obj) : [];
|
|
977
|
-
}
|
|
978
873
|
function arrayOf(count, f) {
|
|
979
874
|
const result = new Array(count);
|
|
980
875
|
for (let i = 0; i < count; i++) {
|
|
@@ -984,8 +879,8 @@ var ts = (() => {
|
|
|
984
879
|
}
|
|
985
880
|
function arrayFrom(iterator, map2) {
|
|
986
881
|
const result = [];
|
|
987
|
-
for (
|
|
988
|
-
result.push(map2 ? map2(
|
|
882
|
+
for (const value of iterator) {
|
|
883
|
+
result.push(map2 ? map2(value) : value);
|
|
989
884
|
}
|
|
990
885
|
return result;
|
|
991
886
|
}
|
|
@@ -1146,35 +1041,14 @@ var ts = (() => {
|
|
|
1146
1041
|
function createSet(getHashCode, equals) {
|
|
1147
1042
|
const multiMap = /* @__PURE__ */ new Map();
|
|
1148
1043
|
let size = 0;
|
|
1149
|
-
function getElementIterator() {
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
if (arrayIt) {
|
|
1156
|
-
const n = arrayIt.next();
|
|
1157
|
-
if (!n.done) {
|
|
1158
|
-
return { value: n.value };
|
|
1159
|
-
}
|
|
1160
|
-
arrayIt = void 0;
|
|
1161
|
-
} else {
|
|
1162
|
-
const n = valueIt.next();
|
|
1163
|
-
if (n.done) {
|
|
1164
|
-
return { value: void 0, done: true };
|
|
1165
|
-
}
|
|
1166
|
-
if (!isArray(n.value)) {
|
|
1167
|
-
return { value: n.value };
|
|
1168
|
-
}
|
|
1169
|
-
arrayIt = arrayIterator(n.value);
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
},
|
|
1173
|
-
[Symbol.iterator]: () => {
|
|
1174
|
-
return it;
|
|
1044
|
+
function* getElementIterator() {
|
|
1045
|
+
for (const value of multiMap.values()) {
|
|
1046
|
+
if (isArray(value)) {
|
|
1047
|
+
yield* value;
|
|
1048
|
+
} else {
|
|
1049
|
+
yield value;
|
|
1175
1050
|
}
|
|
1176
|
-
}
|
|
1177
|
-
return it;
|
|
1051
|
+
}
|
|
1178
1052
|
}
|
|
1179
1053
|
const set = {
|
|
1180
1054
|
has(element) {
|
|
@@ -1267,16 +1141,10 @@ var ts = (() => {
|
|
|
1267
1141
|
values() {
|
|
1268
1142
|
return getElementIterator();
|
|
1269
1143
|
},
|
|
1270
|
-
entries() {
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
const n = it.next();
|
|
1275
|
-
return n.done ? n : { value: [n.value, n.value] };
|
|
1276
|
-
},
|
|
1277
|
-
[Symbol.iterator]: () => it2
|
|
1278
|
-
};
|
|
1279
|
-
return it2;
|
|
1144
|
+
*entries() {
|
|
1145
|
+
for (const value of getElementIterator()) {
|
|
1146
|
+
yield [value, value];
|
|
1147
|
+
}
|
|
1280
1148
|
},
|
|
1281
1149
|
[Symbol.iterator]: () => {
|
|
1282
1150
|
return getElementIterator();
|
|
@@ -1286,7 +1154,7 @@ var ts = (() => {
|
|
|
1286
1154
|
return set;
|
|
1287
1155
|
}
|
|
1288
1156
|
function isArray(value) {
|
|
1289
|
-
return Array.isArray
|
|
1157
|
+
return Array.isArray(value);
|
|
1290
1158
|
}
|
|
1291
1159
|
function toArray(value) {
|
|
1292
1160
|
return isArray(value) ? value : [value];
|
|
@@ -1361,25 +1229,6 @@ var ts = (() => {
|
|
|
1361
1229
|
return value;
|
|
1362
1230
|
};
|
|
1363
1231
|
}
|
|
1364
|
-
function compose(a, b, c, d, e) {
|
|
1365
|
-
if (!!e) {
|
|
1366
|
-
const args = [];
|
|
1367
|
-
for (let i = 0; i < arguments.length; i++) {
|
|
1368
|
-
args[i] = arguments[i];
|
|
1369
|
-
}
|
|
1370
|
-
return (t) => reduceLeft(args, (u, f) => f(u), t);
|
|
1371
|
-
} else if (d) {
|
|
1372
|
-
return (t) => d(c(b(a(t))));
|
|
1373
|
-
} else if (c) {
|
|
1374
|
-
return (t) => c(b(a(t)));
|
|
1375
|
-
} else if (b) {
|
|
1376
|
-
return (t) => b(a(t));
|
|
1377
|
-
} else if (a) {
|
|
1378
|
-
return (t) => a(t);
|
|
1379
|
-
} else {
|
|
1380
|
-
return (t) => t;
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
1232
|
function equateValues(a, b) {
|
|
1384
1233
|
return a === b;
|
|
1385
1234
|
}
|
|
@@ -1682,13 +1531,6 @@ var ts = (() => {
|
|
|
1682
1531
|
}
|
|
1683
1532
|
return hasChanges;
|
|
1684
1533
|
}
|
|
1685
|
-
function fill(length2, cb) {
|
|
1686
|
-
const result = Array(length2);
|
|
1687
|
-
for (let i = 0; i < length2; i++) {
|
|
1688
|
-
result[i] = cb(i);
|
|
1689
|
-
}
|
|
1690
|
-
return result;
|
|
1691
|
-
}
|
|
1692
1534
|
function cartesianProduct(arrays) {
|
|
1693
1535
|
const result = [];
|
|
1694
1536
|
cartesianProductWorker(
|
|
@@ -1742,7 +1584,7 @@ var ts = (() => {
|
|
|
1742
1584
|
function isNodeLikeSystem() {
|
|
1743
1585
|
return typeof process !== "undefined" && process.nextTick && !process.browser && typeof module === "object";
|
|
1744
1586
|
}
|
|
1745
|
-
var emptyArray, emptyMap, emptySet,
|
|
1587
|
+
var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, noopPush, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart;
|
|
1746
1588
|
var init_core = __esm({
|
|
1747
1589
|
"src/compiler/core.ts"() {
|
|
1748
1590
|
"use strict";
|
|
@@ -1750,7 +1592,6 @@ var ts = (() => {
|
|
|
1750
1592
|
emptyArray = [];
|
|
1751
1593
|
emptyMap = /* @__PURE__ */ new Map();
|
|
1752
1594
|
emptySet = /* @__PURE__ */ new Set();
|
|
1753
|
-
emptyIterator = { next: () => ({ value: void 0, done: true }) };
|
|
1754
1595
|
SortKind = /* @__PURE__ */ ((SortKind2) => {
|
|
1755
1596
|
SortKind2[SortKind2["None"] = 0] = "None";
|
|
1756
1597
|
SortKind2[SortKind2["CaseSensitive"] = 1] = "CaseSensitive";
|
|
@@ -1758,15 +1599,16 @@ var ts = (() => {
|
|
|
1758
1599
|
SortKind2[SortKind2["Both"] = 3] = "Both";
|
|
1759
1600
|
return SortKind2;
|
|
1760
1601
|
})(SortKind || {});
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1602
|
+
elementAt = !!Array.prototype.at ? (array, offset) => array == null ? void 0 : array.at(offset) : (array, offset) => {
|
|
1603
|
+
if (array) {
|
|
1604
|
+
offset = toOffset(array, offset);
|
|
1605
|
+
if (offset < array.length) {
|
|
1606
|
+
return array[offset];
|
|
1607
|
+
}
|
|
1767
1608
|
}
|
|
1768
|
-
return
|
|
1769
|
-
}
|
|
1609
|
+
return void 0;
|
|
1610
|
+
};
|
|
1611
|
+
hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1770
1612
|
noopPush = {
|
|
1771
1613
|
push: noop,
|
|
1772
1614
|
length: 0
|
|
@@ -2643,7 +2485,7 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;
|
|
|
2643
2485
|
return height2 + 1;
|
|
2644
2486
|
}
|
|
2645
2487
|
function computeColumnWidths(height2) {
|
|
2646
|
-
const columns =
|
|
2488
|
+
const columns = fill(Array(height2), 0);
|
|
2647
2489
|
for (const node of nodes) {
|
|
2648
2490
|
columns[node.level] = Math.max(columns[node.level], node.text.length);
|
|
2649
2491
|
}
|
|
@@ -2726,9 +2568,9 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;
|
|
|
2726
2568
|
function renderGraph() {
|
|
2727
2569
|
const columnCount = columnWidths.length;
|
|
2728
2570
|
const laneCount = nodes.reduce((x, n) => Math.max(x, n.lane), 0) + 1;
|
|
2729
|
-
const lanes =
|
|
2571
|
+
const lanes = fill(Array(laneCount), "");
|
|
2730
2572
|
const grid = columnWidths.map(() => Array(laneCount));
|
|
2731
|
-
const connectors = columnWidths.map(() =>
|
|
2573
|
+
const connectors = columnWidths.map(() => fill(Array(laneCount), 0));
|
|
2732
2574
|
for (const node of nodes) {
|
|
2733
2575
|
grid[node.level][node.lane] = node;
|
|
2734
2576
|
const children = getChildren(node);
|
|
@@ -2774,17 +2616,17 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;
|
|
|
2774
2616
|
for (let column = 0; column < columnCount; column++) {
|
|
2775
2617
|
for (let lane = 0; lane < lanes.length; lane++) {
|
|
2776
2618
|
const connector = connectors[column][lane];
|
|
2777
|
-
const
|
|
2619
|
+
const fill2 = connector & 4 /* Left */ ? "\u2500" /* lr */ : " ";
|
|
2778
2620
|
const node = grid[column][lane];
|
|
2779
2621
|
if (!node) {
|
|
2780
2622
|
if (column < columnCount - 1) {
|
|
2781
|
-
writeLane(lane, repeat(
|
|
2623
|
+
writeLane(lane, repeat(fill2, columnWidths[column] + 1));
|
|
2782
2624
|
}
|
|
2783
2625
|
} else {
|
|
2784
2626
|
writeLane(lane, node.text);
|
|
2785
2627
|
if (column < columnCount - 1) {
|
|
2786
2628
|
writeLane(lane, " ");
|
|
2787
|
-
writeLane(lane, repeat(
|
|
2629
|
+
writeLane(lane, repeat(fill2, columnWidths[column] - node.text.length));
|
|
2788
2630
|
}
|
|
2789
2631
|
}
|
|
2790
2632
|
writeLane(lane, getBoxCharacter(connector));
|
|
@@ -2825,7 +2667,7 @@ ${lanes.join("\n")}
|
|
|
2825
2667
|
}
|
|
2826
2668
|
return " ";
|
|
2827
2669
|
}
|
|
2828
|
-
function
|
|
2670
|
+
function fill(array, value) {
|
|
2829
2671
|
if (array.fill) {
|
|
2830
2672
|
array.fill(value);
|
|
2831
2673
|
} else {
|
|
@@ -11259,8 +11101,8 @@ ${lanes.join("\n")}
|
|
|
11259
11101
|
await: 133 /* AwaitKeyword */,
|
|
11260
11102
|
of: 162 /* OfKeyword */
|
|
11261
11103
|
};
|
|
11262
|
-
textToKeyword = new Map(
|
|
11263
|
-
textToToken = new Map(
|
|
11104
|
+
textToKeyword = new Map(Object.entries(textToKeywordObj));
|
|
11105
|
+
textToToken = new Map(Object.entries({
|
|
11264
11106
|
...textToKeywordObj,
|
|
11265
11107
|
"{": 18 /* OpenBraceToken */,
|
|
11266
11108
|
"}": 19 /* CloseBraceToken */,
|
|
@@ -12885,8 +12727,7 @@ ${lanes.join("\n")}
|
|
|
12885
12727
|
}
|
|
12886
12728
|
function forEachEntry(map2, callback) {
|
|
12887
12729
|
const iterator = map2.entries();
|
|
12888
|
-
for (
|
|
12889
|
-
const [key, value] = iterResult.value;
|
|
12730
|
+
for (const [key, value] of iterator) {
|
|
12890
12731
|
const result = callback(value, key);
|
|
12891
12732
|
if (result) {
|
|
12892
12733
|
return result;
|
|
@@ -12896,8 +12737,8 @@ ${lanes.join("\n")}
|
|
|
12896
12737
|
}
|
|
12897
12738
|
function forEachKey(map2, callback) {
|
|
12898
12739
|
const iterator = map2.keys();
|
|
12899
|
-
for (
|
|
12900
|
-
const result = callback(
|
|
12740
|
+
for (const key of iterator) {
|
|
12741
|
+
const result = callback(key);
|
|
12901
12742
|
if (result) {
|
|
12902
12743
|
return result;
|
|
12903
12744
|
}
|
|
@@ -18626,7 +18467,7 @@ ${lanes.join("\n")}
|
|
|
18626
18467
|
doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
|
|
18627
18468
|
singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
|
|
18628
18469
|
backtickQuoteEscapedCharsRegExp = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g;
|
|
18629
|
-
escapedCharsMap = new Map(
|
|
18470
|
+
escapedCharsMap = new Map(Object.entries({
|
|
18630
18471
|
" ": "\\t",
|
|
18631
18472
|
"\v": "\\v",
|
|
18632
18473
|
"\f": "\\f",
|
|
@@ -18649,7 +18490,7 @@ ${lanes.join("\n")}
|
|
|
18649
18490
|
nonAsciiCharacters = /[^\u0000-\u007F]/g;
|
|
18650
18491
|
jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g;
|
|
18651
18492
|
jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g;
|
|
18652
|
-
jsxEscapedCharsMap = new Map(
|
|
18493
|
+
jsxEscapedCharsMap = new Map(Object.entries({
|
|
18653
18494
|
'"': """,
|
|
18654
18495
|
"'": "'"
|
|
18655
18496
|
}));
|
|
@@ -27797,7 +27638,6 @@ ${lanes.join("\n")}
|
|
|
27797
27638
|
let currentToken;
|
|
27798
27639
|
let nodeCount;
|
|
27799
27640
|
let identifiers;
|
|
27800
|
-
let privateIdentifiers;
|
|
27801
27641
|
let identifierCount;
|
|
27802
27642
|
let parsingContext;
|
|
27803
27643
|
let notParenthesizedArrow;
|
|
@@ -27950,7 +27790,6 @@ ${lanes.join("\n")}
|
|
|
27950
27790
|
parseDiagnostics = [];
|
|
27951
27791
|
parsingContext = 0;
|
|
27952
27792
|
identifiers = /* @__PURE__ */ new Map();
|
|
27953
|
-
privateIdentifiers = /* @__PURE__ */ new Map();
|
|
27954
27793
|
identifierCount = 0;
|
|
27955
27794
|
nodeCount = 0;
|
|
27956
27795
|
sourceFlags = 0;
|
|
@@ -28691,16 +28530,9 @@ ${lanes.join("\n")}
|
|
|
28691
28530
|
parseExpected(23 /* CloseBracketToken */);
|
|
28692
28531
|
return finishNode(factory2.createComputedPropertyName(expression), pos);
|
|
28693
28532
|
}
|
|
28694
|
-
function internPrivateIdentifier(text) {
|
|
28695
|
-
let privateIdentifier = privateIdentifiers.get(text);
|
|
28696
|
-
if (privateIdentifier === void 0) {
|
|
28697
|
-
privateIdentifiers.set(text, privateIdentifier = text);
|
|
28698
|
-
}
|
|
28699
|
-
return privateIdentifier;
|
|
28700
|
-
}
|
|
28701
28533
|
function parsePrivateIdentifier() {
|
|
28702
28534
|
const pos = getNodePos();
|
|
28703
|
-
const node = factory2.createPrivateIdentifier(
|
|
28535
|
+
const node = factory2.createPrivateIdentifier(internIdentifier(scanner2.getTokenValue()));
|
|
28704
28536
|
nextToken();
|
|
28705
28537
|
return finishNode(node, pos);
|
|
28706
28538
|
}
|
|
@@ -36411,9 +36243,9 @@ ${lanes.join("\n")}
|
|
|
36411
36243
|
case "object":
|
|
36412
36244
|
return {};
|
|
36413
36245
|
default:
|
|
36414
|
-
const
|
|
36415
|
-
if (
|
|
36416
|
-
return
|
|
36246
|
+
const value = firstOrUndefinedIterator(option.type.keys());
|
|
36247
|
+
if (value !== void 0)
|
|
36248
|
+
return value;
|
|
36417
36249
|
return Debug.fail("Expected 'option.type' to have entries.");
|
|
36418
36250
|
}
|
|
36419
36251
|
}
|
|
@@ -36427,14 +36259,14 @@ ${lanes.join("\n")}
|
|
|
36427
36259
|
type: "boolean",
|
|
36428
36260
|
defaultValueDescription: false
|
|
36429
36261
|
};
|
|
36430
|
-
jsxOptionMap = new Map(
|
|
36262
|
+
jsxOptionMap = new Map(Object.entries({
|
|
36431
36263
|
"preserve": 1 /* Preserve */,
|
|
36432
36264
|
"react-native": 3 /* ReactNative */,
|
|
36433
36265
|
"react": 2 /* React */,
|
|
36434
36266
|
"react-jsx": 4 /* ReactJSX */,
|
|
36435
36267
|
"react-jsxdev": 5 /* ReactJSXDev */
|
|
36436
36268
|
}));
|
|
36437
|
-
inverseJsxOptionMap = new Map(
|
|
36269
|
+
inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key, value]) => ["" + value, key]));
|
|
36438
36270
|
libEntries = [
|
|
36439
36271
|
// JavaScript only
|
|
36440
36272
|
["es5", "lib.es5.d.ts"],
|
|
@@ -36515,7 +36347,7 @@ ${lanes.join("\n")}
|
|
|
36515
36347
|
optionsForWatch = [
|
|
36516
36348
|
{
|
|
36517
36349
|
name: "watchFile",
|
|
36518
|
-
type: new Map(
|
|
36350
|
+
type: new Map(Object.entries({
|
|
36519
36351
|
fixedpollinginterval: 0 /* FixedPollingInterval */,
|
|
36520
36352
|
prioritypollinginterval: 1 /* PriorityPollingInterval */,
|
|
36521
36353
|
dynamicprioritypolling: 2 /* DynamicPriorityPolling */,
|
|
@@ -36529,7 +36361,7 @@ ${lanes.join("\n")}
|
|
|
36529
36361
|
},
|
|
36530
36362
|
{
|
|
36531
36363
|
name: "watchDirectory",
|
|
36532
|
-
type: new Map(
|
|
36364
|
+
type: new Map(Object.entries({
|
|
36533
36365
|
usefsevents: 0 /* UseFsEvents */,
|
|
36534
36366
|
fixedpollinginterval: 1 /* FixedPollingInterval */,
|
|
36535
36367
|
dynamicprioritypolling: 2 /* DynamicPriorityPolling */,
|
|
@@ -36541,7 +36373,7 @@ ${lanes.join("\n")}
|
|
|
36541
36373
|
},
|
|
36542
36374
|
{
|
|
36543
36375
|
name: "fallbackPolling",
|
|
36544
|
-
type: new Map(
|
|
36376
|
+
type: new Map(Object.entries({
|
|
36545
36377
|
fixedinterval: 0 /* FixedInterval */,
|
|
36546
36378
|
priorityinterval: 1 /* PriorityInterval */,
|
|
36547
36379
|
dynamicpriority: 2 /* DynamicPriority */,
|
|
@@ -36772,7 +36604,7 @@ ${lanes.join("\n")}
|
|
|
36772
36604
|
targetOptionDeclaration = {
|
|
36773
36605
|
name: "target",
|
|
36774
36606
|
shortName: "t",
|
|
36775
|
-
type: new Map(
|
|
36607
|
+
type: new Map(Object.entries({
|
|
36776
36608
|
es3: 0 /* ES3 */,
|
|
36777
36609
|
es5: 1 /* ES5 */,
|
|
36778
36610
|
es6: 2 /* ES2015 */,
|
|
@@ -36799,7 +36631,7 @@ ${lanes.join("\n")}
|
|
|
36799
36631
|
moduleOptionDeclaration = {
|
|
36800
36632
|
name: "module",
|
|
36801
36633
|
shortName: "m",
|
|
36802
|
-
type: new Map(
|
|
36634
|
+
type: new Map(Object.entries({
|
|
36803
36635
|
none: 0 /* None */,
|
|
36804
36636
|
commonjs: 1 /* CommonJS */,
|
|
36805
36637
|
amd: 2 /* AMD */,
|
|
@@ -37022,7 +36854,7 @@ ${lanes.join("\n")}
|
|
|
37022
36854
|
},
|
|
37023
36855
|
{
|
|
37024
36856
|
name: "importsNotUsedAsValues",
|
|
37025
|
-
type: new Map(
|
|
36857
|
+
type: new Map(Object.entries({
|
|
37026
36858
|
remove: 0 /* Remove */,
|
|
37027
36859
|
preserve: 1 /* Preserve */,
|
|
37028
36860
|
error: 2 /* Error */
|
|
@@ -37224,7 +37056,7 @@ ${lanes.join("\n")}
|
|
|
37224
37056
|
// Module Resolution
|
|
37225
37057
|
{
|
|
37226
37058
|
name: "moduleResolution",
|
|
37227
|
-
type: new Map(
|
|
37059
|
+
type: new Map(Object.entries({
|
|
37228
37060
|
// N.B. The first entry specifies the value shown in `tsc --init`
|
|
37229
37061
|
node10: 2 /* Node10 */,
|
|
37230
37062
|
node: 2 /* Node10 */,
|
|
@@ -37516,7 +37348,7 @@ ${lanes.join("\n")}
|
|
|
37516
37348
|
},
|
|
37517
37349
|
{
|
|
37518
37350
|
name: "newLine",
|
|
37519
|
-
type: new Map(
|
|
37351
|
+
type: new Map(Object.entries({
|
|
37520
37352
|
crlf: 0 /* CarriageReturnLineFeed */,
|
|
37521
37353
|
lf: 1 /* LineFeed */
|
|
37522
37354
|
})),
|
|
@@ -37760,7 +37592,7 @@ ${lanes.join("\n")}
|
|
|
37760
37592
|
},
|
|
37761
37593
|
{
|
|
37762
37594
|
name: "moduleDetection",
|
|
37763
|
-
type: new Map(
|
|
37595
|
+
type: new Map(Object.entries({
|
|
37764
37596
|
auto: 2 /* Auto */,
|
|
37765
37597
|
legacy: 1 /* Legacy */,
|
|
37766
37598
|
force: 3 /* Force */
|
|
@@ -44260,9 +44092,9 @@ ${lanes.join("\n")}
|
|
|
44260
44092
|
const requireSymbol = createSymbol(4 /* Property */, "require");
|
|
44261
44093
|
let apparentArgumentCount;
|
|
44262
44094
|
const checker = {
|
|
44263
|
-
getNodeCount: () =>
|
|
44264
|
-
getIdentifierCount: () =>
|
|
44265
|
-
getSymbolCount: () =>
|
|
44095
|
+
getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0),
|
|
44096
|
+
getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0),
|
|
44097
|
+
getSymbolCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.symbolCount, symbolCount),
|
|
44266
44098
|
getTypeCount: () => typeCount,
|
|
44267
44099
|
getInstantiationCount: () => totalInstantiationCount,
|
|
44268
44100
|
getRelationCacheSizes: () => ({
|
|
@@ -55135,7 +54967,7 @@ ${lanes.join("\n")}
|
|
|
55135
54967
|
}
|
|
55136
54968
|
}
|
|
55137
54969
|
}
|
|
55138
|
-
if (!singleProp || isUnion && (propSet || checkFlags & 48 /* Partial */) && checkFlags & (1024 /* ContainsPrivate */ | 512 /* ContainsProtected */) && !(propSet && getCommonDeclarationsOfSymbols(
|
|
54970
|
+
if (!singleProp || isUnion && (propSet || checkFlags & 48 /* Partial */) && checkFlags & (1024 /* ContainsPrivate */ | 512 /* ContainsProtected */) && !(propSet && getCommonDeclarationsOfSymbols(propSet.values()))) {
|
|
55139
54971
|
return void 0;
|
|
55140
54972
|
}
|
|
55141
54973
|
if (!propSet && !(checkFlags & 16 /* ReadPartial */) && !indexTypes) {
|
|
@@ -57226,7 +57058,7 @@ ${lanes.join("\n")}
|
|
|
57226
57058
|
if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
|
|
57227
57059
|
return namedUnions[0];
|
|
57228
57060
|
}
|
|
57229
|
-
const namedTypesCount = reduceLeft(namedUnions, (
|
|
57061
|
+
const namedTypesCount = reduceLeft(namedUnions, (sum, union) => sum + union.types.length, 0);
|
|
57230
57062
|
if (namedTypesCount + reducedTypes.length === typeSet.length) {
|
|
57231
57063
|
for (const t of namedUnions) {
|
|
57232
57064
|
insertType(reducedTypes, t);
|
|
@@ -58269,14 +58101,11 @@ ${lanes.join("\n")}
|
|
|
58269
58101
|
const constraint = getConstraintOfTypeParameter(p);
|
|
58270
58102
|
return constraint && (isGenericObjectType(constraint) || isGenericIndexType(constraint)) ? cloneTypeParameter(p) : p;
|
|
58271
58103
|
}
|
|
58272
|
-
function
|
|
58273
|
-
return
|
|
58274
|
-
}
|
|
58275
|
-
function isSingletonTupleType(node) {
|
|
58276
|
-
return isTupleTypeNode(node) && length(node.elements) === 1 && !isOptionalTypeNode(node.elements[0]) && !isRestTypeNode(node.elements[0]) && !(isNamedTupleMember(node.elements[0]) && (node.elements[0].questionToken || node.elements[0].dotDotDotToken));
|
|
58104
|
+
function isSimpleTupleType(node) {
|
|
58105
|
+
return isTupleTypeNode(node) && length(node.elements) > 0 && !some(node.elements, (e) => isOptionalTypeNode(e) || isRestTypeNode(e) || isNamedTupleMember(e) && !!(e.questionToken || e.dotDotDotToken));
|
|
58277
58106
|
}
|
|
58278
|
-
function
|
|
58279
|
-
return
|
|
58107
|
+
function isDeferredType(type, checkTuples) {
|
|
58108
|
+
return isGenericType(type) || checkTuples && isTupleType(type) && some(getTypeArguments(type), isGenericType);
|
|
58280
58109
|
}
|
|
58281
58110
|
function getConditionalType(root, mapper, aliasSymbol, aliasTypeArguments) {
|
|
58282
58111
|
let result;
|
|
@@ -58288,10 +58117,10 @@ ${lanes.join("\n")}
|
|
|
58288
58117
|
result = errorType;
|
|
58289
58118
|
break;
|
|
58290
58119
|
}
|
|
58291
|
-
const
|
|
58292
|
-
const checkType = instantiateType(
|
|
58293
|
-
const
|
|
58294
|
-
const extendsType = instantiateType(
|
|
58120
|
+
const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements);
|
|
58121
|
+
const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper);
|
|
58122
|
+
const checkTypeDeferred = isDeferredType(checkType, checkTuples);
|
|
58123
|
+
const extendsType = instantiateType(root.extendsType, mapper);
|
|
58295
58124
|
if (checkType === wildcardType || extendsType === wildcardType) {
|
|
58296
58125
|
return wildcardType;
|
|
58297
58126
|
}
|
|
@@ -58313,16 +58142,16 @@ ${lanes.join("\n")}
|
|
|
58313
58142
|
}
|
|
58314
58143
|
}
|
|
58315
58144
|
}
|
|
58316
|
-
if (!
|
|
58145
|
+
if (!checkTypeDeferred) {
|
|
58317
58146
|
inferTypes(context.inferences, checkType, instantiateType(extendsType, freshMapper), 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
|
|
58318
58147
|
}
|
|
58319
58148
|
const innerMapper = combineTypeMappers(freshMapper, context.mapper);
|
|
58320
58149
|
combinedMapper = mapper ? combineTypeMappers(innerMapper, mapper) : innerMapper;
|
|
58321
58150
|
}
|
|
58322
|
-
const inferredExtendsType = combinedMapper ? instantiateType(
|
|
58323
|
-
if (!
|
|
58324
|
-
if (!(inferredExtendsType.flags & 3 /* AnyOrUnknown */) && (checkType.flags & 1 /* Any */
|
|
58325
|
-
if (checkType.flags & 1 /* Any */
|
|
58151
|
+
const inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType;
|
|
58152
|
+
if (!checkTypeDeferred && !isDeferredType(inferredExtendsType, checkTuples)) {
|
|
58153
|
+
if (!(inferredExtendsType.flags & 3 /* AnyOrUnknown */) && (checkType.flags & 1 /* Any */ || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) {
|
|
58154
|
+
if (checkType.flags & 1 /* Any */) {
|
|
58326
58155
|
(extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper));
|
|
58327
58156
|
}
|
|
58328
58157
|
const falseType2 = getTypeFromTypeNode(root.node.falseType);
|
|
@@ -59688,8 +59517,8 @@ ${lanes.join("\n")}
|
|
|
59688
59517
|
}
|
|
59689
59518
|
function elaborateElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) {
|
|
59690
59519
|
let reportedError = false;
|
|
59691
|
-
for (
|
|
59692
|
-
const { errorNode: prop, innerExpression: next, nameType, errorMessage } =
|
|
59520
|
+
for (const value of iterator) {
|
|
59521
|
+
const { errorNode: prop, innerExpression: next, nameType, errorMessage } = value;
|
|
59693
59522
|
let targetPropType = getBestMatchIndexedAccessTypeOrUndefined(source, target, nameType);
|
|
59694
59523
|
if (!targetPropType || targetPropType.flags & 8388608 /* IndexedAccess */)
|
|
59695
59524
|
continue;
|
|
@@ -59765,6 +59594,74 @@ ${lanes.join("\n")}
|
|
|
59765
59594
|
}
|
|
59766
59595
|
return reportedError;
|
|
59767
59596
|
}
|
|
59597
|
+
function elaborateIterableOrArrayLikeTargetElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) {
|
|
59598
|
+
const tupleOrArrayLikeTargetParts = filterType(target, isArrayOrTupleLikeType);
|
|
59599
|
+
const nonTupleOrArrayLikeTargetParts = filterType(target, (t) => !isArrayOrTupleLikeType(t));
|
|
59600
|
+
const iterationType = nonTupleOrArrayLikeTargetParts !== neverType ? getIterationTypeOfIterable(
|
|
59601
|
+
13 /* ForOf */,
|
|
59602
|
+
0 /* Yield */,
|
|
59603
|
+
nonTupleOrArrayLikeTargetParts,
|
|
59604
|
+
/*errorNode*/
|
|
59605
|
+
void 0
|
|
59606
|
+
) : void 0;
|
|
59607
|
+
let reportedError = false;
|
|
59608
|
+
for (let status = iterator.next(); !status.done; status = iterator.next()) {
|
|
59609
|
+
const { errorNode: prop, innerExpression: next, nameType, errorMessage } = status.value;
|
|
59610
|
+
let targetPropType = iterationType;
|
|
59611
|
+
const targetIndexedPropType = tupleOrArrayLikeTargetParts !== neverType ? getBestMatchIndexedAccessTypeOrUndefined(source, tupleOrArrayLikeTargetParts, nameType) : void 0;
|
|
59612
|
+
if (targetIndexedPropType && !(targetIndexedPropType.flags & 8388608 /* IndexedAccess */)) {
|
|
59613
|
+
targetPropType = iterationType ? getUnionType([iterationType, targetIndexedPropType]) : targetIndexedPropType;
|
|
59614
|
+
}
|
|
59615
|
+
if (!targetPropType)
|
|
59616
|
+
continue;
|
|
59617
|
+
let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType);
|
|
59618
|
+
if (!sourcePropType)
|
|
59619
|
+
continue;
|
|
59620
|
+
const propName = getPropertyNameFromIndex(
|
|
59621
|
+
nameType,
|
|
59622
|
+
/*accessNode*/
|
|
59623
|
+
void 0
|
|
59624
|
+
);
|
|
59625
|
+
if (!checkTypeRelatedTo(
|
|
59626
|
+
sourcePropType,
|
|
59627
|
+
targetPropType,
|
|
59628
|
+
relation,
|
|
59629
|
+
/*errorNode*/
|
|
59630
|
+
void 0
|
|
59631
|
+
)) {
|
|
59632
|
+
const elaborated = next && elaborateError(
|
|
59633
|
+
next,
|
|
59634
|
+
sourcePropType,
|
|
59635
|
+
targetPropType,
|
|
59636
|
+
relation,
|
|
59637
|
+
/*headMessage*/
|
|
59638
|
+
void 0,
|
|
59639
|
+
containingMessageChain,
|
|
59640
|
+
errorOutputContainer
|
|
59641
|
+
);
|
|
59642
|
+
reportedError = true;
|
|
59643
|
+
if (!elaborated) {
|
|
59644
|
+
const resultObj = errorOutputContainer || {};
|
|
59645
|
+
const specificSource = next ? checkExpressionForMutableLocationWithContextualType(next, sourcePropType) : sourcePropType;
|
|
59646
|
+
if (exactOptionalPropertyTypes && isExactOptionalPropertyMismatch(specificSource, targetPropType)) {
|
|
59647
|
+
const diag2 = createDiagnosticForNode(prop, Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, typeToString(specificSource), typeToString(targetPropType));
|
|
59648
|
+
diagnostics.add(diag2);
|
|
59649
|
+
resultObj.errors = [diag2];
|
|
59650
|
+
} else {
|
|
59651
|
+
const targetIsOptional = !!(propName && (getPropertyOfType(tupleOrArrayLikeTargetParts, propName) || unknownSymbol).flags & 16777216 /* Optional */);
|
|
59652
|
+
const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216 /* Optional */);
|
|
59653
|
+
targetPropType = removeMissingType(targetPropType, targetIsOptional);
|
|
59654
|
+
sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional);
|
|
59655
|
+
const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);
|
|
59656
|
+
if (result && specificSource !== sourcePropType) {
|
|
59657
|
+
checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);
|
|
59658
|
+
}
|
|
59659
|
+
}
|
|
59660
|
+
}
|
|
59661
|
+
}
|
|
59662
|
+
}
|
|
59663
|
+
return reportedError;
|
|
59664
|
+
}
|
|
59768
59665
|
function* generateJsxAttributes(node) {
|
|
59769
59666
|
if (!length(node.properties))
|
|
59770
59667
|
return;
|
|
@@ -59820,13 +59717,25 @@ ${lanes.join("\n")}
|
|
|
59820
59717
|
return result;
|
|
59821
59718
|
}
|
|
59822
59719
|
const moreThanOneRealChildren = length(validChildren) > 1;
|
|
59823
|
-
|
|
59824
|
-
|
|
59720
|
+
let arrayLikeTargetParts;
|
|
59721
|
+
let nonArrayLikeTargetParts;
|
|
59722
|
+
const iterableType = getGlobalIterableType(
|
|
59723
|
+
/*reportErrors*/
|
|
59724
|
+
false
|
|
59725
|
+
);
|
|
59726
|
+
if (iterableType !== emptyGenericType) {
|
|
59727
|
+
const anyIterable = createIterableType(anyType);
|
|
59728
|
+
arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable));
|
|
59729
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable));
|
|
59730
|
+
} else {
|
|
59731
|
+
arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType);
|
|
59732
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t));
|
|
59733
|
+
}
|
|
59825
59734
|
if (moreThanOneRealChildren) {
|
|
59826
59735
|
if (arrayLikeTargetParts !== neverType) {
|
|
59827
59736
|
const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */));
|
|
59828
59737
|
const children = generateJsxChildren(containingElement, getInvalidTextualChildDiagnostic);
|
|
59829
|
-
result =
|
|
59738
|
+
result = elaborateIterableOrArrayLikeTargetElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result;
|
|
59830
59739
|
} else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) {
|
|
59831
59740
|
result = true;
|
|
59832
59741
|
const diag2 = error(
|
|
@@ -63707,9 +63616,7 @@ ${lanes.join("\n")}
|
|
|
63707
63616
|
}
|
|
63708
63617
|
}
|
|
63709
63618
|
function getUnmatchedProperty(source, target, requireOptionalProperties, matchDiscriminantProperties) {
|
|
63710
|
-
|
|
63711
|
-
if (!result.done)
|
|
63712
|
-
return result.value;
|
|
63619
|
+
return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties));
|
|
63713
63620
|
}
|
|
63714
63621
|
function tupleTypesDefinitelyUnrelated(source, target) {
|
|
63715
63622
|
return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength);
|
|
@@ -64490,7 +64397,8 @@ ${lanes.join("\n")}
|
|
|
64490
64397
|
if (signature) {
|
|
64491
64398
|
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
64492
64399
|
if (inference.contraCandidates) {
|
|
64493
|
-
|
|
64400
|
+
const useCovariantType = inferredCovariantType && !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other === inference || getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)));
|
|
64401
|
+
inferredType = useCovariantType ? inferredCovariantType : getContravariantInference(inference);
|
|
64494
64402
|
} else if (inferredCovariantType) {
|
|
64495
64403
|
inferredType = inferredCovariantType;
|
|
64496
64404
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
@@ -66626,6 +66534,7 @@ ${lanes.join("\n")}
|
|
|
66626
66534
|
}
|
|
66627
66535
|
}
|
|
66628
66536
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
66537
|
+
const type = getTypeOfSymbol(symbol);
|
|
66629
66538
|
const declaration = symbol.valueDeclaration;
|
|
66630
66539
|
if (declaration) {
|
|
66631
66540
|
if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
@@ -66677,7 +66586,7 @@ ${lanes.join("\n")}
|
|
|
66677
66586
|
}
|
|
66678
66587
|
}
|
|
66679
66588
|
}
|
|
66680
|
-
return
|
|
66589
|
+
return type;
|
|
66681
66590
|
}
|
|
66682
66591
|
function checkIdentifier(node, checkMode) {
|
|
66683
66592
|
if (isThisInTypeQuery(node)) {
|
|
@@ -83319,7 +83228,7 @@ ${lanes.join("\n")}
|
|
|
83319
83228
|
TypeFacts3[TypeFacts3["AndFactsMask"] = 134209471] = "AndFactsMask";
|
|
83320
83229
|
return TypeFacts3;
|
|
83321
83230
|
})(TypeFacts || {});
|
|
83322
|
-
typeofNEFacts = new Map(
|
|
83231
|
+
typeofNEFacts = new Map(Object.entries({
|
|
83323
83232
|
string: 256 /* TypeofNEString */,
|
|
83324
83233
|
number: 512 /* TypeofNENumber */,
|
|
83325
83234
|
bigint: 1024 /* TypeofNEBigInt */,
|
|
@@ -83350,7 +83259,7 @@ ${lanes.join("\n")}
|
|
|
83350
83259
|
return SignatureCheckMode3;
|
|
83351
83260
|
})(SignatureCheckMode || {});
|
|
83352
83261
|
isNotOverloadAndNotAccessor = and(isNotOverload, isNotAccessor);
|
|
83353
|
-
intrinsicTypeKinds = new Map(
|
|
83262
|
+
intrinsicTypeKinds = new Map(Object.entries({
|
|
83354
83263
|
Uppercase: 0 /* Uppercase */,
|
|
83355
83264
|
Lowercase: 1 /* Lowercase */,
|
|
83356
83265
|
Capitalize: 2 /* Capitalize */,
|
|
@@ -84887,8 +84796,7 @@ ${lanes.join("\n")}
|
|
|
84887
84796
|
const sourceIndexToNewSourceIndexMap = [];
|
|
84888
84797
|
let nameIndexToNewNameIndexMap;
|
|
84889
84798
|
const mappingIterator = decodeMappings(map2.mappings);
|
|
84890
|
-
for (
|
|
84891
|
-
const raw = iterResult.value;
|
|
84799
|
+
for (const raw of mappingIterator) {
|
|
84892
84800
|
if (end && (raw.generatedLine > end.line || raw.generatedLine === end.line && raw.generatedCharacter > end.character)) {
|
|
84893
84801
|
break;
|
|
84894
84802
|
}
|
|
@@ -85120,6 +85028,9 @@ ${lanes.join("\n")}
|
|
|
85120
85028
|
return { value: captureMapping(hasSource, hasName), done };
|
|
85121
85029
|
}
|
|
85122
85030
|
return stopIterating();
|
|
85031
|
+
},
|
|
85032
|
+
[Symbol.iterator]() {
|
|
85033
|
+
return this;
|
|
85123
85034
|
}
|
|
85124
85035
|
};
|
|
85125
85036
|
function captureMapping(hasSource, hasName) {
|
|
@@ -88014,10 +87925,10 @@ ${lanes.join("\n")}
|
|
|
88014
87925
|
const shouldTransformInitializersUsingDefine = useDefineForClassFields && languageVersion < 9 /* ES2022 */;
|
|
88015
87926
|
const shouldTransformInitializers = shouldTransformInitializersUsingSet || shouldTransformInitializersUsingDefine;
|
|
88016
87927
|
const shouldTransformPrivateElementsOrClassStaticBlocks = languageVersion < 9 /* ES2022 */;
|
|
88017
|
-
const shouldTransformAutoAccessors = languageVersion < 99 /* ESNext */;
|
|
87928
|
+
const shouldTransformAutoAccessors = languageVersion < 99 /* ESNext */ ? -1 /* True */ : !useDefineForClassFields ? 3 /* Maybe */ : 0 /* False */;
|
|
88018
87929
|
const shouldTransformThisInStaticInitializers = languageVersion < 9 /* ES2022 */;
|
|
88019
87930
|
const shouldTransformSuperInStaticInitializers = shouldTransformThisInStaticInitializers && languageVersion >= 2 /* ES2015 */;
|
|
88020
|
-
const shouldTransformAnything = shouldTransformInitializers || shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformAutoAccessors
|
|
87931
|
+
const shouldTransformAnything = shouldTransformInitializers || shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformAutoAccessors === -1 /* True */;
|
|
88021
87932
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
88022
87933
|
context.onSubstituteNode = onSubstituteNode;
|
|
88023
87934
|
const previousOnEmitNode = context.onEmitNode;
|
|
@@ -88047,7 +87958,7 @@ ${lanes.join("\n")}
|
|
|
88047
87958
|
}
|
|
88048
87959
|
switch (node.kind) {
|
|
88049
87960
|
case 127 /* AccessorKeyword */:
|
|
88050
|
-
return
|
|
87961
|
+
return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node;
|
|
88051
87962
|
case 260 /* ClassDeclaration */:
|
|
88052
87963
|
return visitClassDeclaration(node);
|
|
88053
87964
|
case 228 /* ClassExpression */:
|
|
@@ -88322,7 +88233,7 @@ ${lanes.join("\n")}
|
|
|
88322
88233
|
Debug.assert(info, "Undeclared private name for property declaration.");
|
|
88323
88234
|
return info.isValid ? void 0 : node;
|
|
88324
88235
|
}
|
|
88325
|
-
if (shouldTransformInitializersUsingSet && !isStatic(node)) {
|
|
88236
|
+
if (shouldTransformInitializersUsingSet && !isStatic(node) && currentClassLexicalEnvironment && currentClassLexicalEnvironment.facts & 16 /* WillHoistInitializersToConstructor */) {
|
|
88326
88237
|
return factory2.updatePropertyDeclaration(
|
|
88327
88238
|
node,
|
|
88328
88239
|
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
@@ -88338,7 +88249,7 @@ ${lanes.join("\n")}
|
|
|
88338
88249
|
return visitEachChild(node, visitor, context);
|
|
88339
88250
|
}
|
|
88340
88251
|
function transformPublicFieldInitializer(node) {
|
|
88341
|
-
if (shouldTransformInitializers) {
|
|
88252
|
+
if (shouldTransformInitializers && !isAutoAccessorPropertyDeclaration(node)) {
|
|
88342
88253
|
const expr = getPropertyNameExpressionIfNeeded(
|
|
88343
88254
|
node.name,
|
|
88344
88255
|
/*shouldHoist*/
|
|
@@ -88369,8 +88280,11 @@ ${lanes.join("\n")}
|
|
|
88369
88280
|
Debug.assert(!hasDecorators(node), "Decorators should already have been transformed and elided.");
|
|
88370
88281
|
return isPrivateIdentifierClassElementDeclaration(node) ? transformPrivateFieldInitializer(node) : transformPublicFieldInitializer(node);
|
|
88371
88282
|
}
|
|
88283
|
+
function shouldTransformAutoAccessorsInCurrentClass() {
|
|
88284
|
+
return shouldTransformAutoAccessors === -1 /* True */ || shouldTransformAutoAccessors === 3 /* Maybe */ && !!currentClassLexicalEnvironment && !!(currentClassLexicalEnvironment.facts & 16 /* WillHoistInitializersToConstructor */);
|
|
88285
|
+
}
|
|
88372
88286
|
function visitPropertyDeclaration(node) {
|
|
88373
|
-
if (
|
|
88287
|
+
if (shouldTransformAutoAccessorsInCurrentClass() && isAutoAccessorPropertyDeclaration(node)) {
|
|
88374
88288
|
return transformAutoAccessor(node);
|
|
88375
88289
|
}
|
|
88376
88290
|
return transformFieldInitializer(node);
|
|
@@ -88771,26 +88685,44 @@ ${lanes.join("\n")}
|
|
|
88771
88685
|
if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(original)) {
|
|
88772
88686
|
facts |= 1 /* ClassWasDecorated */;
|
|
88773
88687
|
}
|
|
88688
|
+
let containsPublicInstanceFields = false;
|
|
88689
|
+
let containsInitializedPublicInstanceFields = false;
|
|
88690
|
+
let containsInstancePrivateElements = false;
|
|
88691
|
+
let containsInstanceAutoAccessors = false;
|
|
88774
88692
|
for (const member of node.members) {
|
|
88775
|
-
if (
|
|
88776
|
-
|
|
88777
|
-
|
|
88778
|
-
facts |= 2 /* NeedsClassConstructorReference */;
|
|
88779
|
-
}
|
|
88780
|
-
if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) {
|
|
88781
|
-
if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) {
|
|
88782
|
-
facts |= 8 /* NeedsSubstitutionForThisInClassStaticField */;
|
|
88783
|
-
if (!(facts & 1 /* ClassWasDecorated */)) {
|
|
88784
|
-
facts |= 2 /* NeedsClassConstructorReference */;
|
|
88785
|
-
}
|
|
88693
|
+
if (isStatic(member)) {
|
|
88694
|
+
if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) {
|
|
88695
|
+
facts |= 2 /* NeedsClassConstructorReference */;
|
|
88786
88696
|
}
|
|
88787
|
-
if (
|
|
88788
|
-
if (
|
|
88789
|
-
facts |=
|
|
88697
|
+
if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) {
|
|
88698
|
+
if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) {
|
|
88699
|
+
facts |= 8 /* NeedsSubstitutionForThisInClassStaticField */;
|
|
88700
|
+
if (!(facts & 1 /* ClassWasDecorated */)) {
|
|
88701
|
+
facts |= 2 /* NeedsClassConstructorReference */;
|
|
88702
|
+
}
|
|
88703
|
+
}
|
|
88704
|
+
if (shouldTransformSuperInStaticInitializers && member.transformFlags & 134217728 /* ContainsLexicalSuper */) {
|
|
88705
|
+
if (!(facts & 1 /* ClassWasDecorated */)) {
|
|
88706
|
+
facts |= 2 /* NeedsClassConstructorReference */ | 4 /* NeedsClassSuperReference */;
|
|
88707
|
+
}
|
|
88790
88708
|
}
|
|
88791
88709
|
}
|
|
88710
|
+
} else if (!hasAbstractModifier(getOriginalNode(member))) {
|
|
88711
|
+
if (isAutoAccessorPropertyDeclaration(member)) {
|
|
88712
|
+
containsInstanceAutoAccessors = true;
|
|
88713
|
+
containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member));
|
|
88714
|
+
} else if (isPrivateIdentifierClassElementDeclaration(member)) {
|
|
88715
|
+
containsInstancePrivateElements = true;
|
|
88716
|
+
} else if (isPropertyDeclaration(member)) {
|
|
88717
|
+
containsPublicInstanceFields = true;
|
|
88718
|
+
containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer);
|
|
88719
|
+
}
|
|
88792
88720
|
}
|
|
88793
88721
|
}
|
|
88722
|
+
const willHoistInitializersToConstructor = shouldTransformInitializersUsingDefine && containsPublicInstanceFields || shouldTransformInitializersUsingSet && containsInitializedPublicInstanceFields || shouldTransformPrivateElementsOrClassStaticBlocks && containsInstancePrivateElements || shouldTransformPrivateElementsOrClassStaticBlocks && containsInstanceAutoAccessors && shouldTransformAutoAccessors === -1 /* True */;
|
|
88723
|
+
if (willHoistInitializersToConstructor) {
|
|
88724
|
+
facts |= 16 /* WillHoistInitializersToConstructor */;
|
|
88725
|
+
}
|
|
88794
88726
|
return facts;
|
|
88795
88727
|
}
|
|
88796
88728
|
function visitExpressionWithTypeArgumentsInHeritageClause(node) {
|
|
@@ -89066,15 +88998,9 @@ ${lanes.join("\n")}
|
|
|
89066
88998
|
)
|
|
89067
88999
|
);
|
|
89068
89000
|
}
|
|
89069
|
-
function isClassElementThatRequiresConstructorStatement(member) {
|
|
89070
|
-
if (isStatic(member) || hasAbstractModifier(getOriginalNode(member))) {
|
|
89071
|
-
return false;
|
|
89072
|
-
}
|
|
89073
|
-
return shouldTransformInitializersUsingDefine && isPropertyDeclaration(member) || shouldTransformInitializersUsingSet && isInitializedProperty(member) || shouldTransformPrivateElementsOrClassStaticBlocks && isPrivateIdentifierClassElementDeclaration(member) || shouldTransformPrivateElementsOrClassStaticBlocks && shouldTransformAutoAccessors && isAutoAccessorPropertyDeclaration(member);
|
|
89074
|
-
}
|
|
89075
89001
|
function transformConstructor(constructor, container) {
|
|
89076
89002
|
constructor = visitNode(constructor, visitor, isConstructorDeclaration);
|
|
89077
|
-
if (!
|
|
89003
|
+
if (!currentClassLexicalEnvironment || !(currentClassLexicalEnvironment.facts & 16 /* WillHoistInitializersToConstructor */)) {
|
|
89078
89004
|
return constructor;
|
|
89079
89005
|
}
|
|
89080
89006
|
const extendsClauseElement = getEffectiveBaseTypeNode(container);
|
|
@@ -93204,7 +93130,7 @@ ${lanes.join("\n")}
|
|
|
93204
93130
|
void 0,
|
|
93205
93131
|
factory2.createVariableDeclarationList([
|
|
93206
93132
|
factory2.createVariableDeclaration(
|
|
93207
|
-
factory2.createObjectBindingPattern(
|
|
93133
|
+
factory2.createObjectBindingPattern(arrayFrom(importSpecifiersMap.values(), (s) => factory2.createBindingElement(
|
|
93208
93134
|
/*dotdotdot*/
|
|
93209
93135
|
void 0,
|
|
93210
93136
|
s.propertyName,
|
|
@@ -93620,7 +93546,7 @@ ${lanes.join("\n")}
|
|
|
93620
93546
|
"src/compiler/transformers/jsx.ts"() {
|
|
93621
93547
|
"use strict";
|
|
93622
93548
|
init_ts2();
|
|
93623
|
-
entities = new Map(
|
|
93549
|
+
entities = new Map(Object.entries({
|
|
93624
93550
|
quot: 34,
|
|
93625
93551
|
amp: 38,
|
|
93626
93552
|
apos: 39,
|
|
@@ -103280,7 +103206,7 @@ ${lanes.join("\n")}
|
|
|
103280
103206
|
updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit;
|
|
103281
103207
|
return updated;
|
|
103282
103208
|
function getLibReferences() {
|
|
103283
|
-
return
|
|
103209
|
+
return arrayFrom(libs2.keys(), (lib) => ({ fileName: lib, pos: -1, end: -1 }));
|
|
103284
103210
|
}
|
|
103285
103211
|
function getFileReferencesForUsedTypeReferences() {
|
|
103286
103212
|
return necessaryTypeReferences ? mapDefined(arrayFrom(necessaryTypeReferences.keys()), getFileReferenceForSpecifierModeTuple) : [];
|
|
@@ -105822,6 +105748,8 @@ ${lanes.join("\n")}
|
|
|
105822
105748
|
let tempFlags;
|
|
105823
105749
|
let reservedNamesStack;
|
|
105824
105750
|
let reservedNames;
|
|
105751
|
+
let reservedPrivateNamesStack;
|
|
105752
|
+
let reservedPrivateNames;
|
|
105825
105753
|
let preserveSourceNewlines = printerOptions.preserveSourceNewlines;
|
|
105826
105754
|
let nextListElementPos;
|
|
105827
105755
|
let writer;
|
|
@@ -106115,6 +106043,9 @@ ${lanes.join("\n")}
|
|
|
106115
106043
|
tempFlagsStack = [];
|
|
106116
106044
|
tempFlags = TempFlags.Auto;
|
|
106117
106045
|
reservedNamesStack = [];
|
|
106046
|
+
reservedNames = void 0;
|
|
106047
|
+
reservedPrivateNamesStack = [];
|
|
106048
|
+
reservedPrivateNames = void 0;
|
|
106118
106049
|
currentSourceFile = void 0;
|
|
106119
106050
|
currentLineMap = void 0;
|
|
106120
106051
|
detachedCommentsInfo = void 0;
|
|
@@ -106858,9 +106789,13 @@ ${lanes.join("\n")}
|
|
|
106858
106789
|
}
|
|
106859
106790
|
}
|
|
106860
106791
|
function emitComputedPropertyName(node) {
|
|
106792
|
+
const savedPrivateNameTempFlags = privateNameTempFlags;
|
|
106793
|
+
const savedReservedMemberNames = reservedPrivateNames;
|
|
106794
|
+
popPrivateNameGenerationScope();
|
|
106861
106795
|
writePunctuation("[");
|
|
106862
106796
|
emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);
|
|
106863
106797
|
writePunctuation("]");
|
|
106798
|
+
pushPrivateNameGenerationScope(savedPrivateNameTempFlags, savedReservedMemberNames);
|
|
106864
106799
|
}
|
|
106865
106800
|
function emitTypeParameter(node) {
|
|
106866
106801
|
emitModifiers(node, node.modifiers);
|
|
@@ -107040,10 +106975,16 @@ ${lanes.join("\n")}
|
|
|
107040
106975
|
emitTypeArguments(node, node.typeArguments);
|
|
107041
106976
|
}
|
|
107042
106977
|
function emitTypeLiteral(node) {
|
|
106978
|
+
pushPrivateNameGenerationScope(
|
|
106979
|
+
TempFlags.Auto,
|
|
106980
|
+
/*newReservedMemberNames*/
|
|
106981
|
+
void 0
|
|
106982
|
+
);
|
|
107043
106983
|
writePunctuation("{");
|
|
107044
106984
|
const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineTypeLiteralMembers */ : 32897 /* MultiLineTypeLiteralMembers */;
|
|
107045
106985
|
emitList(node, node.members, flags | 524288 /* NoSpaceIfEmpty */);
|
|
107046
106986
|
writePunctuation("}");
|
|
106987
|
+
popPrivateNameGenerationScope();
|
|
107047
106988
|
}
|
|
107048
106989
|
function emitArrayType(node) {
|
|
107049
106990
|
emit(node.elementType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType);
|
|
@@ -107223,6 +107164,11 @@ ${lanes.join("\n")}
|
|
|
107223
107164
|
emitExpressionList(node, elements, 8914 /* ArrayLiteralExpressionElements */ | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma);
|
|
107224
107165
|
}
|
|
107225
107166
|
function emitObjectLiteralExpression(node) {
|
|
107167
|
+
pushPrivateNameGenerationScope(
|
|
107168
|
+
TempFlags.Auto,
|
|
107169
|
+
/*newReservedMemberNames*/
|
|
107170
|
+
void 0
|
|
107171
|
+
);
|
|
107226
107172
|
forEach(node.properties, generateMemberNames);
|
|
107227
107173
|
const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
|
|
107228
107174
|
if (indentedFlag) {
|
|
@@ -107234,6 +107180,7 @@ ${lanes.join("\n")}
|
|
|
107234
107180
|
if (indentedFlag) {
|
|
107235
107181
|
decreaseIndent();
|
|
107236
107182
|
}
|
|
107183
|
+
popPrivateNameGenerationScope();
|
|
107237
107184
|
}
|
|
107238
107185
|
function emitPropertyAccessExpression(node) {
|
|
107239
107186
|
emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
|
|
@@ -107973,6 +107920,11 @@ ${lanes.join("\n")}
|
|
|
107973
107920
|
emitClassDeclarationOrExpression(node);
|
|
107974
107921
|
}
|
|
107975
107922
|
function emitClassDeclarationOrExpression(node) {
|
|
107923
|
+
pushPrivateNameGenerationScope(
|
|
107924
|
+
TempFlags.Auto,
|
|
107925
|
+
/*newReservedMemberNames*/
|
|
107926
|
+
void 0
|
|
107927
|
+
);
|
|
107976
107928
|
forEach(node.members, generateMemberNames);
|
|
107977
107929
|
emitDecoratorsAndModifiers(node, node.modifiers);
|
|
107978
107930
|
writeKeyword("class");
|
|
@@ -107993,8 +107945,14 @@ ${lanes.join("\n")}
|
|
|
107993
107945
|
if (indentedFlag) {
|
|
107994
107946
|
decreaseIndent();
|
|
107995
107947
|
}
|
|
107948
|
+
popPrivateNameGenerationScope();
|
|
107996
107949
|
}
|
|
107997
107950
|
function emitInterfaceDeclaration(node) {
|
|
107951
|
+
pushPrivateNameGenerationScope(
|
|
107952
|
+
TempFlags.Auto,
|
|
107953
|
+
/*newReservedMemberNames*/
|
|
107954
|
+
void 0
|
|
107955
|
+
);
|
|
107998
107956
|
emitModifiers(node, node.modifiers);
|
|
107999
107957
|
writeKeyword("interface");
|
|
108000
107958
|
writeSpace();
|
|
@@ -108005,6 +107963,7 @@ ${lanes.join("\n")}
|
|
|
108005
107963
|
writePunctuation("{");
|
|
108006
107964
|
emitList(node, node.members, 129 /* InterfaceMembers */);
|
|
108007
107965
|
writePunctuation("}");
|
|
107966
|
+
popPrivateNameGenerationScope();
|
|
108008
107967
|
}
|
|
108009
107968
|
function emitTypeAliasDeclaration(node) {
|
|
108010
107969
|
emitModifiers(node, node.modifiers);
|
|
@@ -109382,8 +109341,6 @@ ${lanes.join("\n")}
|
|
|
109382
109341
|
}
|
|
109383
109342
|
tempFlagsStack.push(tempFlags);
|
|
109384
109343
|
tempFlags = TempFlags.Auto;
|
|
109385
|
-
privateNameTempFlagsStack.push(privateNameTempFlags);
|
|
109386
|
-
privateNameTempFlags = TempFlags.Auto;
|
|
109387
109344
|
formattedNameTempFlagsStack.push(formattedNameTempFlags);
|
|
109388
109345
|
formattedNameTempFlags = void 0;
|
|
109389
109346
|
reservedNamesStack.push(reservedNames);
|
|
@@ -109393,7 +109350,6 @@ ${lanes.join("\n")}
|
|
|
109393
109350
|
return;
|
|
109394
109351
|
}
|
|
109395
109352
|
tempFlags = tempFlagsStack.pop();
|
|
109396
|
-
privateNameTempFlags = privateNameTempFlagsStack.pop();
|
|
109397
109353
|
formattedNameTempFlags = formattedNameTempFlagsStack.pop();
|
|
109398
109354
|
reservedNames = reservedNamesStack.pop();
|
|
109399
109355
|
}
|
|
@@ -109403,6 +109359,22 @@ ${lanes.join("\n")}
|
|
|
109403
109359
|
}
|
|
109404
109360
|
reservedNames.add(name);
|
|
109405
109361
|
}
|
|
109362
|
+
function pushPrivateNameGenerationScope(newPrivateNameTempFlags, newReservedMemberNames) {
|
|
109363
|
+
privateNameTempFlagsStack.push(privateNameTempFlags);
|
|
109364
|
+
privateNameTempFlags = newPrivateNameTempFlags;
|
|
109365
|
+
reservedPrivateNamesStack.push(reservedNames);
|
|
109366
|
+
reservedPrivateNames = newReservedMemberNames;
|
|
109367
|
+
}
|
|
109368
|
+
function popPrivateNameGenerationScope() {
|
|
109369
|
+
privateNameTempFlags = privateNameTempFlagsStack.pop();
|
|
109370
|
+
reservedPrivateNames = reservedPrivateNamesStack.pop();
|
|
109371
|
+
}
|
|
109372
|
+
function reservePrivateNameInNestedScopes(name) {
|
|
109373
|
+
if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) {
|
|
109374
|
+
reservedPrivateNames = /* @__PURE__ */ new Set();
|
|
109375
|
+
}
|
|
109376
|
+
reservedPrivateNames.add(name);
|
|
109377
|
+
}
|
|
109406
109378
|
function generateNames(node) {
|
|
109407
109379
|
if (!node)
|
|
109408
109380
|
return;
|
|
@@ -109524,10 +109496,13 @@ ${lanes.join("\n")}
|
|
|
109524
109496
|
const nodeId = getNodeId(node);
|
|
109525
109497
|
return nodeIdToGeneratedName[nodeId] || (nodeIdToGeneratedName[nodeId] = generateNameForNode(node, privateName, flags != null ? flags : 0 /* None */, formatGeneratedNamePart(prefix, generateName), formatGeneratedNamePart(suffix)));
|
|
109526
109498
|
}
|
|
109527
|
-
function isUniqueName(name) {
|
|
109528
|
-
return isFileLevelUniqueName2(name) && !
|
|
109499
|
+
function isUniqueName(name, privateName) {
|
|
109500
|
+
return isFileLevelUniqueName2(name, privateName) && !isReservedName(name, privateName) && !generatedNames.has(name);
|
|
109501
|
+
}
|
|
109502
|
+
function isReservedName(name, privateName) {
|
|
109503
|
+
return privateName ? !!(reservedPrivateNames == null ? void 0 : reservedPrivateNames.has(name)) : !!(reservedNames == null ? void 0 : reservedNames.has(name));
|
|
109529
109504
|
}
|
|
109530
|
-
function isFileLevelUniqueName2(name) {
|
|
109505
|
+
function isFileLevelUniqueName2(name, _isPrivate) {
|
|
109531
109506
|
return currentSourceFile ? isFileLevelUniqueName(currentSourceFile, name, hasGlobalName) : true;
|
|
109532
109507
|
}
|
|
109533
109508
|
function isUniqueLocalName(name, container) {
|
|
@@ -109575,9 +109550,11 @@ ${lanes.join("\n")}
|
|
|
109575
109550
|
if (flags && !(tempFlags2 & flags)) {
|
|
109576
109551
|
const name = flags === TempFlags._i ? "_i" : "_n";
|
|
109577
109552
|
const fullName = formatGeneratedName(privateName, prefix, name, suffix);
|
|
109578
|
-
if (isUniqueName(fullName)) {
|
|
109553
|
+
if (isUniqueName(fullName, privateName)) {
|
|
109579
109554
|
tempFlags2 |= flags;
|
|
109580
|
-
if (
|
|
109555
|
+
if (privateName) {
|
|
109556
|
+
reservePrivateNameInNestedScopes(fullName);
|
|
109557
|
+
} else if (reservedInNestedScopes) {
|
|
109581
109558
|
reserveNameInNestedScopes(fullName);
|
|
109582
109559
|
}
|
|
109583
109560
|
setTempFlags(key, tempFlags2);
|
|
@@ -109590,8 +109567,10 @@ ${lanes.join("\n")}
|
|
|
109590
109567
|
if (count !== 8 && count !== 13) {
|
|
109591
109568
|
const name = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26);
|
|
109592
109569
|
const fullName = formatGeneratedName(privateName, prefix, name, suffix);
|
|
109593
|
-
if (isUniqueName(fullName)) {
|
|
109594
|
-
if (
|
|
109570
|
+
if (isUniqueName(fullName, privateName)) {
|
|
109571
|
+
if (privateName) {
|
|
109572
|
+
reservePrivateNameInNestedScopes(fullName);
|
|
109573
|
+
} else if (reservedInNestedScopes) {
|
|
109595
109574
|
reserveNameInNestedScopes(fullName);
|
|
109596
109575
|
}
|
|
109597
109576
|
setTempFlags(key, tempFlags2);
|
|
@@ -109609,8 +109588,10 @@ ${lanes.join("\n")}
|
|
|
109609
109588
|
}
|
|
109610
109589
|
if (optimistic) {
|
|
109611
109590
|
const fullName = formatGeneratedName(privateName, prefix, baseName, suffix);
|
|
109612
|
-
if (checkFn(fullName)) {
|
|
109613
|
-
if (
|
|
109591
|
+
if (checkFn(fullName, privateName)) {
|
|
109592
|
+
if (privateName) {
|
|
109593
|
+
reservePrivateNameInNestedScopes(fullName);
|
|
109594
|
+
} else if (scoped) {
|
|
109614
109595
|
reserveNameInNestedScopes(fullName);
|
|
109615
109596
|
} else {
|
|
109616
109597
|
generatedNames.add(fullName);
|
|
@@ -109624,8 +109605,10 @@ ${lanes.join("\n")}
|
|
|
109624
109605
|
let i = 1;
|
|
109625
109606
|
while (true) {
|
|
109626
109607
|
const fullName = formatGeneratedName(privateName, prefix, baseName + i, suffix);
|
|
109627
|
-
if (checkFn(fullName)) {
|
|
109628
|
-
if (
|
|
109608
|
+
if (checkFn(fullName, privateName)) {
|
|
109609
|
+
if (privateName) {
|
|
109610
|
+
reservePrivateNameInNestedScopes(fullName);
|
|
109611
|
+
} else if (scoped) {
|
|
109629
109612
|
reserveNameInNestedScopes(fullName);
|
|
109630
109613
|
} else {
|
|
109631
109614
|
generatedNames.add(fullName);
|
|
@@ -115005,9 +114988,8 @@ ${lanes.join("\n")}
|
|
|
115005
114988
|
seenMap.add(path);
|
|
115006
114989
|
const references = state.referencedMap.getValues(path);
|
|
115007
114990
|
if (references) {
|
|
115008
|
-
const
|
|
115009
|
-
|
|
115010
|
-
queue.push(iterResult.value);
|
|
114991
|
+
for (const key of references.keys()) {
|
|
114992
|
+
queue.push(key);
|
|
115011
114993
|
}
|
|
115012
114994
|
}
|
|
115013
114995
|
}
|
|
@@ -117113,7 +117095,7 @@ ${lanes.join("\n")}
|
|
|
117113
117095
|
return (_a2 = resolution.failedLookupLocations) == null ? void 0 : _a2.some((location) => isInvalidatedFailedLookup(resolutionHost.toPath(location)));
|
|
117114
117096
|
}
|
|
117115
117097
|
function isInvalidatedFailedLookup(locationPath) {
|
|
117116
|
-
return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) ||
|
|
117098
|
+
return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) || [], (fileOrDirectoryPath) => startsWith(locationPath, fileOrDirectoryPath) ? true : void 0) || firstDefinedIterator((isInDirectoryChecks == null ? void 0 : isInDirectoryChecks.keys()) || [], (fileOrDirectoryPath) => isInDirectoryPath(fileOrDirectoryPath, locationPath) ? true : void 0);
|
|
117117
117099
|
}
|
|
117118
117100
|
function canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution) {
|
|
117119
117101
|
var _a2;
|
|
@@ -118410,7 +118392,7 @@ ${lanes.join("\n")}
|
|
|
118410
118392
|
if (wildcardDirectories) {
|
|
118411
118393
|
updateWatchingWildcardDirectories(
|
|
118412
118394
|
watchedWildcardDirectories || (watchedWildcardDirectories = /* @__PURE__ */ new Map()),
|
|
118413
|
-
new Map(
|
|
118395
|
+
new Map(Object.entries(wildcardDirectories)),
|
|
118414
118396
|
watchWildcardDirectory
|
|
118415
118397
|
);
|
|
118416
118398
|
} else if (watchedWildcardDirectories) {
|
|
@@ -118504,7 +118486,7 @@ ${lanes.join("\n")}
|
|
|
118504
118486
|
if ((_b = commandLine.parsedCommandLine) == null ? void 0 : _b.wildcardDirectories) {
|
|
118505
118487
|
updateWatchingWildcardDirectories(
|
|
118506
118488
|
commandLine.watchedDirectories || (commandLine.watchedDirectories = /* @__PURE__ */ new Map()),
|
|
118507
|
-
new Map(
|
|
118489
|
+
new Map(Object.entries((_c = commandLine.parsedCommandLine) == null ? void 0 : _c.wildcardDirectories)),
|
|
118508
118490
|
(directory, flags) => {
|
|
118509
118491
|
var _a3;
|
|
118510
118492
|
return watchDirectory(
|
|
@@ -120232,7 +120214,7 @@ ${lanes.join("\n")}
|
|
|
120232
120214
|
return;
|
|
120233
120215
|
updateWatchingWildcardDirectories(
|
|
120234
120216
|
getOrCreateValueMapFromConfigFileMap(state.allWatchedWildcardDirectories, resolvedPath),
|
|
120235
|
-
new Map(
|
|
120217
|
+
new Map(Object.entries(parsed.wildcardDirectories)),
|
|
120236
120218
|
(dir, flags) => state.watchDirectory(
|
|
120237
120219
|
dir,
|
|
120238
120220
|
(fileOrDirectory) => {
|
|
@@ -120653,12 +120635,13 @@ ${lanes.join("\n")}
|
|
|
120653
120635
|
}
|
|
120654
120636
|
function loadSafeList(host, safeListPath) {
|
|
120655
120637
|
const result = readConfigFile(safeListPath, (path) => host.readFile(path));
|
|
120656
|
-
return new Map(
|
|
120638
|
+
return new Map(Object.entries(result.config));
|
|
120657
120639
|
}
|
|
120658
120640
|
function loadTypesMap(host, typesMapPath) {
|
|
120641
|
+
var _a2;
|
|
120659
120642
|
const result = readConfigFile(typesMapPath, (path) => host.readFile(path));
|
|
120660
|
-
if (result.config) {
|
|
120661
|
-
return new Map(
|
|
120643
|
+
if ((_a2 = result.config) == null ? void 0 : _a2.simpleMap) {
|
|
120644
|
+
return new Map(Object.entries(result.config.simpleMap));
|
|
120662
120645
|
}
|
|
120663
120646
|
return void 0;
|
|
120664
120647
|
}
|
|
@@ -125350,7 +125333,7 @@ ${lanes.join("\n")}
|
|
|
125350
125333
|
return void 0;
|
|
125351
125334
|
const map2 = arrayToMultiMap(referenceEntries.map(ts_FindAllReferences_exports.toHighlightSpan), (e) => e.fileName, (e) => e.span);
|
|
125352
125335
|
const getCanonicalFileName = createGetCanonicalFileName(program.useCaseSensitiveFileNames());
|
|
125353
|
-
return
|
|
125336
|
+
return arrayFrom(mapDefinedIterator(map2.entries(), ([fileName, highlightSpans]) => {
|
|
125354
125337
|
if (!sourceFilesSet.has(fileName)) {
|
|
125355
125338
|
if (!program.redirectTargetsMap.has(toPath(fileName, program.getCurrentDirectory(), getCanonicalFileName))) {
|
|
125356
125339
|
return void 0;
|
|
@@ -125361,7 +125344,7 @@ ${lanes.join("\n")}
|
|
|
125361
125344
|
Debug.assert(sourceFilesSet.has(fileName));
|
|
125362
125345
|
}
|
|
125363
125346
|
return { fileName, highlightSpans };
|
|
125364
|
-
});
|
|
125347
|
+
}));
|
|
125365
125348
|
}
|
|
125366
125349
|
function getSyntacticDocumentHighlights(node, sourceFile) {
|
|
125367
125350
|
const highlightSpans = getHighlightSpans(node, sourceFile);
|
|
@@ -127277,7 +127260,7 @@ ${lanes.join("\n")}
|
|
|
127277
127260
|
sourceFile.moduleName = transpileOptions.moduleName;
|
|
127278
127261
|
}
|
|
127279
127262
|
if (transpileOptions.renamedDependencies) {
|
|
127280
|
-
sourceFile.renamedDependencies = new Map(
|
|
127263
|
+
sourceFile.renamedDependencies = new Map(Object.entries(transpileOptions.renamedDependencies));
|
|
127281
127264
|
}
|
|
127282
127265
|
let outputText;
|
|
127283
127266
|
let sourceMapText;
|
|
@@ -129020,7 +129003,7 @@ ${lanes.join("\n")}
|
|
|
129020
129003
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
129021
129004
|
return ts_OutliningElementsCollector_exports.collectElements(sourceFile, cancellationToken);
|
|
129022
129005
|
}
|
|
129023
|
-
const braceMatching = new Map(
|
|
129006
|
+
const braceMatching = new Map(Object.entries({
|
|
129024
129007
|
[18 /* OpenBraceToken */]: 19 /* CloseBraceToken */,
|
|
129025
129008
|
[20 /* OpenParenToken */]: 21 /* CloseParenToken */,
|
|
129026
129009
|
[22 /* OpenBracketToken */]: 23 /* CloseBracketToken */,
|
|
@@ -136087,8 +136070,10 @@ ${lanes.join("\n")}
|
|
|
136087
136070
|
const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(symbolToken);
|
|
136088
136071
|
const useRequire = shouldUseRequire(sourceFile, program);
|
|
136089
136072
|
const exportInfo = getExportInfos(symbolName2, isJSXTagName(symbolToken), getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences);
|
|
136090
|
-
|
|
136091
|
-
|
|
136073
|
+
return arrayFrom(
|
|
136074
|
+
flatMapIterator(exportInfo.values(), (exportInfos) => getImportFixes(exportInfos, { symbolName: symbolName2, position: symbolToken.getStart(sourceFile) }, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes),
|
|
136075
|
+
(fix) => ({ fix, symbolName: symbolName2, errorIdentifierText: symbolToken.text, isJsxNamespaceFix: symbolName2 !== symbolToken.text })
|
|
136076
|
+
);
|
|
136092
136077
|
});
|
|
136093
136078
|
}
|
|
136094
136079
|
function getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program) {
|
|
@@ -138002,7 +137987,7 @@ ${lanes.join("\n")}
|
|
|
138002
137987
|
return factory.createFalse();
|
|
138003
137988
|
}
|
|
138004
137989
|
if (type.flags & 1056 /* EnumLike */) {
|
|
138005
|
-
const enumMember = type.symbol.exports ?
|
|
137990
|
+
const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol;
|
|
138006
137991
|
const name = checker.symbolToExpression(
|
|
138007
137992
|
type.symbol.parent ? type.symbol.parent : type.symbol,
|
|
138008
137993
|
111551 /* Value */,
|
|
@@ -141249,8 +141234,8 @@ ${lanes.join("\n")}
|
|
|
141249
141234
|
usedNames.add(createTypeParameterName(i));
|
|
141250
141235
|
}
|
|
141251
141236
|
}
|
|
141252
|
-
return
|
|
141253
|
-
|
|
141237
|
+
return arrayFrom(
|
|
141238
|
+
usedNames.values(),
|
|
141254
141239
|
(usedName) => {
|
|
141255
141240
|
var _a2;
|
|
141256
141241
|
return factory.createTypeParameterDeclaration(
|
|
@@ -152134,7 +152119,7 @@ ${lanes.join("\n")}
|
|
|
152134
152119
|
}
|
|
152135
152120
|
changes.replaceNode(sourceFile, toConvert, shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)));
|
|
152136
152121
|
if (neededNamedImports.size) {
|
|
152137
|
-
const newNamedImports = arrayFrom(neededNamedImports.values()
|
|
152122
|
+
const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text)));
|
|
152138
152123
|
changes.insertNodeAfter(sourceFile, toConvert.parent.parent, updateImport(
|
|
152139
152124
|
importDecl,
|
|
152140
152125
|
/*defaultImportName*/
|
|
@@ -155569,7 +155554,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155569
155554
|
}
|
|
155570
155555
|
callArguments.push(factory.createIdentifier(name));
|
|
155571
155556
|
});
|
|
155572
|
-
const typeParametersAndDeclarations = arrayFrom(typeParameterUsages.values()
|
|
155557
|
+
const typeParametersAndDeclarations = arrayFrom(typeParameterUsages.values(), (type) => ({ type, declaration: getFirstDeclaration(type) }));
|
|
155573
155558
|
const sortedTypeParametersAndDeclarations = typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder);
|
|
155574
155559
|
const typeParameters = sortedTypeParametersAndDeclarations.length === 0 ? void 0 : sortedTypeParametersAndDeclarations.map((t) => t.declaration);
|
|
155575
155560
|
const callTypeArguments = typeParameters !== void 0 ? typeParameters.map((decl) => factory.createTypeReferenceNode(
|
|
@@ -160153,7 +160138,14 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
160153
160138
|
const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]);
|
|
160154
160139
|
const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 162 /* LastKeyword */);
|
|
160155
160140
|
const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */);
|
|
160156
|
-
const binaryKeywordOperators = [
|
|
160141
|
+
const binaryKeywordOperators = [
|
|
160142
|
+
101 /* InKeyword */,
|
|
160143
|
+
102 /* InstanceOfKeyword */,
|
|
160144
|
+
162 /* OfKeyword */,
|
|
160145
|
+
128 /* AsKeyword */,
|
|
160146
|
+
140 /* IsKeyword */,
|
|
160147
|
+
150 /* SatisfiesKeyword */
|
|
160148
|
+
];
|
|
160157
160149
|
const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */];
|
|
160158
160150
|
const unaryPrefixExpressions = [
|
|
160159
160151
|
8 /* NumericLiteral */,
|
|
@@ -164207,7 +164199,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164207
164199
|
arrayIsEqualTo: () => arrayIsEqualTo,
|
|
164208
164200
|
arrayIsHomogeneous: () => arrayIsHomogeneous,
|
|
164209
164201
|
arrayIsSorted: () => arrayIsSorted,
|
|
164210
|
-
arrayIterator: () => arrayIterator,
|
|
164211
164202
|
arrayOf: () => arrayOf,
|
|
164212
164203
|
arrayReverseIterator: () => arrayReverseIterator,
|
|
164213
164204
|
arrayToMap: () => arrayToMap,
|
|
@@ -164309,7 +164300,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164309
164300
|
compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics,
|
|
164310
164301
|
compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics,
|
|
164311
164302
|
compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules,
|
|
164312
|
-
compose: () => compose,
|
|
164313
164303
|
computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames,
|
|
164314
164304
|
computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition,
|
|
164315
164305
|
computeLineOfPosition: () => computeLineOfPosition,
|
|
@@ -164710,7 +164700,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164710
164700
|
emitUsingBuildInfo: () => emitUsingBuildInfo,
|
|
164711
164701
|
emptyArray: () => emptyArray,
|
|
164712
164702
|
emptyFileSystemEntries: () => emptyFileSystemEntries,
|
|
164713
|
-
emptyIterator: () => emptyIterator,
|
|
164714
164703
|
emptyMap: () => emptyMap,
|
|
164715
164704
|
emptyOptions: () => emptyOptions,
|
|
164716
164705
|
emptySet: () => emptySet,
|
|
@@ -164745,7 +164734,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164745
164734
|
fileExtensionIs: () => fileExtensionIs,
|
|
164746
164735
|
fileExtensionIsOneOf: () => fileExtensionIsOneOf,
|
|
164747
164736
|
fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
|
|
164748
|
-
fill: () => fill,
|
|
164749
164737
|
filter: () => filter,
|
|
164750
164738
|
filterMutate: () => filterMutate,
|
|
164751
164739
|
filterSemanticDiagnostics: () => filterSemanticDiagnostics,
|
|
@@ -164774,8 +164762,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164774
164762
|
first: () => first,
|
|
164775
164763
|
firstDefined: () => firstDefined,
|
|
164776
164764
|
firstDefinedIterator: () => firstDefinedIterator,
|
|
164765
|
+
firstIterator: () => firstIterator,
|
|
164777
164766
|
firstOrOnly: () => firstOrOnly,
|
|
164778
164767
|
firstOrUndefined: () => firstOrUndefined,
|
|
164768
|
+
firstOrUndefinedIterator: () => firstOrUndefinedIterator,
|
|
164779
164769
|
fixupCompilerOptions: () => fixupCompilerOptions,
|
|
164780
164770
|
flatMap: () => flatMap,
|
|
164781
164771
|
flatMapIterator: () => flatMapIterator,
|
|
@@ -164925,7 +164915,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164925
164915
|
getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications,
|
|
164926
164916
|
getEndLinePosition: () => getEndLinePosition,
|
|
164927
164917
|
getEntityNameFromTypeNode: () => getEntityNameFromTypeNode,
|
|
164928
|
-
getEntries: () => getEntries,
|
|
164929
164918
|
getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo,
|
|
164930
164919
|
getErrorCountForSummary: () => getErrorCountForSummary,
|
|
164931
164920
|
getErrorSpanForNode: () => getErrorSpanForNode,
|
|
@@ -164973,7 +164962,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164973
164962
|
getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement,
|
|
164974
164963
|
getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes,
|
|
164975
164964
|
getInvokedExpression: () => getInvokedExpression,
|
|
164976
|
-
getIterator: () => getIterator,
|
|
164977
164965
|
getJSDocAugmentsTag: () => getJSDocAugmentsTag,
|
|
164978
164966
|
getJSDocClassTag: () => getJSDocClassTag,
|
|
164979
164967
|
getJSDocCommentRanges: () => getJSDocCommentRanges,
|
|
@@ -165986,7 +165974,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
165986
165974
|
mapDefined: () => mapDefined,
|
|
165987
165975
|
mapDefinedEntries: () => mapDefinedEntries,
|
|
165988
165976
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
165989
|
-
mapDefinedValues: () => mapDefinedValues,
|
|
165990
165977
|
mapEntries: () => mapEntries,
|
|
165991
165978
|
mapIterator: () => mapIterator,
|
|
165992
165979
|
mapOneOrMany: () => mapOneOrMany,
|
|
@@ -166269,7 +166256,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
166269
166256
|
stringContainsAt: () => stringContainsAt,
|
|
166270
166257
|
stringToToken: () => stringToToken,
|
|
166271
166258
|
stripQuotes: () => stripQuotes,
|
|
166272
|
-
sum: () => sum,
|
|
166273
166259
|
supportedDeclarationExtensions: () => supportedDeclarationExtensions,
|
|
166274
166260
|
supportedJSExtensions: () => supportedJSExtensions,
|
|
166275
166261
|
supportedJSExtensionsFlat: () => supportedJSExtensionsFlat,
|
|
@@ -166564,8 +166550,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
166564
166550
|
writeCommentRange: () => writeCommentRange,
|
|
166565
166551
|
writeFile: () => writeFile,
|
|
166566
166552
|
writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
|
|
166567
|
-
zipToIterator: () => zipToIterator,
|
|
166568
|
-
zipToMap: () => zipToMap,
|
|
166569
166553
|
zipToModeAwareCache: () => zipToModeAwareCache,
|
|
166570
166554
|
zipWith: () => zipWith
|
|
166571
166555
|
});
|