@typescript-deploys/pr-build 5.1.0-pr-53268-4 → 5.1.0-pr-52062-4
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 +38 -53
- package/lib/tsserver.js +66 -77
- package/lib/tsserverlibrary.js +63 -76
- package/lib/typescript.js +39 -55
- package/lib/typingsInstaller.js +13 -34
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.1";
|
|
26
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
26
|
+
var version = `${versionMajorMinor}.0-insiders.20230316`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -2645,28 +2645,6 @@ function tryGetNativePerformanceHooks() {
|
|
|
2645
2645
|
var timestamp = nativePerformance ? () => nativePerformance.now() : Date.now ? Date.now : () => +/* @__PURE__ */ new Date();
|
|
2646
2646
|
|
|
2647
2647
|
// src/compiler/perfLogger.ts
|
|
2648
|
-
var nullLogger = {
|
|
2649
|
-
logEvent: noop,
|
|
2650
|
-
logErrEvent: noop,
|
|
2651
|
-
logPerfEvent: noop,
|
|
2652
|
-
logInfoEvent: noop,
|
|
2653
|
-
logStartCommand: noop,
|
|
2654
|
-
logStopCommand: noop,
|
|
2655
|
-
logStartUpdateProgram: noop,
|
|
2656
|
-
logStopUpdateProgram: noop,
|
|
2657
|
-
logStartUpdateGraph: noop,
|
|
2658
|
-
logStopUpdateGraph: noop,
|
|
2659
|
-
logStartResolveModule: noop,
|
|
2660
|
-
logStopResolveModule: noop,
|
|
2661
|
-
logStartParseSourceFile: noop,
|
|
2662
|
-
logStopParseSourceFile: noop,
|
|
2663
|
-
logStartReadFile: noop,
|
|
2664
|
-
logStopReadFile: noop,
|
|
2665
|
-
logStartBindFile: noop,
|
|
2666
|
-
logStopBindFile: noop,
|
|
2667
|
-
logStartScheduledOperation: noop,
|
|
2668
|
-
logStopScheduledOperation: noop
|
|
2669
|
-
};
|
|
2670
2648
|
var etwModule;
|
|
2671
2649
|
var _a;
|
|
2672
2650
|
try {
|
|
@@ -2675,7 +2653,7 @@ try {
|
|
|
2675
2653
|
} catch (e) {
|
|
2676
2654
|
etwModule = void 0;
|
|
2677
2655
|
}
|
|
2678
|
-
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule :
|
|
2656
|
+
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0;
|
|
2679
2657
|
|
|
2680
2658
|
// src/compiler/_namespaces/ts.performance.ts
|
|
2681
2659
|
var ts_performance_exports = {};
|
|
@@ -5168,13 +5146,15 @@ var sys = (() => {
|
|
|
5168
5146
|
return buffer.toString("utf8");
|
|
5169
5147
|
}
|
|
5170
5148
|
function readFile(fileName, _encoding) {
|
|
5171
|
-
|
|
5149
|
+
var _a2, _b;
|
|
5150
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartReadFile(fileName);
|
|
5172
5151
|
const file = readFileWorker(fileName, _encoding);
|
|
5173
|
-
perfLogger.logStopReadFile();
|
|
5152
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopReadFile();
|
|
5174
5153
|
return file;
|
|
5175
5154
|
}
|
|
5176
5155
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
5177
|
-
|
|
5156
|
+
var _a2;
|
|
5157
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("WriteFile: " + fileName);
|
|
5178
5158
|
if (writeByteOrderMark) {
|
|
5179
5159
|
data = byteOrderMarkIndicator + data;
|
|
5180
5160
|
}
|
|
@@ -5195,7 +5175,8 @@ var sys = (() => {
|
|
|
5195
5175
|
}
|
|
5196
5176
|
}
|
|
5197
5177
|
function getAccessibleFileSystemEntries(path) {
|
|
5198
|
-
|
|
5178
|
+
var _a2;
|
|
5179
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("ReadDir: " + (path || "."));
|
|
5199
5180
|
try {
|
|
5200
5181
|
const entries = _fs.readdirSync(path || ".", { withFileTypes: true });
|
|
5201
5182
|
const files = [];
|
|
@@ -25938,7 +25919,7 @@ function setExternalModuleIndicator(sourceFile) {
|
|
|
25938
25919
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
25939
25920
|
}
|
|
25940
25921
|
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
25941
|
-
var _a2, _b;
|
|
25922
|
+
var _a2, _b, _c, _d;
|
|
25942
25923
|
(_a2 = tracing) == null ? void 0 : _a2.push(
|
|
25943
25924
|
tracing.Phase.Parse,
|
|
25944
25925
|
"createSourceFile",
|
|
@@ -25948,7 +25929,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
25948
25929
|
);
|
|
25949
25930
|
mark("beforeParse");
|
|
25950
25931
|
let result;
|
|
25951
|
-
perfLogger.logStartParseSourceFile(fileName);
|
|
25932
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartParseSourceFile(fileName);
|
|
25952
25933
|
const {
|
|
25953
25934
|
languageVersion,
|
|
25954
25935
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
@@ -25981,10 +25962,10 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
25981
25962
|
setIndicator
|
|
25982
25963
|
);
|
|
25983
25964
|
}
|
|
25984
|
-
perfLogger.logStopParseSourceFile();
|
|
25965
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
25985
25966
|
mark("afterParse");
|
|
25986
25967
|
measure("Parse", "beforeParse", "afterParse");
|
|
25987
|
-
(
|
|
25968
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
25988
25969
|
return result;
|
|
25989
25970
|
}
|
|
25990
25971
|
function parseIsolatedEntityName(text, languageVersion) {
|
|
@@ -37167,6 +37148,7 @@ function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanoni
|
|
|
37167
37148
|
);
|
|
37168
37149
|
}
|
|
37169
37150
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
37151
|
+
var _a2, _b, _c;
|
|
37170
37152
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
37171
37153
|
if (redirectedReference) {
|
|
37172
37154
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -37208,10 +37190,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
37208
37190
|
trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);
|
|
37209
37191
|
}
|
|
37210
37192
|
}
|
|
37211
|
-
perfLogger.logStartResolveModule(
|
|
37212
|
-
moduleName
|
|
37213
|
-
/* , containingFile, ModuleResolutionKind[moduleResolution]*/
|
|
37214
|
-
);
|
|
37193
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartResolveModule(moduleName);
|
|
37215
37194
|
switch (moduleResolution) {
|
|
37216
37195
|
case 3 /* Node16 */:
|
|
37217
37196
|
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -37232,8 +37211,8 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
37232
37211
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
37233
37212
|
}
|
|
37234
37213
|
if (result && result.resolvedModule)
|
|
37235
|
-
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
37236
|
-
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
37214
|
+
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
37215
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
37237
37216
|
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
37238
37217
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
37239
37218
|
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
@@ -38884,10 +38863,11 @@ function initFlowNode(node) {
|
|
|
38884
38863
|
}
|
|
38885
38864
|
var binder = /* @__PURE__ */ createBinder();
|
|
38886
38865
|
function bindSourceFile(file, options) {
|
|
38866
|
+
var _a2, _b;
|
|
38887
38867
|
mark("beforeBind");
|
|
38888
|
-
perfLogger.logStartBindFile("" + file.fileName);
|
|
38868
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartBindFile("" + file.fileName);
|
|
38889
38869
|
binder(file, options);
|
|
38890
|
-
perfLogger.logStopBindFile();
|
|
38870
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopBindFile();
|
|
38891
38871
|
mark("afterBind");
|
|
38892
38872
|
measure("Bind", "beforeBind", "afterBind");
|
|
38893
38873
|
}
|
|
@@ -46006,7 +45986,7 @@ function createTypeChecker(host) {
|
|
|
46006
45986
|
/*skipObjectFunctionPropertyAugment*/
|
|
46007
45987
|
true
|
|
46008
45988
|
) || isEsmCjsRef) {
|
|
46009
|
-
const moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
45989
|
+
const moduleType = type.flags & 3670016 /* StructuredType */ ? getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference) : createDefaultPropertyWrapperForModule(symbol, symbol.parent);
|
|
46010
45990
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
46011
45991
|
}
|
|
46012
45992
|
}
|
|
@@ -55741,7 +55721,7 @@ function createTypeChecker(host) {
|
|
|
55741
55721
|
const type = elementTypes[i];
|
|
55742
55722
|
const flags = target.elementFlags[i];
|
|
55743
55723
|
if (flags & 8 /* Variadic */) {
|
|
55744
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
55724
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || everyContainedType(type, isGenericMappedType)) {
|
|
55745
55725
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
55746
55726
|
} else if (isTupleType(type)) {
|
|
55747
55727
|
const elements = getTypeArguments(type);
|
|
@@ -66616,13 +66596,17 @@ function createTypeChecker(host) {
|
|
|
66616
66596
|
type,
|
|
66617
66597
|
(t) => {
|
|
66618
66598
|
var _a2;
|
|
66619
|
-
if (
|
|
66620
|
-
const
|
|
66621
|
-
|
|
66622
|
-
|
|
66623
|
-
|
|
66624
|
-
|
|
66625
|
-
|
|
66599
|
+
if (everyContainedType(t, (t2) => isGenericMappedType(t2) && !t2.declaration.nameType)) {
|
|
66600
|
+
const newTypes = mapDefined(t.flags & 2097152 /* Intersection */ ? t.types : [t], (t2) => {
|
|
66601
|
+
const mappedType = t2;
|
|
66602
|
+
const constraint = getConstraintTypeFromMappedType(mappedType);
|
|
66603
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
66604
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
66605
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
66606
|
+
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
66607
|
+
}
|
|
66608
|
+
});
|
|
66609
|
+
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
66626
66610
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
66627
66611
|
const prop = getPropertyOfType(t, name);
|
|
66628
66612
|
if (prop) {
|
|
@@ -119751,21 +119735,22 @@ function createWatchProgram(host) {
|
|
|
119751
119735
|
updateProgram();
|
|
119752
119736
|
}
|
|
119753
119737
|
function updateProgram() {
|
|
119738
|
+
var _a2, _b, _c, _d;
|
|
119754
119739
|
switch (reloadLevel) {
|
|
119755
119740
|
case 1 /* Partial */:
|
|
119756
|
-
perfLogger.logStartUpdateProgram("PartialConfigReload");
|
|
119741
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartUpdateProgram("PartialConfigReload");
|
|
119757
119742
|
reloadFileNamesFromConfigFile();
|
|
119758
119743
|
break;
|
|
119759
119744
|
case 2 /* Full */:
|
|
119760
|
-
perfLogger.logStartUpdateProgram("FullConfigReload");
|
|
119745
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload");
|
|
119761
119746
|
reloadConfigFile();
|
|
119762
119747
|
break;
|
|
119763
119748
|
default:
|
|
119764
|
-
perfLogger.logStartUpdateProgram("SynchronizeProgram");
|
|
119749
|
+
(_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram");
|
|
119765
119750
|
synchronizeProgram();
|
|
119766
119751
|
break;
|
|
119767
119752
|
}
|
|
119768
|
-
perfLogger.logStopUpdateProgram("Done");
|
|
119753
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done");
|
|
119769
119754
|
return getCurrentBuilderProgram();
|
|
119770
119755
|
}
|
|
119771
119756
|
function reloadFileNamesFromConfigFile() {
|
package/lib/tsserver.js
CHANGED
|
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2285
2285
|
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
|
2287
2287
|
var versionMajorMinor = "5.1";
|
|
2288
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2288
|
+
var version = `${versionMajorMinor}.0-insiders.20230316`;
|
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -5303,28 +5303,6 @@ function tryGetNativePerformanceHooks() {
|
|
|
5303
5303
|
var timestamp = nativePerformance ? () => nativePerformance.now() : Date.now ? Date.now : () => +/* @__PURE__ */ new Date();
|
|
5304
5304
|
|
|
5305
5305
|
// src/compiler/perfLogger.ts
|
|
5306
|
-
var nullLogger = {
|
|
5307
|
-
logEvent: noop,
|
|
5308
|
-
logErrEvent: noop,
|
|
5309
|
-
logPerfEvent: noop,
|
|
5310
|
-
logInfoEvent: noop,
|
|
5311
|
-
logStartCommand: noop,
|
|
5312
|
-
logStopCommand: noop,
|
|
5313
|
-
logStartUpdateProgram: noop,
|
|
5314
|
-
logStopUpdateProgram: noop,
|
|
5315
|
-
logStartUpdateGraph: noop,
|
|
5316
|
-
logStopUpdateGraph: noop,
|
|
5317
|
-
logStartResolveModule: noop,
|
|
5318
|
-
logStopResolveModule: noop,
|
|
5319
|
-
logStartParseSourceFile: noop,
|
|
5320
|
-
logStopParseSourceFile: noop,
|
|
5321
|
-
logStartReadFile: noop,
|
|
5322
|
-
logStopReadFile: noop,
|
|
5323
|
-
logStartBindFile: noop,
|
|
5324
|
-
logStopBindFile: noop,
|
|
5325
|
-
logStartScheduledOperation: noop,
|
|
5326
|
-
logStopScheduledOperation: noop
|
|
5327
|
-
};
|
|
5328
5306
|
var etwModule;
|
|
5329
5307
|
var _a;
|
|
5330
5308
|
try {
|
|
@@ -5333,7 +5311,7 @@ try {
|
|
|
5333
5311
|
} catch (e) {
|
|
5334
5312
|
etwModule = void 0;
|
|
5335
5313
|
}
|
|
5336
|
-
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule :
|
|
5314
|
+
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0;
|
|
5337
5315
|
|
|
5338
5316
|
// src/compiler/_namespaces/ts.performance.ts
|
|
5339
5317
|
var ts_performance_exports = {};
|
|
@@ -8614,13 +8592,15 @@ var sys = (() => {
|
|
|
8614
8592
|
return buffer.toString("utf8");
|
|
8615
8593
|
}
|
|
8616
8594
|
function readFile(fileName, _encoding) {
|
|
8617
|
-
|
|
8595
|
+
var _a2, _b;
|
|
8596
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartReadFile(fileName);
|
|
8618
8597
|
const file = readFileWorker(fileName, _encoding);
|
|
8619
|
-
perfLogger.logStopReadFile();
|
|
8598
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopReadFile();
|
|
8620
8599
|
return file;
|
|
8621
8600
|
}
|
|
8622
8601
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
8623
|
-
|
|
8602
|
+
var _a2;
|
|
8603
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("WriteFile: " + fileName);
|
|
8624
8604
|
if (writeByteOrderMark) {
|
|
8625
8605
|
data = byteOrderMarkIndicator + data;
|
|
8626
8606
|
}
|
|
@@ -8641,7 +8621,8 @@ var sys = (() => {
|
|
|
8641
8621
|
}
|
|
8642
8622
|
}
|
|
8643
8623
|
function getAccessibleFileSystemEntries(path) {
|
|
8644
|
-
|
|
8624
|
+
var _a2;
|
|
8625
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("ReadDir: " + (path || "."));
|
|
8645
8626
|
try {
|
|
8646
8627
|
const entries = _fs.readdirSync(path || ".", { withFileTypes: true });
|
|
8647
8628
|
const files = [];
|
|
@@ -30259,7 +30240,7 @@ function setExternalModuleIndicator(sourceFile) {
|
|
|
30259
30240
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
30260
30241
|
}
|
|
30261
30242
|
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
30262
|
-
var _a2, _b;
|
|
30243
|
+
var _a2, _b, _c, _d;
|
|
30263
30244
|
(_a2 = tracing) == null ? void 0 : _a2.push(
|
|
30264
30245
|
tracing.Phase.Parse,
|
|
30265
30246
|
"createSourceFile",
|
|
@@ -30269,7 +30250,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
30269
30250
|
);
|
|
30270
30251
|
mark("beforeParse");
|
|
30271
30252
|
let result;
|
|
30272
|
-
perfLogger.logStartParseSourceFile(fileName);
|
|
30253
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartParseSourceFile(fileName);
|
|
30273
30254
|
const {
|
|
30274
30255
|
languageVersion,
|
|
30275
30256
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
@@ -30302,10 +30283,10 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
30302
30283
|
setIndicator
|
|
30303
30284
|
);
|
|
30304
30285
|
}
|
|
30305
|
-
perfLogger.logStopParseSourceFile();
|
|
30286
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
30306
30287
|
mark("afterParse");
|
|
30307
30288
|
measure("Parse", "beforeParse", "afterParse");
|
|
30308
|
-
(
|
|
30289
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
30309
30290
|
return result;
|
|
30310
30291
|
}
|
|
30311
30292
|
function parseIsolatedEntityName(text, languageVersion) {
|
|
@@ -41596,6 +41577,7 @@ function resolveModuleNameFromCache(moduleName, containingFile, cache, mode) {
|
|
|
41596
41577
|
);
|
|
41597
41578
|
}
|
|
41598
41579
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
41580
|
+
var _a2, _b, _c;
|
|
41599
41581
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
41600
41582
|
if (redirectedReference) {
|
|
41601
41583
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -41637,10 +41619,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
41637
41619
|
trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);
|
|
41638
41620
|
}
|
|
41639
41621
|
}
|
|
41640
|
-
perfLogger.logStartResolveModule(
|
|
41641
|
-
moduleName
|
|
41642
|
-
/* , containingFile, ModuleResolutionKind[moduleResolution]*/
|
|
41643
|
-
);
|
|
41622
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartResolveModule(moduleName);
|
|
41644
41623
|
switch (moduleResolution) {
|
|
41645
41624
|
case 3 /* Node16 */:
|
|
41646
41625
|
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -41661,8 +41640,8 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
41661
41640
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
41662
41641
|
}
|
|
41663
41642
|
if (result && result.resolvedModule)
|
|
41664
|
-
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
41665
|
-
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
41643
|
+
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
41644
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
41666
41645
|
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
41667
41646
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
41668
41647
|
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
@@ -43433,10 +43412,11 @@ function initFlowNode(node) {
|
|
|
43433
43412
|
}
|
|
43434
43413
|
var binder = /* @__PURE__ */ createBinder();
|
|
43435
43414
|
function bindSourceFile(file, options) {
|
|
43415
|
+
var _a2, _b;
|
|
43436
43416
|
mark("beforeBind");
|
|
43437
|
-
perfLogger.logStartBindFile("" + file.fileName);
|
|
43417
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartBindFile("" + file.fileName);
|
|
43438
43418
|
binder(file, options);
|
|
43439
|
-
perfLogger.logStopBindFile();
|
|
43419
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopBindFile();
|
|
43440
43420
|
mark("afterBind");
|
|
43441
43421
|
measure("Bind", "beforeBind", "afterBind");
|
|
43442
43422
|
}
|
|
@@ -50603,7 +50583,7 @@ function createTypeChecker(host) {
|
|
|
50603
50583
|
/*skipObjectFunctionPropertyAugment*/
|
|
50604
50584
|
true
|
|
50605
50585
|
) || isEsmCjsRef) {
|
|
50606
|
-
const moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
50586
|
+
const moduleType = type.flags & 3670016 /* StructuredType */ ? getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference) : createDefaultPropertyWrapperForModule(symbol, symbol.parent);
|
|
50607
50587
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
50608
50588
|
}
|
|
50609
50589
|
}
|
|
@@ -60338,7 +60318,7 @@ function createTypeChecker(host) {
|
|
|
60338
60318
|
const type = elementTypes[i];
|
|
60339
60319
|
const flags = target.elementFlags[i];
|
|
60340
60320
|
if (flags & 8 /* Variadic */) {
|
|
60341
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
60321
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || everyContainedType(type, isGenericMappedType)) {
|
|
60342
60322
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
60343
60323
|
} else if (isTupleType(type)) {
|
|
60344
60324
|
const elements = getTypeArguments(type);
|
|
@@ -71213,13 +71193,17 @@ function createTypeChecker(host) {
|
|
|
71213
71193
|
type,
|
|
71214
71194
|
(t) => {
|
|
71215
71195
|
var _a2;
|
|
71216
|
-
if (
|
|
71217
|
-
const
|
|
71218
|
-
|
|
71219
|
-
|
|
71220
|
-
|
|
71221
|
-
|
|
71222
|
-
|
|
71196
|
+
if (everyContainedType(t, (t2) => isGenericMappedType(t2) && !t2.declaration.nameType)) {
|
|
71197
|
+
const newTypes = mapDefined(t.flags & 2097152 /* Intersection */ ? t.types : [t], (t2) => {
|
|
71198
|
+
const mappedType = t2;
|
|
71199
|
+
const constraint = getConstraintTypeFromMappedType(mappedType);
|
|
71200
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71201
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
71202
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
71203
|
+
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
71204
|
+
}
|
|
71205
|
+
});
|
|
71206
|
+
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
71223
71207
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
71224
71208
|
const prop = getPropertyOfType(t, name);
|
|
71225
71209
|
if (prop) {
|
|
@@ -124641,21 +124625,22 @@ function createWatchProgram(host) {
|
|
|
124641
124625
|
updateProgram();
|
|
124642
124626
|
}
|
|
124643
124627
|
function updateProgram() {
|
|
124628
|
+
var _a2, _b, _c, _d;
|
|
124644
124629
|
switch (reloadLevel) {
|
|
124645
124630
|
case 1 /* Partial */:
|
|
124646
|
-
perfLogger.logStartUpdateProgram("PartialConfigReload");
|
|
124631
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartUpdateProgram("PartialConfigReload");
|
|
124647
124632
|
reloadFileNamesFromConfigFile();
|
|
124648
124633
|
break;
|
|
124649
124634
|
case 2 /* Full */:
|
|
124650
|
-
perfLogger.logStartUpdateProgram("FullConfigReload");
|
|
124635
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload");
|
|
124651
124636
|
reloadConfigFile();
|
|
124652
124637
|
break;
|
|
124653
124638
|
default:
|
|
124654
|
-
perfLogger.logStartUpdateProgram("SynchronizeProgram");
|
|
124639
|
+
(_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram");
|
|
124655
124640
|
synchronizeProgram();
|
|
124656
124641
|
break;
|
|
124657
124642
|
}
|
|
124658
|
-
perfLogger.logStopUpdateProgram("Done");
|
|
124643
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done");
|
|
124659
124644
|
return getCurrentBuilderProgram();
|
|
124660
124645
|
}
|
|
124661
124646
|
function reloadFileNamesFromConfigFile() {
|
|
@@ -170641,13 +170626,14 @@ var ThrottledOperations = class {
|
|
|
170641
170626
|
return this.pendingTimeouts.delete(operationId);
|
|
170642
170627
|
}
|
|
170643
170628
|
static run(self, operationId, cb) {
|
|
170644
|
-
|
|
170629
|
+
var _a2, _b;
|
|
170630
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation(operationId);
|
|
170645
170631
|
self.pendingTimeouts.delete(operationId);
|
|
170646
170632
|
if (self.logger) {
|
|
170647
170633
|
self.logger.info(`Running: ${operationId}`);
|
|
170648
170634
|
}
|
|
170649
170635
|
cb();
|
|
170650
|
-
perfLogger.logStopScheduledOperation();
|
|
170636
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
|
|
170651
170637
|
}
|
|
170652
170638
|
};
|
|
170653
170639
|
var GcTimer = class {
|
|
@@ -170663,8 +170649,9 @@ var GcTimer = class {
|
|
|
170663
170649
|
this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
|
|
170664
170650
|
}
|
|
170665
170651
|
static run(self) {
|
|
170652
|
+
var _a2, _b;
|
|
170666
170653
|
self.timerId = void 0;
|
|
170667
|
-
perfLogger.logStartScheduledOperation("GC collect");
|
|
170654
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation("GC collect");
|
|
170668
170655
|
const log = self.logger.hasLevel(2 /* requestTime */);
|
|
170669
170656
|
const before = log && self.host.getMemoryUsage();
|
|
170670
170657
|
self.host.gc();
|
|
@@ -170672,7 +170659,7 @@ var GcTimer = class {
|
|
|
170672
170659
|
const after = self.host.getMemoryUsage();
|
|
170673
170660
|
self.logger.perftrc(`GC::before ${before}, after ${after}`);
|
|
170674
170661
|
}
|
|
170675
|
-
perfLogger.logStopScheduledOperation();
|
|
170662
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
|
|
170676
170663
|
}
|
|
170677
170664
|
};
|
|
170678
170665
|
function getBaseConfigFileName(configFilePath) {
|
|
@@ -172377,9 +172364,9 @@ var Project3 = class {
|
|
|
172377
172364
|
* @returns: true if set of files in the project stays the same and false - otherwise.
|
|
172378
172365
|
*/
|
|
172379
172366
|
updateGraph() {
|
|
172380
|
-
var _a2, _b, _c;
|
|
172367
|
+
var _a2, _b, _c, _d, _e;
|
|
172381
172368
|
(_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] });
|
|
172382
|
-
perfLogger.logStartUpdateGraph();
|
|
172369
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateGraph();
|
|
172383
172370
|
this.resolutionCache.startRecordingFilesWithChangedResolutions();
|
|
172384
172371
|
const hasNewProgram = this.updateGraphWorker();
|
|
172385
172372
|
const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles;
|
|
@@ -172404,13 +172391,13 @@ var Project3 = class {
|
|
|
172404
172391
|
if (hasAddedorRemovedFiles) {
|
|
172405
172392
|
if (!this.autoImportProviderHost)
|
|
172406
172393
|
this.autoImportProviderHost = void 0;
|
|
172407
|
-
(
|
|
172394
|
+
(_c = this.autoImportProviderHost) == null ? void 0 : _c.markAsDirty();
|
|
172408
172395
|
}
|
|
172409
172396
|
if (isFirstProgramLoad) {
|
|
172410
172397
|
this.getPackageJsonAutoImportProvider();
|
|
172411
172398
|
}
|
|
172412
|
-
perfLogger.logStopUpdateGraph();
|
|
172413
|
-
(
|
|
172399
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateGraph();
|
|
172400
|
+
(_e = tracing) == null ? void 0 : _e.pop();
|
|
172414
172401
|
return !hasNewProgram;
|
|
172415
172402
|
}
|
|
172416
172403
|
/** @internal */
|
|
@@ -178528,8 +178515,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
178528
178515
|
this.writeMessage(msg);
|
|
178529
178516
|
}
|
|
178530
178517
|
writeMessage(msg) {
|
|
178518
|
+
var _a2;
|
|
178531
178519
|
const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine);
|
|
178532
|
-
perfLogger.logEvent(`Response message size: ${msgText.length}`);
|
|
178520
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent(`Response message size: ${msgText.length}`);
|
|
178533
178521
|
this.host.write(msgText);
|
|
178534
178522
|
}
|
|
178535
178523
|
event(body, eventName) {
|
|
@@ -180297,7 +180285,7 @@ ${e.message}`;
|
|
|
180297
180285
|
}
|
|
180298
180286
|
}
|
|
180299
180287
|
onMessage(message) {
|
|
180300
|
-
var _a2, _b, _c, _d, _e, _f, _g;
|
|
180288
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
180301
180289
|
this.gcTimer.scheduleCollect();
|
|
180302
180290
|
this.performanceData = void 0;
|
|
180303
180291
|
let start2;
|
|
@@ -180313,8 +180301,8 @@ ${e.message}`;
|
|
|
180313
180301
|
request = this.parseMessage(message);
|
|
180314
180302
|
relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0;
|
|
180315
180303
|
(_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.Session, "request", { seq: request.seq, command: request.command });
|
|
180316
|
-
perfLogger.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100));
|
|
180317
|
-
(
|
|
180304
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100));
|
|
180305
|
+
(_c = tracing) == null ? void 0 : _c.push(
|
|
180318
180306
|
tracing.Phase.Session,
|
|
180319
180307
|
"executeCommand",
|
|
180320
180308
|
{ seq: request.seq, command: request.command },
|
|
@@ -180322,7 +180310,7 @@ ${e.message}`;
|
|
|
180322
180310
|
true
|
|
180323
180311
|
);
|
|
180324
180312
|
const { response, responseRequired } = this.executeCommand(request);
|
|
180325
|
-
(
|
|
180313
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
180326
180314
|
if (this.logger.hasLevel(2 /* requestTime */)) {
|
|
180327
180315
|
const elapsedTime = hrTimeToMilliseconds(this.hrtime(start2)).toFixed(4);
|
|
180328
180316
|
if (responseRequired) {
|
|
@@ -180331,8 +180319,8 @@ ${e.message}`;
|
|
|
180331
180319
|
this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`);
|
|
180332
180320
|
}
|
|
180333
180321
|
}
|
|
180334
|
-
perfLogger.logStopCommand("" + request.command, "Success");
|
|
180335
|
-
(
|
|
180322
|
+
(_e = perfLogger) == null ? void 0 : _e.logStopCommand("" + request.command, "Success");
|
|
180323
|
+
(_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq: request.seq, command: request.command, success: !!response });
|
|
180336
180324
|
if (response) {
|
|
180337
180325
|
this.doOutput(
|
|
180338
180326
|
response,
|
|
@@ -180353,10 +180341,10 @@ ${e.message}`;
|
|
|
180353
180341
|
);
|
|
180354
180342
|
}
|
|
180355
180343
|
} catch (err) {
|
|
180356
|
-
(
|
|
180344
|
+
(_g = tracing) == null ? void 0 : _g.popAll();
|
|
180357
180345
|
if (err instanceof OperationCanceledException) {
|
|
180358
|
-
perfLogger.logStopCommand("" + (request && request.command), "Canceled: " + err);
|
|
180359
|
-
(
|
|
180346
|
+
(_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (request && request.command), "Canceled: " + err);
|
|
180347
|
+
(_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command });
|
|
180360
180348
|
this.doOutput(
|
|
180361
180349
|
{ canceled: true },
|
|
180362
180350
|
request.command,
|
|
@@ -180367,8 +180355,8 @@ ${e.message}`;
|
|
|
180367
180355
|
return;
|
|
180368
180356
|
}
|
|
180369
180357
|
this.logErrorWorker(err, this.toStringMessage(message), relevantFile);
|
|
180370
|
-
perfLogger.logStopCommand("" + (request && request.command), "Error: " + err);
|
|
180371
|
-
(
|
|
180358
|
+
(_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (request && request.command), "Error: " + err);
|
|
180359
|
+
(_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message });
|
|
180372
180360
|
this.doOutput(
|
|
180373
180361
|
/*info*/
|
|
180374
180362
|
void 0,
|
|
@@ -181369,15 +181357,16 @@ function initializeNodeSystem() {
|
|
|
181369
181357
|
return this.loggingEnabled() && this.level >= level;
|
|
181370
181358
|
}
|
|
181371
181359
|
msg(s, type = "Err" /* Err */) {
|
|
181360
|
+
var _a2, _b, _c;
|
|
181372
181361
|
switch (type) {
|
|
181373
181362
|
case "Info" /* Info */:
|
|
181374
|
-
perfLogger.logInfoEvent(s);
|
|
181363
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logInfoEvent(s);
|
|
181375
181364
|
break;
|
|
181376
181365
|
case "Perf" /* Perf */:
|
|
181377
|
-
perfLogger.logPerfEvent(s);
|
|
181366
|
+
(_b = perfLogger) == null ? void 0 : _b.logPerfEvent(s);
|
|
181378
181367
|
break;
|
|
181379
181368
|
default:
|
|
181380
|
-
perfLogger.logErrEvent(s);
|
|
181369
|
+
(_c = perfLogger) == null ? void 0 : _c.logErrEvent(s);
|
|
181381
181370
|
break;
|
|
181382
181371
|
}
|
|
181383
181372
|
if (!this.canWrite())
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230316`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3081,40 +3081,17 @@ ${lanes.join("\n")}
|
|
|
3081
3081
|
});
|
|
3082
3082
|
|
|
3083
3083
|
// src/compiler/perfLogger.ts
|
|
3084
|
-
var
|
|
3084
|
+
var etwModule, _a, perfLogger;
|
|
3085
3085
|
var init_perfLogger = __esm({
|
|
3086
3086
|
"src/compiler/perfLogger.ts"() {
|
|
3087
3087
|
"use strict";
|
|
3088
|
-
init_ts2();
|
|
3089
|
-
nullLogger = {
|
|
3090
|
-
logEvent: noop,
|
|
3091
|
-
logErrEvent: noop,
|
|
3092
|
-
logPerfEvent: noop,
|
|
3093
|
-
logInfoEvent: noop,
|
|
3094
|
-
logStartCommand: noop,
|
|
3095
|
-
logStopCommand: noop,
|
|
3096
|
-
logStartUpdateProgram: noop,
|
|
3097
|
-
logStopUpdateProgram: noop,
|
|
3098
|
-
logStartUpdateGraph: noop,
|
|
3099
|
-
logStopUpdateGraph: noop,
|
|
3100
|
-
logStartResolveModule: noop,
|
|
3101
|
-
logStopResolveModule: noop,
|
|
3102
|
-
logStartParseSourceFile: noop,
|
|
3103
|
-
logStopParseSourceFile: noop,
|
|
3104
|
-
logStartReadFile: noop,
|
|
3105
|
-
logStopReadFile: noop,
|
|
3106
|
-
logStartBindFile: noop,
|
|
3107
|
-
logStopBindFile: noop,
|
|
3108
|
-
logStartScheduledOperation: noop,
|
|
3109
|
-
logStopScheduledOperation: noop
|
|
3110
|
-
};
|
|
3111
3088
|
try {
|
|
3112
3089
|
const etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) != null ? _a : "./node_modules/@microsoft/typescript-etw";
|
|
3113
3090
|
etwModule = require(etwModulePath);
|
|
3114
3091
|
} catch (e) {
|
|
3115
3092
|
etwModule = void 0;
|
|
3116
3093
|
}
|
|
3117
|
-
perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule :
|
|
3094
|
+
perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0;
|
|
3118
3095
|
}
|
|
3119
3096
|
});
|
|
3120
3097
|
|
|
@@ -6428,13 +6405,15 @@ ${lanes.join("\n")}
|
|
|
6428
6405
|
return buffer.toString("utf8");
|
|
6429
6406
|
}
|
|
6430
6407
|
function readFile(fileName, _encoding) {
|
|
6431
|
-
|
|
6408
|
+
var _a2, _b;
|
|
6409
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartReadFile(fileName);
|
|
6432
6410
|
const file = readFileWorker(fileName, _encoding);
|
|
6433
|
-
perfLogger.logStopReadFile();
|
|
6411
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopReadFile();
|
|
6434
6412
|
return file;
|
|
6435
6413
|
}
|
|
6436
6414
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
6437
|
-
|
|
6415
|
+
var _a2;
|
|
6416
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("WriteFile: " + fileName);
|
|
6438
6417
|
if (writeByteOrderMark) {
|
|
6439
6418
|
data = byteOrderMarkIndicator + data;
|
|
6440
6419
|
}
|
|
@@ -6455,7 +6434,8 @@ ${lanes.join("\n")}
|
|
|
6455
6434
|
}
|
|
6456
6435
|
}
|
|
6457
6436
|
function getAccessibleFileSystemEntries(path) {
|
|
6458
|
-
|
|
6437
|
+
var _a2;
|
|
6438
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("ReadDir: " + (path || "."));
|
|
6459
6439
|
try {
|
|
6460
6440
|
const entries = _fs.readdirSync(path || ".", { withFileTypes: true });
|
|
6461
6441
|
const files = [];
|
|
@@ -27727,7 +27707,7 @@ ${lanes.join("\n")}
|
|
|
27727
27707
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
27728
27708
|
}
|
|
27729
27709
|
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
27730
|
-
var _a2, _b;
|
|
27710
|
+
var _a2, _b, _c, _d;
|
|
27731
27711
|
(_a2 = tracing) == null ? void 0 : _a2.push(
|
|
27732
27712
|
tracing.Phase.Parse,
|
|
27733
27713
|
"createSourceFile",
|
|
@@ -27737,7 +27717,7 @@ ${lanes.join("\n")}
|
|
|
27737
27717
|
);
|
|
27738
27718
|
mark("beforeParse");
|
|
27739
27719
|
let result;
|
|
27740
|
-
perfLogger.logStartParseSourceFile(fileName);
|
|
27720
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartParseSourceFile(fileName);
|
|
27741
27721
|
const {
|
|
27742
27722
|
languageVersion,
|
|
27743
27723
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
@@ -27770,10 +27750,10 @@ ${lanes.join("\n")}
|
|
|
27770
27750
|
setIndicator
|
|
27771
27751
|
);
|
|
27772
27752
|
}
|
|
27773
|
-
perfLogger.logStopParseSourceFile();
|
|
27753
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
27774
27754
|
mark("afterParse");
|
|
27775
27755
|
measure("Parse", "beforeParse", "afterParse");
|
|
27776
|
-
(
|
|
27756
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
27777
27757
|
return result;
|
|
27778
27758
|
}
|
|
27779
27759
|
function parseIsolatedEntityName(text, languageVersion) {
|
|
@@ -39498,6 +39478,7 @@ ${lanes.join("\n")}
|
|
|
39498
39478
|
);
|
|
39499
39479
|
}
|
|
39500
39480
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
39481
|
+
var _a2, _b, _c;
|
|
39501
39482
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
39502
39483
|
if (redirectedReference) {
|
|
39503
39484
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -39539,10 +39520,7 @@ ${lanes.join("\n")}
|
|
|
39539
39520
|
trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);
|
|
39540
39521
|
}
|
|
39541
39522
|
}
|
|
39542
|
-
perfLogger.logStartResolveModule(
|
|
39543
|
-
moduleName
|
|
39544
|
-
/* , containingFile, ModuleResolutionKind[moduleResolution]*/
|
|
39545
|
-
);
|
|
39523
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartResolveModule(moduleName);
|
|
39546
39524
|
switch (moduleResolution) {
|
|
39547
39525
|
case 3 /* Node16 */:
|
|
39548
39526
|
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -39563,8 +39541,8 @@ ${lanes.join("\n")}
|
|
|
39563
39541
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
39564
39542
|
}
|
|
39565
39543
|
if (result && result.resolvedModule)
|
|
39566
|
-
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
39567
|
-
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
39544
|
+
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
39545
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
39568
39546
|
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
39569
39547
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
39570
39548
|
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
@@ -41336,10 +41314,11 @@ ${lanes.join("\n")}
|
|
|
41336
41314
|
return node;
|
|
41337
41315
|
}
|
|
41338
41316
|
function bindSourceFile(file, options) {
|
|
41317
|
+
var _a2, _b;
|
|
41339
41318
|
mark("beforeBind");
|
|
41340
|
-
perfLogger.logStartBindFile("" + file.fileName);
|
|
41319
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartBindFile("" + file.fileName);
|
|
41341
41320
|
binder(file, options);
|
|
41342
|
-
perfLogger.logStopBindFile();
|
|
41321
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopBindFile();
|
|
41343
41322
|
mark("afterBind");
|
|
41344
41323
|
measure("Bind", "beforeBind", "afterBind");
|
|
41345
41324
|
}
|
|
@@ -48414,7 +48393,7 @@ ${lanes.join("\n")}
|
|
|
48414
48393
|
/*skipObjectFunctionPropertyAugment*/
|
|
48415
48394
|
true
|
|
48416
48395
|
) || isEsmCjsRef) {
|
|
48417
|
-
const moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
48396
|
+
const moduleType = type.flags & 3670016 /* StructuredType */ ? getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference) : createDefaultPropertyWrapperForModule(symbol, symbol.parent);
|
|
48418
48397
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
48419
48398
|
}
|
|
48420
48399
|
}
|
|
@@ -58149,7 +58128,7 @@ ${lanes.join("\n")}
|
|
|
58149
58128
|
const type = elementTypes[i];
|
|
58150
58129
|
const flags = target.elementFlags[i];
|
|
58151
58130
|
if (flags & 8 /* Variadic */) {
|
|
58152
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
58131
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || everyContainedType(type, isGenericMappedType)) {
|
|
58153
58132
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
58154
58133
|
} else if (isTupleType(type)) {
|
|
58155
58134
|
const elements = getTypeArguments(type);
|
|
@@ -69024,13 +69003,17 @@ ${lanes.join("\n")}
|
|
|
69024
69003
|
type,
|
|
69025
69004
|
(t) => {
|
|
69026
69005
|
var _a2;
|
|
69027
|
-
if (
|
|
69028
|
-
const
|
|
69029
|
-
|
|
69030
|
-
|
|
69031
|
-
|
|
69032
|
-
|
|
69033
|
-
|
|
69006
|
+
if (everyContainedType(t, (t2) => isGenericMappedType(t2) && !t2.declaration.nameType)) {
|
|
69007
|
+
const newTypes = mapDefined(t.flags & 2097152 /* Intersection */ ? t.types : [t], (t2) => {
|
|
69008
|
+
const mappedType = t2;
|
|
69009
|
+
const constraint = getConstraintTypeFromMappedType(mappedType);
|
|
69010
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69011
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69012
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69013
|
+
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
69014
|
+
}
|
|
69015
|
+
});
|
|
69016
|
+
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
69034
69017
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69035
69018
|
const prop = getPropertyOfType(t, name);
|
|
69036
69019
|
if (prop) {
|
|
@@ -122832,21 +122815,22 @@ ${lanes.join("\n")}
|
|
|
122832
122815
|
updateProgram();
|
|
122833
122816
|
}
|
|
122834
122817
|
function updateProgram() {
|
|
122818
|
+
var _a2, _b, _c, _d;
|
|
122835
122819
|
switch (reloadLevel) {
|
|
122836
122820
|
case 1 /* Partial */:
|
|
122837
|
-
perfLogger.logStartUpdateProgram("PartialConfigReload");
|
|
122821
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartUpdateProgram("PartialConfigReload");
|
|
122838
122822
|
reloadFileNamesFromConfigFile();
|
|
122839
122823
|
break;
|
|
122840
122824
|
case 2 /* Full */:
|
|
122841
|
-
perfLogger.logStartUpdateProgram("FullConfigReload");
|
|
122825
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload");
|
|
122842
122826
|
reloadConfigFile();
|
|
122843
122827
|
break;
|
|
122844
122828
|
default:
|
|
122845
|
-
perfLogger.logStartUpdateProgram("SynchronizeProgram");
|
|
122829
|
+
(_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram");
|
|
122846
122830
|
synchronizeProgram();
|
|
122847
122831
|
break;
|
|
122848
122832
|
}
|
|
122849
|
-
perfLogger.logStopUpdateProgram("Done");
|
|
122833
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done");
|
|
122850
122834
|
return getCurrentBuilderProgram();
|
|
122851
122835
|
}
|
|
122852
122836
|
function reloadFileNamesFromConfigFile() {
|
|
@@ -167965,13 +167949,14 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
167965
167949
|
return this.pendingTimeouts.delete(operationId);
|
|
167966
167950
|
}
|
|
167967
167951
|
static run(self, operationId, cb) {
|
|
167968
|
-
|
|
167952
|
+
var _a2, _b;
|
|
167953
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation(operationId);
|
|
167969
167954
|
self.pendingTimeouts.delete(operationId);
|
|
167970
167955
|
if (self.logger) {
|
|
167971
167956
|
self.logger.info(`Running: ${operationId}`);
|
|
167972
167957
|
}
|
|
167973
167958
|
cb();
|
|
167974
|
-
perfLogger.logStopScheduledOperation();
|
|
167959
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
|
|
167975
167960
|
}
|
|
167976
167961
|
};
|
|
167977
167962
|
GcTimer = class {
|
|
@@ -167987,8 +167972,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
167987
167972
|
this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
|
|
167988
167973
|
}
|
|
167989
167974
|
static run(self) {
|
|
167975
|
+
var _a2, _b;
|
|
167990
167976
|
self.timerId = void 0;
|
|
167991
|
-
perfLogger.logStartScheduledOperation("GC collect");
|
|
167977
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation("GC collect");
|
|
167992
167978
|
const log = self.logger.hasLevel(2 /* requestTime */);
|
|
167993
167979
|
const before = log && self.host.getMemoryUsage();
|
|
167994
167980
|
self.host.gc();
|
|
@@ -167996,7 +167982,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
167996
167982
|
const after = self.host.getMemoryUsage();
|
|
167997
167983
|
self.logger.perftrc(`GC::before ${before}, after ${after}`);
|
|
167998
167984
|
}
|
|
167999
|
-
perfLogger.logStopScheduledOperation();
|
|
167985
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
|
|
168000
167986
|
}
|
|
168001
167987
|
};
|
|
168002
167988
|
indentStr = "\n ";
|
|
@@ -169746,9 +169732,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169746
169732
|
* @returns: true if set of files in the project stays the same and false - otherwise.
|
|
169747
169733
|
*/
|
|
169748
169734
|
updateGraph() {
|
|
169749
|
-
var _a2, _b, _c;
|
|
169735
|
+
var _a2, _b, _c, _d, _e;
|
|
169750
169736
|
(_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] });
|
|
169751
|
-
perfLogger.logStartUpdateGraph();
|
|
169737
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateGraph();
|
|
169752
169738
|
this.resolutionCache.startRecordingFilesWithChangedResolutions();
|
|
169753
169739
|
const hasNewProgram = this.updateGraphWorker();
|
|
169754
169740
|
const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles;
|
|
@@ -169773,13 +169759,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169773
169759
|
if (hasAddedorRemovedFiles) {
|
|
169774
169760
|
if (!this.autoImportProviderHost)
|
|
169775
169761
|
this.autoImportProviderHost = void 0;
|
|
169776
|
-
(
|
|
169762
|
+
(_c = this.autoImportProviderHost) == null ? void 0 : _c.markAsDirty();
|
|
169777
169763
|
}
|
|
169778
169764
|
if (isFirstProgramLoad) {
|
|
169779
169765
|
this.getPackageJsonAutoImportProvider();
|
|
169780
169766
|
}
|
|
169781
|
-
perfLogger.logStopUpdateGraph();
|
|
169782
|
-
(
|
|
169767
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateGraph();
|
|
169768
|
+
(_e = tracing) == null ? void 0 : _e.pop();
|
|
169783
169769
|
return !hasNewProgram;
|
|
169784
169770
|
}
|
|
169785
169771
|
/** @internal */
|
|
@@ -175957,8 +175943,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
175957
175943
|
this.writeMessage(msg);
|
|
175958
175944
|
}
|
|
175959
175945
|
writeMessage(msg) {
|
|
175946
|
+
var _a2;
|
|
175960
175947
|
const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine);
|
|
175961
|
-
perfLogger.logEvent(`Response message size: ${msgText.length}`);
|
|
175948
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent(`Response message size: ${msgText.length}`);
|
|
175962
175949
|
this.host.write(msgText);
|
|
175963
175950
|
}
|
|
175964
175951
|
event(body, eventName) {
|
|
@@ -177726,7 +177713,7 @@ ${e.message}`;
|
|
|
177726
177713
|
}
|
|
177727
177714
|
}
|
|
177728
177715
|
onMessage(message) {
|
|
177729
|
-
var _a2, _b, _c, _d, _e, _f, _g;
|
|
177716
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
177730
177717
|
this.gcTimer.scheduleCollect();
|
|
177731
177718
|
this.performanceData = void 0;
|
|
177732
177719
|
let start;
|
|
@@ -177742,8 +177729,8 @@ ${e.message}`;
|
|
|
177742
177729
|
request = this.parseMessage(message);
|
|
177743
177730
|
relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0;
|
|
177744
177731
|
(_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.Session, "request", { seq: request.seq, command: request.command });
|
|
177745
|
-
perfLogger.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100));
|
|
177746
|
-
(
|
|
177732
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100));
|
|
177733
|
+
(_c = tracing) == null ? void 0 : _c.push(
|
|
177747
177734
|
tracing.Phase.Session,
|
|
177748
177735
|
"executeCommand",
|
|
177749
177736
|
{ seq: request.seq, command: request.command },
|
|
@@ -177751,7 +177738,7 @@ ${e.message}`;
|
|
|
177751
177738
|
true
|
|
177752
177739
|
);
|
|
177753
177740
|
const { response, responseRequired } = this.executeCommand(request);
|
|
177754
|
-
(
|
|
177741
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
177755
177742
|
if (this.logger.hasLevel(2 /* requestTime */)) {
|
|
177756
177743
|
const elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
|
|
177757
177744
|
if (responseRequired) {
|
|
@@ -177760,8 +177747,8 @@ ${e.message}`;
|
|
|
177760
177747
|
this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`);
|
|
177761
177748
|
}
|
|
177762
177749
|
}
|
|
177763
|
-
perfLogger.logStopCommand("" + request.command, "Success");
|
|
177764
|
-
(
|
|
177750
|
+
(_e = perfLogger) == null ? void 0 : _e.logStopCommand("" + request.command, "Success");
|
|
177751
|
+
(_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq: request.seq, command: request.command, success: !!response });
|
|
177765
177752
|
if (response) {
|
|
177766
177753
|
this.doOutput(
|
|
177767
177754
|
response,
|
|
@@ -177782,10 +177769,10 @@ ${e.message}`;
|
|
|
177782
177769
|
);
|
|
177783
177770
|
}
|
|
177784
177771
|
} catch (err) {
|
|
177785
|
-
(
|
|
177772
|
+
(_g = tracing) == null ? void 0 : _g.popAll();
|
|
177786
177773
|
if (err instanceof OperationCanceledException) {
|
|
177787
|
-
perfLogger.logStopCommand("" + (request && request.command), "Canceled: " + err);
|
|
177788
|
-
(
|
|
177774
|
+
(_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (request && request.command), "Canceled: " + err);
|
|
177775
|
+
(_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command });
|
|
177789
177776
|
this.doOutput(
|
|
177790
177777
|
{ canceled: true },
|
|
177791
177778
|
request.command,
|
|
@@ -177796,8 +177783,8 @@ ${e.message}`;
|
|
|
177796
177783
|
return;
|
|
177797
177784
|
}
|
|
177798
177785
|
this.logErrorWorker(err, this.toStringMessage(message), relevantFile);
|
|
177799
|
-
perfLogger.logStopCommand("" + (request && request.command), "Error: " + err);
|
|
177800
|
-
(
|
|
177786
|
+
(_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (request && request.command), "Error: " + err);
|
|
177787
|
+
(_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message });
|
|
177801
177788
|
this.doOutput(
|
|
177802
177789
|
/*info*/
|
|
177803
177790
|
void 0,
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230316`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3081,40 +3081,17 @@ ${lanes.join("\n")}
|
|
|
3081
3081
|
});
|
|
3082
3082
|
|
|
3083
3083
|
// src/compiler/perfLogger.ts
|
|
3084
|
-
var
|
|
3084
|
+
var etwModule, _a, perfLogger;
|
|
3085
3085
|
var init_perfLogger = __esm({
|
|
3086
3086
|
"src/compiler/perfLogger.ts"() {
|
|
3087
3087
|
"use strict";
|
|
3088
|
-
init_ts2();
|
|
3089
|
-
nullLogger = {
|
|
3090
|
-
logEvent: noop,
|
|
3091
|
-
logErrEvent: noop,
|
|
3092
|
-
logPerfEvent: noop,
|
|
3093
|
-
logInfoEvent: noop,
|
|
3094
|
-
logStartCommand: noop,
|
|
3095
|
-
logStopCommand: noop,
|
|
3096
|
-
logStartUpdateProgram: noop,
|
|
3097
|
-
logStopUpdateProgram: noop,
|
|
3098
|
-
logStartUpdateGraph: noop,
|
|
3099
|
-
logStopUpdateGraph: noop,
|
|
3100
|
-
logStartResolveModule: noop,
|
|
3101
|
-
logStopResolveModule: noop,
|
|
3102
|
-
logStartParseSourceFile: noop,
|
|
3103
|
-
logStopParseSourceFile: noop,
|
|
3104
|
-
logStartReadFile: noop,
|
|
3105
|
-
logStopReadFile: noop,
|
|
3106
|
-
logStartBindFile: noop,
|
|
3107
|
-
logStopBindFile: noop,
|
|
3108
|
-
logStartScheduledOperation: noop,
|
|
3109
|
-
logStopScheduledOperation: noop
|
|
3110
|
-
};
|
|
3111
3088
|
try {
|
|
3112
3089
|
const etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) != null ? _a : "./node_modules/@microsoft/typescript-etw";
|
|
3113
3090
|
etwModule = require(etwModulePath);
|
|
3114
3091
|
} catch (e) {
|
|
3115
3092
|
etwModule = void 0;
|
|
3116
3093
|
}
|
|
3117
|
-
perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule :
|
|
3094
|
+
perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0;
|
|
3118
3095
|
}
|
|
3119
3096
|
});
|
|
3120
3097
|
|
|
@@ -6428,13 +6405,15 @@ ${lanes.join("\n")}
|
|
|
6428
6405
|
return buffer.toString("utf8");
|
|
6429
6406
|
}
|
|
6430
6407
|
function readFile(fileName, _encoding) {
|
|
6431
|
-
|
|
6408
|
+
var _a2, _b;
|
|
6409
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartReadFile(fileName);
|
|
6432
6410
|
const file = readFileWorker(fileName, _encoding);
|
|
6433
|
-
perfLogger.logStopReadFile();
|
|
6411
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopReadFile();
|
|
6434
6412
|
return file;
|
|
6435
6413
|
}
|
|
6436
6414
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
6437
|
-
|
|
6415
|
+
var _a2;
|
|
6416
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("WriteFile: " + fileName);
|
|
6438
6417
|
if (writeByteOrderMark) {
|
|
6439
6418
|
data = byteOrderMarkIndicator + data;
|
|
6440
6419
|
}
|
|
@@ -6455,7 +6434,8 @@ ${lanes.join("\n")}
|
|
|
6455
6434
|
}
|
|
6456
6435
|
}
|
|
6457
6436
|
function getAccessibleFileSystemEntries(path) {
|
|
6458
|
-
|
|
6437
|
+
var _a2;
|
|
6438
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("ReadDir: " + (path || "."));
|
|
6459
6439
|
try {
|
|
6460
6440
|
const entries = _fs.readdirSync(path || ".", { withFileTypes: true });
|
|
6461
6441
|
const files = [];
|
|
@@ -27727,7 +27707,7 @@ ${lanes.join("\n")}
|
|
|
27727
27707
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
27728
27708
|
}
|
|
27729
27709
|
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
27730
|
-
var _a2, _b;
|
|
27710
|
+
var _a2, _b, _c, _d;
|
|
27731
27711
|
(_a2 = tracing) == null ? void 0 : _a2.push(
|
|
27732
27712
|
tracing.Phase.Parse,
|
|
27733
27713
|
"createSourceFile",
|
|
@@ -27737,7 +27717,7 @@ ${lanes.join("\n")}
|
|
|
27737
27717
|
);
|
|
27738
27718
|
mark("beforeParse");
|
|
27739
27719
|
let result;
|
|
27740
|
-
perfLogger.logStartParseSourceFile(fileName);
|
|
27720
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartParseSourceFile(fileName);
|
|
27741
27721
|
const {
|
|
27742
27722
|
languageVersion,
|
|
27743
27723
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
@@ -27770,10 +27750,10 @@ ${lanes.join("\n")}
|
|
|
27770
27750
|
setIndicator
|
|
27771
27751
|
);
|
|
27772
27752
|
}
|
|
27773
|
-
perfLogger.logStopParseSourceFile();
|
|
27753
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
27774
27754
|
mark("afterParse");
|
|
27775
27755
|
measure("Parse", "beforeParse", "afterParse");
|
|
27776
|
-
(
|
|
27756
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
27777
27757
|
return result;
|
|
27778
27758
|
}
|
|
27779
27759
|
function parseIsolatedEntityName(text, languageVersion) {
|
|
@@ -39498,6 +39478,7 @@ ${lanes.join("\n")}
|
|
|
39498
39478
|
);
|
|
39499
39479
|
}
|
|
39500
39480
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
39481
|
+
var _a2, _b, _c;
|
|
39501
39482
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
39502
39483
|
if (redirectedReference) {
|
|
39503
39484
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -39539,10 +39520,7 @@ ${lanes.join("\n")}
|
|
|
39539
39520
|
trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);
|
|
39540
39521
|
}
|
|
39541
39522
|
}
|
|
39542
|
-
perfLogger.logStartResolveModule(
|
|
39543
|
-
moduleName
|
|
39544
|
-
/* , containingFile, ModuleResolutionKind[moduleResolution]*/
|
|
39545
|
-
);
|
|
39523
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartResolveModule(moduleName);
|
|
39546
39524
|
switch (moduleResolution) {
|
|
39547
39525
|
case 3 /* Node16 */:
|
|
39548
39526
|
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -39563,8 +39541,8 @@ ${lanes.join("\n")}
|
|
|
39563
39541
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
39564
39542
|
}
|
|
39565
39543
|
if (result && result.resolvedModule)
|
|
39566
|
-
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
39567
|
-
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
39544
|
+
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
39545
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
39568
39546
|
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
39569
39547
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
39570
39548
|
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
@@ -41336,10 +41314,11 @@ ${lanes.join("\n")}
|
|
|
41336
41314
|
return node;
|
|
41337
41315
|
}
|
|
41338
41316
|
function bindSourceFile(file, options) {
|
|
41317
|
+
var _a2, _b;
|
|
41339
41318
|
mark("beforeBind");
|
|
41340
|
-
perfLogger.logStartBindFile("" + file.fileName);
|
|
41319
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartBindFile("" + file.fileName);
|
|
41341
41320
|
binder(file, options);
|
|
41342
|
-
perfLogger.logStopBindFile();
|
|
41321
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopBindFile();
|
|
41343
41322
|
mark("afterBind");
|
|
41344
41323
|
measure("Bind", "beforeBind", "afterBind");
|
|
41345
41324
|
}
|
|
@@ -48414,7 +48393,7 @@ ${lanes.join("\n")}
|
|
|
48414
48393
|
/*skipObjectFunctionPropertyAugment*/
|
|
48415
48394
|
true
|
|
48416
48395
|
) || isEsmCjsRef) {
|
|
48417
|
-
const moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
48396
|
+
const moduleType = type.flags & 3670016 /* StructuredType */ ? getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference) : createDefaultPropertyWrapperForModule(symbol, symbol.parent);
|
|
48418
48397
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
48419
48398
|
}
|
|
48420
48399
|
}
|
|
@@ -58149,7 +58128,7 @@ ${lanes.join("\n")}
|
|
|
58149
58128
|
const type = elementTypes[i];
|
|
58150
58129
|
const flags = target.elementFlags[i];
|
|
58151
58130
|
if (flags & 8 /* Variadic */) {
|
|
58152
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
58131
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || everyContainedType(type, isGenericMappedType)) {
|
|
58153
58132
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
58154
58133
|
} else if (isTupleType(type)) {
|
|
58155
58134
|
const elements = getTypeArguments(type);
|
|
@@ -69024,13 +69003,17 @@ ${lanes.join("\n")}
|
|
|
69024
69003
|
type,
|
|
69025
69004
|
(t) => {
|
|
69026
69005
|
var _a2;
|
|
69027
|
-
if (
|
|
69028
|
-
const
|
|
69029
|
-
|
|
69030
|
-
|
|
69031
|
-
|
|
69032
|
-
|
|
69033
|
-
|
|
69006
|
+
if (everyContainedType(t, (t2) => isGenericMappedType(t2) && !t2.declaration.nameType)) {
|
|
69007
|
+
const newTypes = mapDefined(t.flags & 2097152 /* Intersection */ ? t.types : [t], (t2) => {
|
|
69008
|
+
const mappedType = t2;
|
|
69009
|
+
const constraint = getConstraintTypeFromMappedType(mappedType);
|
|
69010
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69011
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69012
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69013
|
+
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
69014
|
+
}
|
|
69015
|
+
});
|
|
69016
|
+
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
69034
69017
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69035
69018
|
const prop = getPropertyOfType(t, name);
|
|
69036
69019
|
if (prop) {
|
|
@@ -122832,21 +122815,22 @@ ${lanes.join("\n")}
|
|
|
122832
122815
|
updateProgram();
|
|
122833
122816
|
}
|
|
122834
122817
|
function updateProgram() {
|
|
122818
|
+
var _a2, _b, _c, _d;
|
|
122835
122819
|
switch (reloadLevel) {
|
|
122836
122820
|
case 1 /* Partial */:
|
|
122837
|
-
perfLogger.logStartUpdateProgram("PartialConfigReload");
|
|
122821
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartUpdateProgram("PartialConfigReload");
|
|
122838
122822
|
reloadFileNamesFromConfigFile();
|
|
122839
122823
|
break;
|
|
122840
122824
|
case 2 /* Full */:
|
|
122841
|
-
perfLogger.logStartUpdateProgram("FullConfigReload");
|
|
122825
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload");
|
|
122842
122826
|
reloadConfigFile();
|
|
122843
122827
|
break;
|
|
122844
122828
|
default:
|
|
122845
|
-
perfLogger.logStartUpdateProgram("SynchronizeProgram");
|
|
122829
|
+
(_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram");
|
|
122846
122830
|
synchronizeProgram();
|
|
122847
122831
|
break;
|
|
122848
122832
|
}
|
|
122849
|
-
perfLogger.logStopUpdateProgram("Done");
|
|
122833
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done");
|
|
122850
122834
|
return getCurrentBuilderProgram();
|
|
122851
122835
|
}
|
|
122852
122836
|
function reloadFileNamesFromConfigFile() {
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230316`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2177,28 +2177,6 @@ var nativePerformance = nativePerformanceHooks == null ? void 0 : nativePerforma
|
|
|
2177
2177
|
var timestamp = nativePerformance ? () => nativePerformance.now() : Date.now ? Date.now : () => +/* @__PURE__ */ new Date();
|
|
2178
2178
|
|
|
2179
2179
|
// src/compiler/perfLogger.ts
|
|
2180
|
-
var nullLogger = {
|
|
2181
|
-
logEvent: noop,
|
|
2182
|
-
logErrEvent: noop,
|
|
2183
|
-
logPerfEvent: noop,
|
|
2184
|
-
logInfoEvent: noop,
|
|
2185
|
-
logStartCommand: noop,
|
|
2186
|
-
logStopCommand: noop,
|
|
2187
|
-
logStartUpdateProgram: noop,
|
|
2188
|
-
logStopUpdateProgram: noop,
|
|
2189
|
-
logStartUpdateGraph: noop,
|
|
2190
|
-
logStopUpdateGraph: noop,
|
|
2191
|
-
logStartResolveModule: noop,
|
|
2192
|
-
logStopResolveModule: noop,
|
|
2193
|
-
logStartParseSourceFile: noop,
|
|
2194
|
-
logStopParseSourceFile: noop,
|
|
2195
|
-
logStartReadFile: noop,
|
|
2196
|
-
logStopReadFile: noop,
|
|
2197
|
-
logStartBindFile: noop,
|
|
2198
|
-
logStopBindFile: noop,
|
|
2199
|
-
logStartScheduledOperation: noop,
|
|
2200
|
-
logStopScheduledOperation: noop
|
|
2201
|
-
};
|
|
2202
2180
|
var etwModule;
|
|
2203
2181
|
var _a;
|
|
2204
2182
|
try {
|
|
@@ -2207,7 +2185,7 @@ try {
|
|
|
2207
2185
|
} catch (e) {
|
|
2208
2186
|
etwModule = void 0;
|
|
2209
2187
|
}
|
|
2210
|
-
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule :
|
|
2188
|
+
var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0;
|
|
2211
2189
|
|
|
2212
2190
|
// src/compiler/performance.ts
|
|
2213
2191
|
var performanceImpl;
|
|
@@ -4556,13 +4534,15 @@ var sys = (() => {
|
|
|
4556
4534
|
return buffer.toString("utf8");
|
|
4557
4535
|
}
|
|
4558
4536
|
function readFile(fileName, _encoding) {
|
|
4559
|
-
|
|
4537
|
+
var _a2, _b;
|
|
4538
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartReadFile(fileName);
|
|
4560
4539
|
const file = readFileWorker(fileName, _encoding);
|
|
4561
|
-
perfLogger.logStopReadFile();
|
|
4540
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopReadFile();
|
|
4562
4541
|
return file;
|
|
4563
4542
|
}
|
|
4564
4543
|
function writeFile2(fileName, data, writeByteOrderMark) {
|
|
4565
|
-
|
|
4544
|
+
var _a2;
|
|
4545
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("WriteFile: " + fileName);
|
|
4566
4546
|
if (writeByteOrderMark) {
|
|
4567
4547
|
data = byteOrderMarkIndicator + data;
|
|
4568
4548
|
}
|
|
@@ -4583,7 +4563,8 @@ var sys = (() => {
|
|
|
4583
4563
|
}
|
|
4584
4564
|
}
|
|
4585
4565
|
function getAccessibleFileSystemEntries(path2) {
|
|
4586
|
-
|
|
4566
|
+
var _a2;
|
|
4567
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent("ReadDir: " + (path2 || "."));
|
|
4587
4568
|
try {
|
|
4588
4569
|
const entries = _fs.readdirSync(path2 || ".", { withFileTypes: true });
|
|
4589
4570
|
const files = [];
|
|
@@ -27361,6 +27342,7 @@ function getConditions(options, esmMode) {
|
|
|
27361
27342
|
return concatenate(conditions, options.customConditions);
|
|
27362
27343
|
}
|
|
27363
27344
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27345
|
+
var _a2, _b, _c;
|
|
27364
27346
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
27365
27347
|
if (redirectedReference) {
|
|
27366
27348
|
compilerOptions = redirectedReference.commandLine.options;
|
|
@@ -27402,10 +27384,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27402
27384
|
trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]);
|
|
27403
27385
|
}
|
|
27404
27386
|
}
|
|
27405
|
-
perfLogger.logStartResolveModule(
|
|
27406
|
-
moduleName
|
|
27407
|
-
/* , containingFile, ModuleResolutionKind[moduleResolution]*/
|
|
27408
|
-
);
|
|
27387
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartResolveModule(moduleName);
|
|
27409
27388
|
switch (moduleResolution) {
|
|
27410
27389
|
case 3 /* Node16 */:
|
|
27411
27390
|
result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
@@ -27426,8 +27405,8 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27426
27405
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
27427
27406
|
}
|
|
27428
27407
|
if (result && result.resolvedModule)
|
|
27429
|
-
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
27430
|
-
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
27408
|
+
(_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
27409
|
+
(_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
27431
27410
|
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
27432
27411
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
27433
27412
|
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-52062-4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "14.21.1",
|
|
115
115
|
"npm": "8.19.3"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "fec434c9c2e6e099b6887aa0986abf354b0c05c5"
|
|
118
118
|
}
|