typescript 5.6.0-dev.20240618 → 5.6.0-dev.20240619
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/lib/tsc.js +70 -66
- package/lib/typescript.d.ts +32 -81
- package/lib/typescript.js +146 -159
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -225,7 +225,6 @@ __export(typescript_exports, {
|
|
|
225
225
|
arrayToMap: () => arrayToMap,
|
|
226
226
|
arrayToMultiMap: () => arrayToMultiMap,
|
|
227
227
|
arrayToNumericMap: () => arrayToNumericMap,
|
|
228
|
-
arraysEqual: () => arraysEqual,
|
|
229
228
|
assertType: () => assertType,
|
|
230
229
|
assign: () => assign,
|
|
231
230
|
assignHelper: () => assignHelper,
|
|
@@ -828,6 +827,7 @@ __export(typescript_exports, {
|
|
|
828
827
|
getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes,
|
|
829
828
|
getInternalEmitFlags: () => getInternalEmitFlags,
|
|
830
829
|
getInvokedExpression: () => getInvokedExpression,
|
|
830
|
+
getIsFileExcluded: () => getIsFileExcluded,
|
|
831
831
|
getIsolatedModules: () => getIsolatedModules,
|
|
832
832
|
getJSDocAugmentsTag: () => getJSDocAugmentsTag,
|
|
833
833
|
getJSDocClassTag: () => getJSDocClassTag,
|
|
@@ -1906,7 +1906,6 @@ __export(typescript_exports, {
|
|
|
1906
1906
|
map: () => map,
|
|
1907
1907
|
mapAllOrFail: () => mapAllOrFail,
|
|
1908
1908
|
mapDefined: () => mapDefined,
|
|
1909
|
-
mapDefinedEntries: () => mapDefinedEntries,
|
|
1910
1909
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
1911
1910
|
mapEntries: () => mapEntries,
|
|
1912
1911
|
mapIterator: () => mapIterator,
|
|
@@ -1916,6 +1915,7 @@ __export(typescript_exports, {
|
|
|
1916
1915
|
matchPatternOrExact: () => matchPatternOrExact,
|
|
1917
1916
|
matchedText: () => matchedText,
|
|
1918
1917
|
matchesExclude: () => matchesExclude,
|
|
1918
|
+
maxBy: () => maxBy,
|
|
1919
1919
|
maybeBind: () => maybeBind,
|
|
1920
1920
|
maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages,
|
|
1921
1921
|
memoize: () => memoize,
|
|
@@ -2377,7 +2377,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2377
2377
|
|
|
2378
2378
|
// src/compiler/corePublic.ts
|
|
2379
2379
|
var versionMajorMinor = "5.6";
|
|
2380
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2380
|
+
var version = `${versionMajorMinor}.0-dev.20240619`;
|
|
2381
2381
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2382
2382
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2383
2383
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -2390,10 +2390,10 @@ var emptyArray = [];
|
|
|
2390
2390
|
var emptyMap = /* @__PURE__ */ new Map();
|
|
2391
2391
|
var emptySet = /* @__PURE__ */ new Set();
|
|
2392
2392
|
function length(array) {
|
|
2393
|
-
return array ? array.length : 0;
|
|
2393
|
+
return array !== void 0 ? array.length : 0;
|
|
2394
2394
|
}
|
|
2395
2395
|
function forEach(array, callback) {
|
|
2396
|
-
if (array) {
|
|
2396
|
+
if (array !== void 0) {
|
|
2397
2397
|
for (let i = 0; i < array.length; i++) {
|
|
2398
2398
|
const result = callback(array[i], i);
|
|
2399
2399
|
if (result) {
|
|
@@ -2404,7 +2404,7 @@ function forEach(array, callback) {
|
|
|
2404
2404
|
return void 0;
|
|
2405
2405
|
}
|
|
2406
2406
|
function forEachRight(array, callback) {
|
|
2407
|
-
if (array) {
|
|
2407
|
+
if (array !== void 0) {
|
|
2408
2408
|
for (let i = array.length - 1; i >= 0; i--) {
|
|
2409
2409
|
const result = callback(array[i], i);
|
|
2410
2410
|
if (result) {
|
|
@@ -2460,13 +2460,13 @@ function intersperse(input, element) {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
const result = [];
|
|
2462
2462
|
for (let i = 0, n = input.length; i < n; i++) {
|
|
2463
|
-
if (i) result.push(element);
|
|
2463
|
+
if (i !== 0) result.push(element);
|
|
2464
2464
|
result.push(input[i]);
|
|
2465
2465
|
}
|
|
2466
2466
|
return result;
|
|
2467
2467
|
}
|
|
2468
2468
|
function every(array, callback) {
|
|
2469
|
-
if (array) {
|
|
2469
|
+
if (array !== void 0) {
|
|
2470
2470
|
for (let i = 0; i < array.length; i++) {
|
|
2471
2471
|
if (!callback(array[i], i)) {
|
|
2472
2472
|
return false;
|
|
@@ -2523,20 +2523,17 @@ function findMap(array, callback) {
|
|
|
2523
2523
|
return Debug.fail();
|
|
2524
2524
|
}
|
|
2525
2525
|
function contains(array, value, equalityComparer = equateValues) {
|
|
2526
|
-
if (array) {
|
|
2527
|
-
for (
|
|
2528
|
-
if (equalityComparer(
|
|
2526
|
+
if (array !== void 0) {
|
|
2527
|
+
for (let i = 0; i < array.length; i++) {
|
|
2528
|
+
if (equalityComparer(array[i], value)) {
|
|
2529
2529
|
return true;
|
|
2530
2530
|
}
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
2533
|
return false;
|
|
2534
2534
|
}
|
|
2535
|
-
function arraysEqual(a, b, equalityComparer = equateValues) {
|
|
2536
|
-
return a.length === b.length && a.every((x, i) => equalityComparer(x, b[i]));
|
|
2537
|
-
}
|
|
2538
2535
|
function indexOfAnyCharCode(text, charCodes, start) {
|
|
2539
|
-
for (let i = start
|
|
2536
|
+
for (let i = start ?? 0; i < text.length; i++) {
|
|
2540
2537
|
if (contains(charCodes, text.charCodeAt(i))) {
|
|
2541
2538
|
return i;
|
|
2542
2539
|
}
|
|
@@ -2545,7 +2542,7 @@ function indexOfAnyCharCode(text, charCodes, start) {
|
|
|
2545
2542
|
}
|
|
2546
2543
|
function countWhere(array, predicate) {
|
|
2547
2544
|
let count = 0;
|
|
2548
|
-
if (array) {
|
|
2545
|
+
if (array !== void 0) {
|
|
2549
2546
|
for (let i = 0; i < array.length; i++) {
|
|
2550
2547
|
const v = array[i];
|
|
2551
2548
|
if (predicate(v, i)) {
|
|
@@ -2556,7 +2553,7 @@ function countWhere(array, predicate) {
|
|
|
2556
2553
|
return count;
|
|
2557
2554
|
}
|
|
2558
2555
|
function filter(array, f) {
|
|
2559
|
-
if (array) {
|
|
2556
|
+
if (array !== void 0) {
|
|
2560
2557
|
const len = array.length;
|
|
2561
2558
|
let i = 0;
|
|
2562
2559
|
while (i < len && f(array[i])) i++;
|
|
@@ -2590,7 +2587,7 @@ function clear(array) {
|
|
|
2590
2587
|
}
|
|
2591
2588
|
function map(array, f) {
|
|
2592
2589
|
let result;
|
|
2593
|
-
if (array) {
|
|
2590
|
+
if (array !== void 0) {
|
|
2594
2591
|
result = [];
|
|
2595
2592
|
for (let i = 0; i < array.length; i++) {
|
|
2596
2593
|
result.push(f(array[i], i));
|
|
@@ -2604,7 +2601,7 @@ function* mapIterator(iter, mapFn) {
|
|
|
2604
2601
|
}
|
|
2605
2602
|
}
|
|
2606
2603
|
function sameMap(array, f) {
|
|
2607
|
-
if (array) {
|
|
2604
|
+
if (array !== void 0) {
|
|
2608
2605
|
for (let i = 0; i < array.length; i++) {
|
|
2609
2606
|
const item = array[i];
|
|
2610
2607
|
const mapped = f(item, i);
|
|
@@ -2622,7 +2619,8 @@ function sameMap(array, f) {
|
|
|
2622
2619
|
}
|
|
2623
2620
|
function flatten(array) {
|
|
2624
2621
|
const result = [];
|
|
2625
|
-
for (
|
|
2622
|
+
for (let i = 0; i < array.length; i++) {
|
|
2623
|
+
const v = array[i];
|
|
2626
2624
|
if (v) {
|
|
2627
2625
|
if (isArray(v)) {
|
|
2628
2626
|
addRange(result, v);
|
|
@@ -2635,7 +2633,7 @@ function flatten(array) {
|
|
|
2635
2633
|
}
|
|
2636
2634
|
function flatMap(array, mapfn) {
|
|
2637
2635
|
let result;
|
|
2638
|
-
if (array) {
|
|
2636
|
+
if (array !== void 0) {
|
|
2639
2637
|
for (let i = 0; i < array.length; i++) {
|
|
2640
2638
|
const v = mapfn(array[i], i);
|
|
2641
2639
|
if (v) {
|
|
@@ -2647,11 +2645,11 @@ function flatMap(array, mapfn) {
|
|
|
2647
2645
|
}
|
|
2648
2646
|
}
|
|
2649
2647
|
}
|
|
2650
|
-
return result
|
|
2648
|
+
return result ?? emptyArray;
|
|
2651
2649
|
}
|
|
2652
2650
|
function flatMapToMutable(array, mapfn) {
|
|
2653
2651
|
const result = [];
|
|
2654
|
-
if (array) {
|
|
2652
|
+
if (array !== void 0) {
|
|
2655
2653
|
for (let i = 0; i < array.length; i++) {
|
|
2656
2654
|
const v = mapfn(array[i], i);
|
|
2657
2655
|
if (v) {
|
|
@@ -2674,7 +2672,7 @@ function* flatMapIterator(iter, mapfn) {
|
|
|
2674
2672
|
}
|
|
2675
2673
|
function sameFlatMap(array, mapfn) {
|
|
2676
2674
|
let result;
|
|
2677
|
-
if (array) {
|
|
2675
|
+
if (array !== void 0) {
|
|
2678
2676
|
for (let i = 0; i < array.length; i++) {
|
|
2679
2677
|
const item = array[i];
|
|
2680
2678
|
const mapped = mapfn(item, i);
|
|
@@ -2690,7 +2688,7 @@ function sameFlatMap(array, mapfn) {
|
|
|
2690
2688
|
}
|
|
2691
2689
|
}
|
|
2692
2690
|
}
|
|
2693
|
-
return result
|
|
2691
|
+
return result ?? array;
|
|
2694
2692
|
}
|
|
2695
2693
|
function mapAllOrFail(array, mapFn) {
|
|
2696
2694
|
const result = [];
|
|
@@ -2705,7 +2703,7 @@ function mapAllOrFail(array, mapFn) {
|
|
|
2705
2703
|
}
|
|
2706
2704
|
function mapDefined(array, mapFn) {
|
|
2707
2705
|
const result = [];
|
|
2708
|
-
if (array) {
|
|
2706
|
+
if (array !== void 0) {
|
|
2709
2707
|
for (let i = 0; i < array.length; i++) {
|
|
2710
2708
|
const mapped = mapFn(array[i], i);
|
|
2711
2709
|
if (mapped !== void 0) {
|
|
@@ -2723,22 +2721,6 @@ function* mapDefinedIterator(iter, mapFn) {
|
|
|
2723
2721
|
}
|
|
2724
2722
|
}
|
|
2725
2723
|
}
|
|
2726
|
-
function mapDefinedEntries(map2, f) {
|
|
2727
|
-
if (!map2) {
|
|
2728
|
-
return void 0;
|
|
2729
|
-
}
|
|
2730
|
-
const result = /* @__PURE__ */ new Map();
|
|
2731
|
-
map2.forEach((value, key) => {
|
|
2732
|
-
const entry = f(key, value);
|
|
2733
|
-
if (entry !== void 0) {
|
|
2734
|
-
const [newKey, newValue] = entry;
|
|
2735
|
-
if (newKey !== void 0 && newValue !== void 0) {
|
|
2736
|
-
result.set(newKey, newValue);
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
2739
|
-
});
|
|
2740
|
-
return result;
|
|
2741
|
-
}
|
|
2742
2724
|
function getOrUpdate(map2, key, callback) {
|
|
2743
2725
|
if (map2.has(key)) {
|
|
2744
2726
|
return map2.get(key);
|
|
@@ -2759,7 +2741,7 @@ function* singleIterator(value) {
|
|
|
2759
2741
|
}
|
|
2760
2742
|
function spanMap(array, keyfn, mapfn) {
|
|
2761
2743
|
let result;
|
|
2762
|
-
if (array) {
|
|
2744
|
+
if (array !== void 0) {
|
|
2763
2745
|
result = [];
|
|
2764
2746
|
const len = array.length;
|
|
2765
2747
|
let previousKey;
|
|
@@ -2791,7 +2773,7 @@ function spanMap(array, keyfn, mapfn) {
|
|
|
2791
2773
|
return result;
|
|
2792
2774
|
}
|
|
2793
2775
|
function mapEntries(map2, f) {
|
|
2794
|
-
if (
|
|
2776
|
+
if (map2 === void 0) {
|
|
2795
2777
|
return void 0;
|
|
2796
2778
|
}
|
|
2797
2779
|
const result = /* @__PURE__ */ new Map();
|
|
@@ -2802,10 +2784,10 @@ function mapEntries(map2, f) {
|
|
|
2802
2784
|
return result;
|
|
2803
2785
|
}
|
|
2804
2786
|
function some(array, predicate) {
|
|
2805
|
-
if (array) {
|
|
2806
|
-
if (predicate) {
|
|
2807
|
-
for (
|
|
2808
|
-
if (predicate(
|
|
2787
|
+
if (array !== void 0) {
|
|
2788
|
+
if (predicate !== void 0) {
|
|
2789
|
+
for (let i = 0; i < array.length; i++) {
|
|
2790
|
+
if (predicate(array[i])) {
|
|
2809
2791
|
return true;
|
|
2810
2792
|
}
|
|
2811
2793
|
}
|
|
@@ -2830,8 +2812,8 @@ function getRangesWhere(arr, pred, cb) {
|
|
|
2830
2812
|
if (start !== void 0) cb(start, arr.length);
|
|
2831
2813
|
}
|
|
2832
2814
|
function concatenate(array1, array2) {
|
|
2833
|
-
if (
|
|
2834
|
-
if (
|
|
2815
|
+
if (array2 === void 0 || array2.length === 0) return array1;
|
|
2816
|
+
if (array1 === void 0 || array1.length === 0) return array2;
|
|
2835
2817
|
return [...array1, ...array2];
|
|
2836
2818
|
}
|
|
2837
2819
|
function selectIndex(_, i) {
|
|
@@ -2858,8 +2840,8 @@ function deduplicateRelational(array, equalityComparer, comparer) {
|
|
|
2858
2840
|
}
|
|
2859
2841
|
function deduplicateEquality(array, equalityComparer) {
|
|
2860
2842
|
const result = [];
|
|
2861
|
-
for (
|
|
2862
|
-
pushIfUnique(result,
|
|
2843
|
+
for (let i = 0; i < array.length; i++) {
|
|
2844
|
+
pushIfUnique(result, array[i], equalityComparer);
|
|
2863
2845
|
}
|
|
2864
2846
|
return result;
|
|
2865
2847
|
}
|
|
@@ -2913,7 +2895,7 @@ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates)
|
|
|
2913
2895
|
return false;
|
|
2914
2896
|
}
|
|
2915
2897
|
function sortAndDeduplicate(array, comparer, equalityComparer) {
|
|
2916
|
-
return deduplicateSorted(sort(array, comparer), equalityComparer
|
|
2898
|
+
return deduplicateSorted(sort(array, comparer), equalityComparer ?? comparer ?? compareStringsCaseSensitive);
|
|
2917
2899
|
}
|
|
2918
2900
|
function arrayIsSorted(array, comparer) {
|
|
2919
2901
|
if (array.length < 2) return true;
|
|
@@ -2925,7 +2907,7 @@ function arrayIsSorted(array, comparer) {
|
|
|
2925
2907
|
return true;
|
|
2926
2908
|
}
|
|
2927
2909
|
function arrayIsEqualTo(array1, array2, equalityComparer = equateValues) {
|
|
2928
|
-
if (
|
|
2910
|
+
if (array1 === void 0 || array2 === void 0) {
|
|
2929
2911
|
return array1 === array2;
|
|
2930
2912
|
}
|
|
2931
2913
|
if (array1.length !== array2.length) {
|
|
@@ -2940,20 +2922,18 @@ function arrayIsEqualTo(array1, array2, equalityComparer = equateValues) {
|
|
|
2940
2922
|
}
|
|
2941
2923
|
function compact(array) {
|
|
2942
2924
|
let result;
|
|
2943
|
-
if (array) {
|
|
2925
|
+
if (array !== void 0) {
|
|
2944
2926
|
for (let i = 0; i < array.length; i++) {
|
|
2945
2927
|
const v = array[i];
|
|
2946
|
-
if (result
|
|
2947
|
-
|
|
2948
|
-
result = array.slice(0, i);
|
|
2949
|
-
}
|
|
2928
|
+
if (result ?? !v) {
|
|
2929
|
+
result ?? (result = array.slice(0, i));
|
|
2950
2930
|
if (v) {
|
|
2951
2931
|
result.push(v);
|
|
2952
2932
|
}
|
|
2953
2933
|
}
|
|
2954
2934
|
}
|
|
2955
2935
|
}
|
|
2956
|
-
return result
|
|
2936
|
+
return result ?? array;
|
|
2957
2937
|
}
|
|
2958
2938
|
function relativeComplement(arrayA, arrayB, comparer) {
|
|
2959
2939
|
if (!arrayB || !arrayA || arrayB.length === 0 || arrayA.length === 0) return arrayB;
|
|
@@ -3018,7 +2998,7 @@ function pushIfUnique(array, toAdd, equalityComparer) {
|
|
|
3018
2998
|
}
|
|
3019
2999
|
}
|
|
3020
3000
|
function appendIfUnique(array, toAdd, equalityComparer) {
|
|
3021
|
-
if (array) {
|
|
3001
|
+
if (array !== void 0) {
|
|
3022
3002
|
pushIfUnique(array, toAdd, equalityComparer);
|
|
3023
3003
|
return array;
|
|
3024
3004
|
} else {
|
|
@@ -3051,7 +3031,7 @@ function rangeEquals(array1, array2, pos, end) {
|
|
|
3051
3031
|
return true;
|
|
3052
3032
|
}
|
|
3053
3033
|
var elementAt = !!Array.prototype.at ? (array, offset) => array == null ? void 0 : array.at(offset) : (array, offset) => {
|
|
3054
|
-
if (array) {
|
|
3034
|
+
if (array !== void 0) {
|
|
3055
3035
|
offset = toOffset(array, offset);
|
|
3056
3036
|
if (offset < array.length) {
|
|
3057
3037
|
return array[offset];
|
|
@@ -3063,7 +3043,7 @@ function firstOrUndefined(array) {
|
|
|
3063
3043
|
return array === void 0 || array.length === 0 ? void 0 : array[0];
|
|
3064
3044
|
}
|
|
3065
3045
|
function firstOrUndefinedIterator(iter) {
|
|
3066
|
-
if (iter) {
|
|
3046
|
+
if (iter !== void 0) {
|
|
3067
3047
|
for (const value of iter) {
|
|
3068
3048
|
return value;
|
|
3069
3049
|
}
|
|
@@ -3088,13 +3068,13 @@ function last(array) {
|
|
|
3088
3068
|
return array[array.length - 1];
|
|
3089
3069
|
}
|
|
3090
3070
|
function singleOrUndefined(array) {
|
|
3091
|
-
return array && array.length === 1 ? array[0] : void 0;
|
|
3071
|
+
return array !== void 0 && array.length === 1 ? array[0] : void 0;
|
|
3092
3072
|
}
|
|
3093
3073
|
function single(array) {
|
|
3094
3074
|
return Debug.checkDefined(singleOrUndefined(array));
|
|
3095
3075
|
}
|
|
3096
3076
|
function singleOrMany(array) {
|
|
3097
|
-
return array && array.length === 1 ? array[0] : array;
|
|
3077
|
+
return array !== void 0 && array.length === 1 ? array[0] : array;
|
|
3098
3078
|
}
|
|
3099
3079
|
function replaceElement(array, index, value) {
|
|
3100
3080
|
const result = array.slice(0);
|
|
@@ -3108,7 +3088,7 @@ function binarySearchKey(array, key, keySelector, keyComparer, offset) {
|
|
|
3108
3088
|
if (!some(array)) {
|
|
3109
3089
|
return -1;
|
|
3110
3090
|
}
|
|
3111
|
-
let low = offset
|
|
3091
|
+
let low = offset ?? 0;
|
|
3112
3092
|
let high = array.length - 1;
|
|
3113
3093
|
while (low <= high) {
|
|
3114
3094
|
const middle = low + (high - low >> 1);
|
|
@@ -3226,7 +3206,8 @@ function equalOwnProperties(left, right, equalityComparer = equateValues) {
|
|
|
3226
3206
|
}
|
|
3227
3207
|
function arrayToMap(array, makeKey, makeValue = identity) {
|
|
3228
3208
|
const result = /* @__PURE__ */ new Map();
|
|
3229
|
-
for (
|
|
3209
|
+
for (let i = 0; i < array.length; i++) {
|
|
3210
|
+
const value = array[i];
|
|
3230
3211
|
const key = makeKey(value);
|
|
3231
3212
|
if (key !== void 0) result.set(key, makeValue(value));
|
|
3232
3213
|
}
|
|
@@ -3234,14 +3215,16 @@ function arrayToMap(array, makeKey, makeValue = identity) {
|
|
|
3234
3215
|
}
|
|
3235
3216
|
function arrayToNumericMap(array, makeKey, makeValue = identity) {
|
|
3236
3217
|
const result = [];
|
|
3237
|
-
for (
|
|
3218
|
+
for (let i = 0; i < array.length; i++) {
|
|
3219
|
+
const value = array[i];
|
|
3238
3220
|
result[makeKey(value)] = makeValue(value);
|
|
3239
3221
|
}
|
|
3240
3222
|
return result;
|
|
3241
3223
|
}
|
|
3242
3224
|
function arrayToMultiMap(values, makeKey, makeValue = identity) {
|
|
3243
3225
|
const result = createMultiMap();
|
|
3244
|
-
for (
|
|
3226
|
+
for (let i = 0; i < values.length; i++) {
|
|
3227
|
+
const value = values[i];
|
|
3245
3228
|
result.add(makeKey(value), makeValue(value));
|
|
3246
3229
|
}
|
|
3247
3230
|
return result;
|
|
@@ -3251,8 +3234,9 @@ function group(values, getGroupId, resultSelector = identity) {
|
|
|
3251
3234
|
}
|
|
3252
3235
|
function groupBy(values, keySelector) {
|
|
3253
3236
|
const result = {};
|
|
3254
|
-
if (values) {
|
|
3255
|
-
for (
|
|
3237
|
+
if (values !== void 0) {
|
|
3238
|
+
for (let i = 0; i < values.length; i++) {
|
|
3239
|
+
const value = values[i];
|
|
3256
3240
|
const key = `${keySelector(value)}`;
|
|
3257
3241
|
const array = result[key] ?? (result[key] = []);
|
|
3258
3242
|
array.push(value);
|
|
@@ -3291,7 +3275,7 @@ function copyProperties(first2, second) {
|
|
|
3291
3275
|
}
|
|
3292
3276
|
}
|
|
3293
3277
|
function maybeBind(obj, fn) {
|
|
3294
|
-
return fn ? fn.bind(obj)
|
|
3278
|
+
return fn == null ? void 0 : fn.bind(obj);
|
|
3295
3279
|
}
|
|
3296
3280
|
function createMultiMap() {
|
|
3297
3281
|
const map2 = /* @__PURE__ */ new Map();
|
|
@@ -3301,7 +3285,7 @@ function createMultiMap() {
|
|
|
3301
3285
|
}
|
|
3302
3286
|
function multiMapAdd(key, value) {
|
|
3303
3287
|
let values = this.get(key);
|
|
3304
|
-
if (values) {
|
|
3288
|
+
if (values !== void 0) {
|
|
3305
3289
|
values.push(value);
|
|
3306
3290
|
} else {
|
|
3307
3291
|
this.set(key, values = [value]);
|
|
@@ -3310,7 +3294,7 @@ function multiMapAdd(key, value) {
|
|
|
3310
3294
|
}
|
|
3311
3295
|
function multiMapRemove(key, value) {
|
|
3312
3296
|
const values = this.get(key);
|
|
3313
|
-
if (values) {
|
|
3297
|
+
if (values !== void 0) {
|
|
3314
3298
|
unorderedRemoveItem(values, value);
|
|
3315
3299
|
if (!values.length) {
|
|
3316
3300
|
this.delete(key);
|
|
@@ -3318,7 +3302,7 @@ function multiMapRemove(key, value) {
|
|
|
3318
3302
|
}
|
|
3319
3303
|
}
|
|
3320
3304
|
function createQueue(items) {
|
|
3321
|
-
const elements = (items == null ? void 0 : items.slice())
|
|
3305
|
+
const elements = (items == null ? void 0 : items.slice()) ?? [];
|
|
3322
3306
|
let headIndex = 0;
|
|
3323
3307
|
function isEmpty() {
|
|
3324
3308
|
return headIndex === elements.length;
|
|
@@ -3369,13 +3353,8 @@ function createSet(getHashCode, equals) {
|
|
|
3369
3353
|
const hash = getHashCode(element);
|
|
3370
3354
|
if (!multiMap.has(hash)) return false;
|
|
3371
3355
|
const candidates = multiMap.get(hash);
|
|
3372
|
-
if (
|
|
3373
|
-
|
|
3374
|
-
if (equals(candidate, element)) {
|
|
3375
|
-
return true;
|
|
3376
|
-
}
|
|
3377
|
-
}
|
|
3378
|
-
return false;
|
|
3356
|
+
if (isArray(candidates)) return contains(candidates, element, equals);
|
|
3357
|
+
return equals(candidates, element);
|
|
3379
3358
|
},
|
|
3380
3359
|
add(element) {
|
|
3381
3360
|
const hash = getHashCode(element);
|
|
@@ -3594,6 +3573,12 @@ function compareValues(a, b) {
|
|
|
3594
3573
|
function compareTextSpans(a, b) {
|
|
3595
3574
|
return compareValues(a == null ? void 0 : a.start, b == null ? void 0 : b.start) || compareValues(a == null ? void 0 : a.length, b == null ? void 0 : b.length);
|
|
3596
3575
|
}
|
|
3576
|
+
function maxBy(arr, init, mapper) {
|
|
3577
|
+
for (let i = 0; i < arr.length; i++) {
|
|
3578
|
+
init = Math.max(init, mapper(arr[i]));
|
|
3579
|
+
}
|
|
3580
|
+
return init;
|
|
3581
|
+
}
|
|
3597
3582
|
function min(items, compare) {
|
|
3598
3583
|
return reduceLeft(items, (x, y) => compare(x, y) === -1 /* LessThan */ ? x : y);
|
|
3599
3584
|
}
|
|
@@ -3645,8 +3630,8 @@ function setUILocale(value) {
|
|
|
3645
3630
|
}
|
|
3646
3631
|
}
|
|
3647
3632
|
function compareStringsCaseSensitiveUI(a, b) {
|
|
3648
|
-
|
|
3649
|
-
return
|
|
3633
|
+
uiComparerCaseSensitive ?? (uiComparerCaseSensitive = createUIStringComparer(uiLocale));
|
|
3634
|
+
return uiComparerCaseSensitive(a, b);
|
|
3650
3635
|
}
|
|
3651
3636
|
function compareProperties(a, b, key, comparer) {
|
|
3652
3637
|
return a === b ? 0 /* EqualTo */ : a === void 0 ? -1 /* LessThan */ : b === void 0 ? 1 /* GreaterThan */ : comparer(a[key], b[key]);
|
|
@@ -3806,7 +3791,8 @@ function matchedText(pattern, candidate) {
|
|
|
3806
3791
|
function findBestPatternMatch(values, getPattern, candidate) {
|
|
3807
3792
|
let matchedValue;
|
|
3808
3793
|
let longestMatchPrefixLength = -1;
|
|
3809
|
-
for (
|
|
3794
|
+
for (let i = 0; i < values.length; i++) {
|
|
3795
|
+
const v = values[i];
|
|
3810
3796
|
const pattern = getPattern(v);
|
|
3811
3797
|
if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) {
|
|
3812
3798
|
longestMatchPrefixLength = pattern.prefix.length;
|
|
@@ -3851,7 +3837,7 @@ function singleElementArray(t) {
|
|
|
3851
3837
|
return t === void 0 ? void 0 : [t];
|
|
3852
3838
|
}
|
|
3853
3839
|
function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, deleted, unchanged) {
|
|
3854
|
-
unchanged
|
|
3840
|
+
unchanged ?? (unchanged = noop);
|
|
3855
3841
|
let newIndex = 0;
|
|
3856
3842
|
let oldIndex = 0;
|
|
3857
3843
|
const newLen = newItems.length;
|
|
@@ -3913,7 +3899,7 @@ function cartesianProductWorker(arrays, result, outer, index) {
|
|
|
3913
3899
|
}
|
|
3914
3900
|
}
|
|
3915
3901
|
function takeWhile(array, predicate) {
|
|
3916
|
-
if (array) {
|
|
3902
|
+
if (array !== void 0) {
|
|
3917
3903
|
const len = array.length;
|
|
3918
3904
|
let index = 0;
|
|
3919
3905
|
while (index < len && predicate(array[index])) {
|
|
@@ -3923,7 +3909,7 @@ function takeWhile(array, predicate) {
|
|
|
3923
3909
|
}
|
|
3924
3910
|
}
|
|
3925
3911
|
function skipWhile(array, predicate) {
|
|
3926
|
-
if (array) {
|
|
3912
|
+
if (array !== void 0) {
|
|
3927
3913
|
const len = array.length;
|
|
3928
3914
|
let index = 0;
|
|
3929
3915
|
while (index < len && predicate(array[index])) {
|
|
@@ -4848,7 +4834,7 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;
|
|
|
4848
4834
|
}
|
|
4849
4835
|
function renderGraph() {
|
|
4850
4836
|
const columnCount = columnWidths.length;
|
|
4851
|
-
const laneCount = nodes
|
|
4837
|
+
const laneCount = maxBy(nodes, 0, (n) => n.lane) + 1;
|
|
4852
4838
|
const lanes = fill(Array(laneCount), "");
|
|
4853
4839
|
const grid = columnWidths.map(() => Array(laneCount));
|
|
4854
4840
|
const connectors = columnWidths.map(() => fill(Array(laneCount), 0));
|
|
@@ -11707,7 +11693,7 @@ function computePositionOfLineAndCharacter(lineStarts, line, character, debugTex
|
|
|
11707
11693
|
if (allowEdits) {
|
|
11708
11694
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
11709
11695
|
} else {
|
|
11710
|
-
Debug.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== void 0 ?
|
|
11696
|
+
Debug.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== void 0 ? arrayIsEqualTo(lineStarts, computeLineStarts(debugText)) : "unknown"}`);
|
|
11711
11697
|
}
|
|
11712
11698
|
}
|
|
11713
11699
|
const res = lineStarts[line] + character;
|
|
@@ -42077,9 +42063,7 @@ function convertToTSConfig(configParseResult, configFileName, host) {
|
|
|
42077
42063
|
return config;
|
|
42078
42064
|
}
|
|
42079
42065
|
function optionMapToObject(optionMap) {
|
|
42080
|
-
return
|
|
42081
|
-
...arrayFrom(optionMap.entries()).reduce((prev, cur) => ({ ...prev, [cur[0]]: cur[1] }), {})
|
|
42082
|
-
};
|
|
42066
|
+
return Object.fromEntries(optionMap);
|
|
42083
42067
|
}
|
|
42084
42068
|
function filterSameAsDefaultInclude(specs) {
|
|
42085
42069
|
if (!length(specs)) return void 0;
|
|
@@ -71323,7 +71307,7 @@ function createTypeChecker(host) {
|
|
|
71323
71307
|
return false;
|
|
71324
71308
|
}
|
|
71325
71309
|
function inferTypesFromTemplateLiteralType(source, target) {
|
|
71326
|
-
return source.flags & 128 /* StringLiteral */ ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 /* TemplateLiteral */ ?
|
|
71310
|
+
return source.flags & 128 /* StringLiteral */ ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 /* TemplateLiteral */ ? arrayIsEqualTo(source.texts, target.texts) ? map(source.types, (s, i) => {
|
|
71327
71311
|
return isTypeAssignableTo(getBaseConstraintOrType(s), getBaseConstraintOrType(target.types[i])) ? s : getStringLikeTypeForType(s);
|
|
71328
71312
|
}) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0;
|
|
71329
71313
|
}
|
|
@@ -73487,7 +73471,7 @@ function createTypeChecker(host) {
|
|
|
73487
73471
|
return getEvolvingArrayType(getUnionType(map(types, getElementTypeOfEvolvingArrayType)));
|
|
73488
73472
|
}
|
|
73489
73473
|
const result = recombineUnknownType(getUnionType(sameMap(types, finalizeEvolvingArrayType), subtypeReduction));
|
|
73490
|
-
if (result !== declaredType && result.flags & declaredType.flags & 1048576 /* Union */ &&
|
|
73474
|
+
if (result !== declaredType && result.flags & declaredType.flags & 1048576 /* Union */ && arrayIsEqualTo(result.types, declaredType.types)) {
|
|
73491
73475
|
return declaredType;
|
|
73492
73476
|
}
|
|
73493
73477
|
return result;
|
|
@@ -125271,7 +125255,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
125271
125255
|
if (file.hasNoDefaultLib) {
|
|
125272
125256
|
return true;
|
|
125273
125257
|
}
|
|
125274
|
-
if (
|
|
125258
|
+
if (options.noLib) {
|
|
125275
125259
|
return false;
|
|
125276
125260
|
}
|
|
125277
125261
|
const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
|
|
@@ -130650,7 +130634,7 @@ function createTabularErrorsDisplay(filesInError, host) {
|
|
|
130650
130634
|
if (distinctFiles.length === 0) return "";
|
|
130651
130635
|
const numberLength = (num) => Math.log(num) * Math.LOG10E + 1;
|
|
130652
130636
|
const fileToErrorCount = distinctFiles.map((file) => [file, countWhere(filesInError, (fileInError) => fileInError.fileName === file.fileName)]);
|
|
130653
|
-
const maxErrors = fileToErrorCount
|
|
130637
|
+
const maxErrors = maxBy(fileToErrorCount, 0, (value) => value[1]);
|
|
130654
130638
|
const headerRow = Diagnostics.Errors_Files.message;
|
|
130655
130639
|
const leftColumnHeadingLength = headerRow.split(" ")[0].length;
|
|
130656
130640
|
const leftPaddingGoal = Math.max(leftColumnHeadingLength, numberLength(maxErrors));
|
|
@@ -138832,10 +138816,7 @@ function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePa
|
|
|
138832
138816
|
function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) {
|
|
138833
138817
|
var _a, _b;
|
|
138834
138818
|
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
138835
|
-
const excludePatterns = preferences.autoImportFileExcludePatterns &&
|
|
138836
|
-
const pattern = getSubPatternFromSpec(spec, "", "exclude");
|
|
138837
|
-
return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;
|
|
138838
|
-
});
|
|
138819
|
+
const excludePatterns = preferences.autoImportFileExcludePatterns && getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2);
|
|
138839
138820
|
forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, host, (module2, file) => cb(
|
|
138840
138821
|
module2,
|
|
138841
138822
|
file,
|
|
@@ -138868,25 +138849,17 @@ function forEachExternalModuleToImportFrom(program, host, preferences, useAutoIm
|
|
|
138868
138849
|
(_b = host.log) == null ? void 0 : _b.call(host, `forEachExternalModuleToImportFrom autoImportProvider: ${timestamp() - start}`);
|
|
138869
138850
|
}
|
|
138870
138851
|
}
|
|
138871
|
-
function
|
|
138872
|
-
|
|
138873
|
-
|
|
138874
|
-
|
|
138875
|
-
if (excludePatterns.some((p) => p.test(fileName))) return true;
|
|
138876
|
-
if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
|
|
138877
|
-
let dir = getDirectoryPath(fileName);
|
|
138878
|
-
return forEachAncestorDirectory(getDirectoryPath(path), (dirPath) => {
|
|
138879
|
-
const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
|
|
138880
|
-
if (symlinks) {
|
|
138881
|
-
return symlinks.some((s) => excludePatterns.some((p) => p.test(fileName.replace(dir, s))));
|
|
138882
|
-
}
|
|
138883
|
-
dir = getDirectoryPath(dir);
|
|
138884
|
-
}) ?? false;
|
|
138885
|
-
}
|
|
138886
|
-
return false;
|
|
138852
|
+
function getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2) {
|
|
138853
|
+
return mapDefined(preferences.autoImportFileExcludePatterns, (spec) => {
|
|
138854
|
+
const pattern = getSubPatternFromSpec(spec, "", "exclude");
|
|
138855
|
+
return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0;
|
|
138887
138856
|
});
|
|
138857
|
+
}
|
|
138858
|
+
function forEachExternalModule(checker, allSourceFiles, excludePatterns, host, cb) {
|
|
138859
|
+
var _a;
|
|
138860
|
+
const isExcluded = excludePatterns && getIsExcluded(excludePatterns, host);
|
|
138888
138861
|
for (const ambient of checker.getAmbientModules()) {
|
|
138889
|
-
if (!ambient.name.includes("*") && !(excludePatterns && ((
|
|
138862
|
+
if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile()))))) {
|
|
138890
138863
|
cb(
|
|
138891
138864
|
ambient,
|
|
138892
138865
|
/*sourceFile*/
|
|
@@ -138900,6 +138873,28 @@ function forEachExternalModule(checker, allSourceFiles, excludePatterns, host, c
|
|
|
138900
138873
|
}
|
|
138901
138874
|
}
|
|
138902
138875
|
}
|
|
138876
|
+
function getIsExcluded(excludePatterns, host) {
|
|
138877
|
+
var _a;
|
|
138878
|
+
const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
138879
|
+
return ({ fileName, path }) => {
|
|
138880
|
+
if (excludePatterns.some((p) => p.test(fileName))) return true;
|
|
138881
|
+
if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
|
|
138882
|
+
let dir = getDirectoryPath(fileName);
|
|
138883
|
+
return forEachAncestorDirectory(getDirectoryPath(path), (dirPath) => {
|
|
138884
|
+
const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
|
|
138885
|
+
if (symlinks) {
|
|
138886
|
+
return symlinks.some((s) => excludePatterns.some((p) => p.test(fileName.replace(dir, s))));
|
|
138887
|
+
}
|
|
138888
|
+
dir = getDirectoryPath(dir);
|
|
138889
|
+
}) ?? false;
|
|
138890
|
+
}
|
|
138891
|
+
return false;
|
|
138892
|
+
};
|
|
138893
|
+
}
|
|
138894
|
+
function getIsFileExcluded(host, preferences) {
|
|
138895
|
+
if (!preferences.autoImportFileExcludePatterns) return () => false;
|
|
138896
|
+
return getIsExcluded(getIsExcludedPatterns(preferences, hostUsesCaseSensitiveFileNames(host)), host);
|
|
138897
|
+
}
|
|
138903
138898
|
function getExportInfoMap(importingFile, host, program, preferences, cancellationToken) {
|
|
138904
138899
|
var _a, _b, _c, _d, _e;
|
|
138905
138900
|
const start = timestamp();
|
|
@@ -144234,7 +144229,7 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
|
|
|
144234
144229
|
const unusedImportsFromOldFile = /* @__PURE__ */ new Set();
|
|
144235
144230
|
for (const statement of toMove) {
|
|
144236
144231
|
forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => {
|
|
144237
|
-
if (!symbol.declarations) {
|
|
144232
|
+
if (!symbol.declarations || isGlobalType(checker, symbol)) {
|
|
144238
144233
|
return;
|
|
144239
144234
|
}
|
|
144240
144235
|
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
|
|
@@ -144284,6 +144279,16 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR
|
|
|
144284
144279
|
return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0;
|
|
144285
144280
|
}
|
|
144286
144281
|
}
|
|
144282
|
+
function isGlobalType(checker, symbol) {
|
|
144283
|
+
return !!checker.resolveName(
|
|
144284
|
+
symbol.name,
|
|
144285
|
+
/*location*/
|
|
144286
|
+
void 0,
|
|
144287
|
+
788968 /* Type */,
|
|
144288
|
+
/*excludeGlobals*/
|
|
144289
|
+
false
|
|
144290
|
+
);
|
|
144291
|
+
}
|
|
144287
144292
|
function makeUniqueFilename(proposedFilename, extension, inDirectory, host) {
|
|
144288
144293
|
let newFilename = proposedFilename;
|
|
144289
144294
|
for (let i = 1; ; i++) {
|
|
@@ -154551,7 +154556,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre
|
|
|
154551
154556
|
addImport(first(info));
|
|
154552
154557
|
}
|
|
154553
154558
|
function addImportFromExportedSymbol(exportedSymbol, isValidTypeOnlyUseSite, referenceImport) {
|
|
154554
|
-
var _a;
|
|
154559
|
+
var _a, _b;
|
|
154555
154560
|
const moduleSymbol = Debug.checkDefined(exportedSymbol.parent);
|
|
154556
154561
|
const symbolName2 = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions));
|
|
154557
154562
|
const checker = program.getTypeChecker();
|
|
@@ -154568,10 +154573,14 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre
|
|
|
154568
154573
|
preferences,
|
|
154569
154574
|
cancellationToken
|
|
154570
154575
|
);
|
|
154576
|
+
if (!exportInfo) {
|
|
154577
|
+
Debug.assert((_a = preferences.autoImportFileExcludePatterns) == null ? void 0 : _a.length);
|
|
154578
|
+
return;
|
|
154579
|
+
}
|
|
154571
154580
|
const useRequire = shouldUseRequire(sourceFile, program);
|
|
154572
154581
|
let fix = getImportFixForSymbol(
|
|
154573
154582
|
sourceFile,
|
|
154574
|
-
|
|
154583
|
+
exportInfo,
|
|
154575
154584
|
program,
|
|
154576
154585
|
/*position*/
|
|
154577
154586
|
void 0,
|
|
@@ -154581,7 +154590,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre
|
|
|
154581
154590
|
preferences
|
|
154582
154591
|
);
|
|
154583
154592
|
if (fix) {
|
|
154584
|
-
const localName = ((
|
|
154593
|
+
const localName = ((_b = tryCast(referenceImport == null ? void 0 : referenceImport.name, isIdentifier)) == null ? void 0 : _b.text) ?? symbolName2;
|
|
154585
154594
|
if (referenceImport && isTypeOnlyImportDeclaration(referenceImport) && (fix.kind === 3 /* AddNew */ || fix.kind === 2 /* AddToExisting */) && fix.addAsTypeOnly === 1 /* Allowed */) {
|
|
154586
154595
|
fix = { ...fix, addAsTypeOnly: 2 /* Required */ };
|
|
154587
154596
|
}
|
|
@@ -155030,8 +155039,12 @@ function codeFixActionToCodeAction({ description: description3, changes, command
|
|
|
155030
155039
|
}
|
|
155031
155040
|
function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, moduleSymbol, preferCapitalized, program, host, preferences, cancellationToken) {
|
|
155032
155041
|
const getChecker = createGetChecker(program, host);
|
|
155042
|
+
const isFileExcluded = preferences.autoImportFileExcludePatterns && getIsFileExcluded(host, preferences);
|
|
155043
|
+
const mergedModuleSymbol = program.getTypeChecker().getMergedSymbol(moduleSymbol);
|
|
155044
|
+
const moduleSourceFile = isFileExcluded && mergedModuleSymbol.declarations && getDeclarationOfKind(mergedModuleSymbol, 307 /* SourceFile */);
|
|
155045
|
+
const moduleSymbolExcluded = moduleSourceFile && isFileExcluded(moduleSourceFile);
|
|
155033
155046
|
return getExportInfoMap(importingFile, host, program, preferences, cancellationToken).search(importingFile.path, preferCapitalized, (name) => name === symbolName2, (info) => {
|
|
155034
|
-
if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol && info.some((i) => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol)) {
|
|
155047
|
+
if (getChecker(info[0].isFromPackageJson).getMergedSymbol(skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson))) === symbol && (moduleSymbolExcluded || info.some((i) => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol))) {
|
|
155035
155048
|
return info;
|
|
155036
155049
|
}
|
|
155037
155050
|
});
|
|
@@ -171363,7 +171376,7 @@ function getJsDocCommentsFromDeclarations(declarations, checker) {
|
|
|
171363
171376
|
return flatten(intersperse(parts, [lineBreakPart()]));
|
|
171364
171377
|
}
|
|
171365
171378
|
function isIdenticalListOfDisplayParts(parts1, parts2) {
|
|
171366
|
-
return
|
|
171379
|
+
return arrayIsEqualTo(parts1, parts2, (p1, p2) => p1.kind === p2.kind && p1.text === p2.text);
|
|
171367
171380
|
}
|
|
171368
171381
|
function getCommentHavingNodes(declaration) {
|
|
171369
171382
|
switch (declaration.kind) {
|
|
@@ -178773,7 +178786,6 @@ __export(ts_exports2, {
|
|
|
178773
178786
|
arrayToMap: () => arrayToMap,
|
|
178774
178787
|
arrayToMultiMap: () => arrayToMultiMap,
|
|
178775
178788
|
arrayToNumericMap: () => arrayToNumericMap,
|
|
178776
|
-
arraysEqual: () => arraysEqual,
|
|
178777
178789
|
assertType: () => assertType,
|
|
178778
178790
|
assign: () => assign,
|
|
178779
178791
|
assignHelper: () => assignHelper,
|
|
@@ -179376,6 +179388,7 @@ __export(ts_exports2, {
|
|
|
179376
179388
|
getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes,
|
|
179377
179389
|
getInternalEmitFlags: () => getInternalEmitFlags,
|
|
179378
179390
|
getInvokedExpression: () => getInvokedExpression,
|
|
179391
|
+
getIsFileExcluded: () => getIsFileExcluded,
|
|
179379
179392
|
getIsolatedModules: () => getIsolatedModules,
|
|
179380
179393
|
getJSDocAugmentsTag: () => getJSDocAugmentsTag,
|
|
179381
179394
|
getJSDocClassTag: () => getJSDocClassTag,
|
|
@@ -180454,7 +180467,6 @@ __export(ts_exports2, {
|
|
|
180454
180467
|
map: () => map,
|
|
180455
180468
|
mapAllOrFail: () => mapAllOrFail,
|
|
180456
180469
|
mapDefined: () => mapDefined,
|
|
180457
|
-
mapDefinedEntries: () => mapDefinedEntries,
|
|
180458
180470
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
180459
180471
|
mapEntries: () => mapEntries,
|
|
180460
180472
|
mapIterator: () => mapIterator,
|
|
@@ -180464,6 +180476,7 @@ __export(ts_exports2, {
|
|
|
180464
180476
|
matchPatternOrExact: () => matchPatternOrExact,
|
|
180465
180477
|
matchedText: () => matchedText,
|
|
180466
180478
|
matchesExclude: () => matchesExclude,
|
|
180479
|
+
maxBy: () => maxBy,
|
|
180467
180480
|
maybeBind: () => maybeBind,
|
|
180468
180481
|
maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages,
|
|
180469
180482
|
memoize: () => memoize,
|
|
@@ -181188,7 +181201,6 @@ var TypingsInstaller = class {
|
|
|
181188
181201
|
this.missingTypingsSet = /* @__PURE__ */ new Set();
|
|
181189
181202
|
this.knownCachesSet = /* @__PURE__ */ new Set();
|
|
181190
181203
|
this.projectWatchers = /* @__PURE__ */ new Map();
|
|
181191
|
-
/** @internal */
|
|
181192
181204
|
this.pendingRunRequests = [];
|
|
181193
181205
|
this.installRunCount = 1;
|
|
181194
181206
|
this.inFlightRequestCount = 0;
|
|
@@ -182607,9 +182619,7 @@ var Project3 = class _Project {
|
|
|
182607
182619
|
* @internal
|
|
182608
182620
|
*/
|
|
182609
182621
|
this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map();
|
|
182610
|
-
/** @internal */
|
|
182611
182622
|
this.hasAddedorRemovedFiles = false;
|
|
182612
|
-
/** @internal */
|
|
182613
182623
|
this.hasAddedOrRemovedSymlinks = false;
|
|
182614
182624
|
/**
|
|
182615
182625
|
* Last version that was reported.
|
|
@@ -182634,7 +182644,6 @@ var Project3 = class _Project {
|
|
|
182634
182644
|
this.dirty = false;
|
|
182635
182645
|
/** @internal */
|
|
182636
182646
|
this.typingFiles = emptyArray2;
|
|
182637
|
-
/** @internal */
|
|
182638
182647
|
this.moduleSpecifierCache = createModuleSpecifierCache(this);
|
|
182639
182648
|
/** @internal */
|
|
182640
182649
|
this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);
|
|
@@ -183464,12 +183473,10 @@ var Project3 = class _Project {
|
|
|
183464
183473
|
this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this);
|
|
183465
183474
|
}
|
|
183466
183475
|
}
|
|
183467
|
-
/** @internal */
|
|
183468
183476
|
closeWatchingTypingLocations() {
|
|
183469
183477
|
if (this.typingWatchers) clearMap(this.typingWatchers, closeFileWatcher);
|
|
183470
183478
|
this.typingWatchers = void 0;
|
|
183471
183479
|
}
|
|
183472
|
-
/** @internal */
|
|
183473
183480
|
onTypingInstallerWatchInvoke() {
|
|
183474
183481
|
this.typingWatchers.isInvoked = true;
|
|
183475
183482
|
this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: ActionInvalidate });
|
|
@@ -183825,7 +183832,6 @@ var Project3 = class _Project {
|
|
|
183825
183832
|
false
|
|
183826
183833
|
);
|
|
183827
183834
|
}
|
|
183828
|
-
/** @internal */
|
|
183829
183835
|
filesToStringWorker(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {
|
|
183830
183836
|
if (this.isInitialLoadPending()) return " Files (0) InitialLoadPending\n";
|
|
183831
183837
|
if (!this.program) return " Files (0) NoProgram\n";
|
|
@@ -184159,7 +184165,6 @@ var Project3 = class _Project {
|
|
|
184159
184165
|
(_c = tracing) == null ? void 0 : _c.pop();
|
|
184160
184166
|
}
|
|
184161
184167
|
}
|
|
184162
|
-
/** @internal */
|
|
184163
184168
|
isDefaultProjectForOpenFiles() {
|
|
184164
184169
|
return !!forEachEntry(
|
|
184165
184170
|
this.projectService.openFiles,
|
|
@@ -184200,7 +184205,6 @@ var Project3 = class _Project {
|
|
|
184200
184205
|
(_d = this.getScriptInfo(rootFile)) == null ? void 0 : _d.editContent(0, this.program.getSourceFile(rootFile).getText().length, originalText);
|
|
184201
184206
|
}
|
|
184202
184207
|
}
|
|
184203
|
-
/** @internal */
|
|
184204
184208
|
getCompilerOptionsForNoDtsResolutionProject() {
|
|
184205
184209
|
return {
|
|
184206
184210
|
...this.getCompilerOptions(),
|
|
@@ -184618,7 +184622,6 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
184618
184622
|
return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache();
|
|
184619
184623
|
}
|
|
184620
184624
|
};
|
|
184621
|
-
/** @internal */
|
|
184622
184625
|
_AutoImportProviderProject.maxDependencies = 10;
|
|
184623
184626
|
/** @internal */
|
|
184624
184627
|
_AutoImportProviderProject.compilerOptionsOverrides = {
|
|
@@ -184693,7 +184696,6 @@ var ConfiguredProject2 = class extends Project3 {
|
|
|
184693
184696
|
onReleaseParsedCommandLine(fileName) {
|
|
184694
184697
|
this.releaseParsedConfig(asNormalizedPath(this.projectService.toCanonicalFileName(asNormalizedPath(normalizePath(fileName)))));
|
|
184695
184698
|
}
|
|
184696
|
-
/** @internal */
|
|
184697
184699
|
releaseParsedConfig(canonicalConfigFilePath) {
|
|
184698
184700
|
this.projectService.stopWatchingWildCards(canonicalConfigFilePath, this);
|
|
184699
184701
|
this.projectService.releaseParsedConfig(canonicalConfigFilePath, this);
|
|
@@ -185419,9 +185421,7 @@ var _ProjectService = class _ProjectService {
|
|
|
185419
185421
|
this.pendingEnsureProjectForOpenFiles = false;
|
|
185420
185422
|
/** Tracks projects that we have already sent telemetry for. */
|
|
185421
185423
|
this.seenProjects = /* @__PURE__ */ new Map();
|
|
185422
|
-
/** @internal */
|
|
185423
185424
|
this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map();
|
|
185424
|
-
/** @internal */
|
|
185425
185425
|
this.extendedConfigCache = /* @__PURE__ */ new Map();
|
|
185426
185426
|
/** @internal */
|
|
185427
185427
|
this.baseline = noop;
|
|
@@ -185876,8 +185876,6 @@ var _ProjectService = class _ProjectService {
|
|
|
185876
185876
|
}
|
|
185877
185877
|
/**
|
|
185878
185878
|
* This is to watch whenever files are added or removed to the wildcard directories
|
|
185879
|
-
*
|
|
185880
|
-
* @internal
|
|
185881
185879
|
*/
|
|
185882
185880
|
watchWildcardDirectory(directory, flags, configFileName, config) {
|
|
185883
185881
|
let watcher = this.watchFactory.watchDirectory(
|
|
@@ -185957,7 +185955,6 @@ var _ProjectService = class _ProjectService {
|
|
|
185957
185955
|
};
|
|
185958
185956
|
return result;
|
|
185959
185957
|
}
|
|
185960
|
-
/** @internal */
|
|
185961
185958
|
delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, loadReason) {
|
|
185962
185959
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
185963
185960
|
if (!(configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config)) return false;
|
|
@@ -185985,7 +185982,6 @@ var _ProjectService = class _ProjectService {
|
|
|
185985
185982
|
});
|
|
185986
185983
|
return scheduledAnyProjectUpdate;
|
|
185987
185984
|
}
|
|
185988
|
-
/** @internal */
|
|
185989
185985
|
onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind) {
|
|
185990
185986
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
185991
185987
|
const project = this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath);
|
|
@@ -186207,7 +186203,6 @@ var _ProjectService = class _ProjectService {
|
|
|
186207
186203
|
this.configFileExistenceInfoCache.set(canonicalConfigFilePath, { exists, openFilesImpactedByConfigFile });
|
|
186208
186204
|
return exists;
|
|
186209
186205
|
}
|
|
186210
|
-
/** @internal */
|
|
186211
186206
|
createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, forProject) {
|
|
186212
186207
|
var _a, _b;
|
|
186213
186208
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
@@ -186566,8 +186561,6 @@ var _ProjectService = class _ProjectService {
|
|
|
186566
186561
|
}
|
|
186567
186562
|
/**
|
|
186568
186563
|
* Read the config file of the project, and update the project root file names.
|
|
186569
|
-
*
|
|
186570
|
-
* @internal
|
|
186571
186564
|
*/
|
|
186572
186565
|
loadConfiguredProject(project, reason) {
|
|
186573
186566
|
var _a, _b;
|
|
@@ -186819,7 +186812,6 @@ var _ProjectService = class _ProjectService {
|
|
|
186819
186812
|
project.markAsDirty();
|
|
186820
186813
|
return project.updateGraph();
|
|
186821
186814
|
}
|
|
186822
|
-
/** @internal */
|
|
186823
186815
|
reloadFileNamesOfParsedConfig(configFileName, config) {
|
|
186824
186816
|
if (config.updateLevel === void 0) return config.parsedCommandLine.fileNames;
|
|
186825
186817
|
Debug.assert(config.updateLevel === 1 /* RootNamesAndUpdate */);
|
|
@@ -186864,7 +186856,6 @@ var _ProjectService = class _ProjectService {
|
|
|
186864
186856
|
true
|
|
186865
186857
|
);
|
|
186866
186858
|
}
|
|
186867
|
-
/** @internal */
|
|
186868
186859
|
clearSemanticCache(project) {
|
|
186869
186860
|
project.originalConfiguredProjects = void 0;
|
|
186870
186861
|
project.resolutionCache.clear();
|
|
@@ -187441,7 +187432,6 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187441
187432
|
getWatchOptions(project) {
|
|
187442
187433
|
return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions(), project.getCurrentDirectory());
|
|
187443
187434
|
}
|
|
187444
|
-
/** @internal */
|
|
187445
187435
|
getWatchOptionsFromProjectWatchOptions(projectOptions, basePath) {
|
|
187446
187436
|
const hostWatchOptions = !this.hostConfiguration.beforeSubstitution ? this.hostConfiguration.watchOptions : handleWatchOptionsConfigDirTemplateSubstitution(
|
|
187447
187437
|
this.hostConfiguration.beforeSubstitution,
|
|
@@ -187830,12 +187820,12 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187830
187820
|
}
|
|
187831
187821
|
/** @internal */
|
|
187832
187822
|
loadAncestorProjectTree(forProjects) {
|
|
187833
|
-
forProjects
|
|
187834
|
-
this.configuredProjects,
|
|
187835
|
-
|
|
187836
|
-
);
|
|
187823
|
+
forProjects ?? (forProjects = new Set(
|
|
187824
|
+
mapDefinedIterator(this.configuredProjects.entries(), ([key, project]) => !project.isInitialLoadPending() ? key : void 0)
|
|
187825
|
+
));
|
|
187837
187826
|
const seenProjects = /* @__PURE__ */ new Set();
|
|
187838
|
-
|
|
187827
|
+
const currentConfiguredProjects = arrayFrom(this.configuredProjects.values());
|
|
187828
|
+
for (const project of currentConfiguredProjects) {
|
|
187839
187829
|
if (forEachPotentialProjectReference(project, (potentialRefPath) => forProjects.has(potentialRefPath))) {
|
|
187840
187830
|
updateProjectIfDirty(project);
|
|
187841
187831
|
}
|
|
@@ -188331,7 +188321,6 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
188331
188321
|
}
|
|
188332
188322
|
/**
|
|
188333
188323
|
* Performs the remaining steps of enabling a plugin after its module has been instantiated.
|
|
188334
|
-
* @internal
|
|
188335
188324
|
*/
|
|
188336
188325
|
endEnablePlugin(project, { pluginConfigEntry, resolvedModule, errorLogs }) {
|
|
188337
188326
|
var _a;
|
|
@@ -188447,7 +188436,6 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
188447
188436
|
}
|
|
188448
188437
|
});
|
|
188449
188438
|
}
|
|
188450
|
-
/** @internal */
|
|
188451
188439
|
watchPackageJsonFile(file, path, project) {
|
|
188452
188440
|
Debug.assert(project !== void 0);
|
|
188453
188441
|
let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path);
|
|
@@ -188488,7 +188476,6 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
188488
188476
|
result.projects.add(project);
|
|
188489
188477
|
(project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result);
|
|
188490
188478
|
}
|
|
188491
|
-
/** @internal */
|
|
188492
188479
|
onPackageJsonChange(result) {
|
|
188493
188480
|
result.projects.forEach((project) => {
|
|
188494
188481
|
var _a;
|
|
@@ -193308,7 +193295,6 @@ if (typeof console !== "undefined") {
|
|
|
193308
193295
|
arrayToMap,
|
|
193309
193296
|
arrayToMultiMap,
|
|
193310
193297
|
arrayToNumericMap,
|
|
193311
|
-
arraysEqual,
|
|
193312
193298
|
assertType,
|
|
193313
193299
|
assign,
|
|
193314
193300
|
assignHelper,
|
|
@@ -193911,6 +193897,7 @@ if (typeof console !== "undefined") {
|
|
|
193911
193897
|
getInterfaceBaseTypeNodes,
|
|
193912
193898
|
getInternalEmitFlags,
|
|
193913
193899
|
getInvokedExpression,
|
|
193900
|
+
getIsFileExcluded,
|
|
193914
193901
|
getIsolatedModules,
|
|
193915
193902
|
getJSDocAugmentsTag,
|
|
193916
193903
|
getJSDocClassTag,
|
|
@@ -194989,7 +194976,6 @@ if (typeof console !== "undefined") {
|
|
|
194989
194976
|
map,
|
|
194990
194977
|
mapAllOrFail,
|
|
194991
194978
|
mapDefined,
|
|
194992
|
-
mapDefinedEntries,
|
|
194993
194979
|
mapDefinedIterator,
|
|
194994
194980
|
mapEntries,
|
|
194995
194981
|
mapIterator,
|
|
@@ -194999,6 +194985,7 @@ if (typeof console !== "undefined") {
|
|
|
194999
194985
|
matchPatternOrExact,
|
|
195000
194986
|
matchedText,
|
|
195001
194987
|
matchesExclude,
|
|
194988
|
+
maxBy,
|
|
195002
194989
|
maybeBind,
|
|
195003
194990
|
maybeSetLocalizedDiagnosticMessages,
|
|
195004
194991
|
memoize,
|