@typescript-deploys/pr-build 5.1.0-pr-52609-5 → 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 +42 -59
- package/lib/tsserver.js +70 -83
- package/lib/tsserverlibrary.js +67 -82
- package/lib/typescript.js +43 -61
- 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) {
|
|
@@ -72195,11 +72179,6 @@ function createTypeChecker(host) {
|
|
|
72195
72179
|
} else {
|
|
72196
72180
|
assignNonContextualParameterTypes(signature);
|
|
72197
72181
|
}
|
|
72198
|
-
} else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) {
|
|
72199
|
-
const inferenceContext = getInferenceContext(node);
|
|
72200
|
-
if (checkMode && checkMode & 2 /* Inferential */) {
|
|
72201
|
-
inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext);
|
|
72202
|
-
}
|
|
72203
72182
|
}
|
|
72204
72183
|
if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) {
|
|
72205
72184
|
const returnType = getReturnTypeFromBody(node, checkMode);
|
|
@@ -91159,8 +91138,11 @@ function transformESDecorators(context) {
|
|
|
91159
91138
|
false,
|
|
91160
91139
|
visitor
|
|
91161
91140
|
);
|
|
91141
|
+
const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart);
|
|
91142
|
+
const indexOfFirstStatementAfterSuper = superStatementIndex >= 0 ? superStatementIndex + 1 : void 0;
|
|
91143
|
+
addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, nonPrologueStart, indexOfFirstStatementAfterSuper ? indexOfFirstStatementAfterSuper - nonPrologueStart : void 0));
|
|
91162
91144
|
addRange(statements, initializerStatements);
|
|
91163
|
-
addRange(statements, visitNodes2(node.body.statements, visitor, isStatement,
|
|
91145
|
+
addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuper));
|
|
91164
91146
|
body = factory2.createBlock(
|
|
91165
91147
|
statements,
|
|
91166
91148
|
/*multiLine*/
|
|
@@ -119753,21 +119735,22 @@ function createWatchProgram(host) {
|
|
|
119753
119735
|
updateProgram();
|
|
119754
119736
|
}
|
|
119755
119737
|
function updateProgram() {
|
|
119738
|
+
var _a2, _b, _c, _d;
|
|
119756
119739
|
switch (reloadLevel) {
|
|
119757
119740
|
case 1 /* Partial */:
|
|
119758
|
-
perfLogger.logStartUpdateProgram("PartialConfigReload");
|
|
119741
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartUpdateProgram("PartialConfigReload");
|
|
119759
119742
|
reloadFileNamesFromConfigFile();
|
|
119760
119743
|
break;
|
|
119761
119744
|
case 2 /* Full */:
|
|
119762
|
-
perfLogger.logStartUpdateProgram("FullConfigReload");
|
|
119745
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload");
|
|
119763
119746
|
reloadConfigFile();
|
|
119764
119747
|
break;
|
|
119765
119748
|
default:
|
|
119766
|
-
perfLogger.logStartUpdateProgram("SynchronizeProgram");
|
|
119749
|
+
(_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram");
|
|
119767
119750
|
synchronizeProgram();
|
|
119768
119751
|
break;
|
|
119769
119752
|
}
|
|
119770
|
-
perfLogger.logStopUpdateProgram("Done");
|
|
119753
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done");
|
|
119771
119754
|
return getCurrentBuilderProgram();
|
|
119772
119755
|
}
|
|
119773
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) {
|
|
@@ -76792,11 +76776,6 @@ function createTypeChecker(host) {
|
|
|
76792
76776
|
} else {
|
|
76793
76777
|
assignNonContextualParameterTypes(signature);
|
|
76794
76778
|
}
|
|
76795
|
-
} else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) {
|
|
76796
|
-
const inferenceContext = getInferenceContext(node);
|
|
76797
|
-
if (checkMode && checkMode & 2 /* Inferential */) {
|
|
76798
|
-
inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext);
|
|
76799
|
-
}
|
|
76800
76779
|
}
|
|
76801
76780
|
if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) {
|
|
76802
76781
|
const returnType = getReturnTypeFromBody(node, checkMode);
|
|
@@ -95927,8 +95906,11 @@ function transformESDecorators(context) {
|
|
|
95927
95906
|
false,
|
|
95928
95907
|
visitor
|
|
95929
95908
|
);
|
|
95909
|
+
const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart);
|
|
95910
|
+
const indexOfFirstStatementAfterSuper = superStatementIndex >= 0 ? superStatementIndex + 1 : void 0;
|
|
95911
|
+
addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, nonPrologueStart, indexOfFirstStatementAfterSuper ? indexOfFirstStatementAfterSuper - nonPrologueStart : void 0));
|
|
95930
95912
|
addRange(statements, initializerStatements);
|
|
95931
|
-
addRange(statements, visitNodes2(node.body.statements, visitor, isStatement,
|
|
95913
|
+
addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuper));
|
|
95932
95914
|
body = factory2.createBlock(
|
|
95933
95915
|
statements,
|
|
95934
95916
|
/*multiLine*/
|
|
@@ -124643,21 +124625,22 @@ function createWatchProgram(host) {
|
|
|
124643
124625
|
updateProgram();
|
|
124644
124626
|
}
|
|
124645
124627
|
function updateProgram() {
|
|
124628
|
+
var _a2, _b, _c, _d;
|
|
124646
124629
|
switch (reloadLevel) {
|
|
124647
124630
|
case 1 /* Partial */:
|
|
124648
|
-
perfLogger.logStartUpdateProgram("PartialConfigReload");
|
|
124631
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartUpdateProgram("PartialConfigReload");
|
|
124649
124632
|
reloadFileNamesFromConfigFile();
|
|
124650
124633
|
break;
|
|
124651
124634
|
case 2 /* Full */:
|
|
124652
|
-
perfLogger.logStartUpdateProgram("FullConfigReload");
|
|
124635
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload");
|
|
124653
124636
|
reloadConfigFile();
|
|
124654
124637
|
break;
|
|
124655
124638
|
default:
|
|
124656
|
-
perfLogger.logStartUpdateProgram("SynchronizeProgram");
|
|
124639
|
+
(_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram");
|
|
124657
124640
|
synchronizeProgram();
|
|
124658
124641
|
break;
|
|
124659
124642
|
}
|
|
124660
|
-
perfLogger.logStopUpdateProgram("Done");
|
|
124643
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done");
|
|
124661
124644
|
return getCurrentBuilderProgram();
|
|
124662
124645
|
}
|
|
124663
124646
|
function reloadFileNamesFromConfigFile() {
|
|
@@ -170643,13 +170626,14 @@ var ThrottledOperations = class {
|
|
|
170643
170626
|
return this.pendingTimeouts.delete(operationId);
|
|
170644
170627
|
}
|
|
170645
170628
|
static run(self, operationId, cb) {
|
|
170646
|
-
|
|
170629
|
+
var _a2, _b;
|
|
170630
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation(operationId);
|
|
170647
170631
|
self.pendingTimeouts.delete(operationId);
|
|
170648
170632
|
if (self.logger) {
|
|
170649
170633
|
self.logger.info(`Running: ${operationId}`);
|
|
170650
170634
|
}
|
|
170651
170635
|
cb();
|
|
170652
|
-
perfLogger.logStopScheduledOperation();
|
|
170636
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
|
|
170653
170637
|
}
|
|
170654
170638
|
};
|
|
170655
170639
|
var GcTimer = class {
|
|
@@ -170665,8 +170649,9 @@ var GcTimer = class {
|
|
|
170665
170649
|
this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
|
|
170666
170650
|
}
|
|
170667
170651
|
static run(self) {
|
|
170652
|
+
var _a2, _b;
|
|
170668
170653
|
self.timerId = void 0;
|
|
170669
|
-
perfLogger.logStartScheduledOperation("GC collect");
|
|
170654
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation("GC collect");
|
|
170670
170655
|
const log = self.logger.hasLevel(2 /* requestTime */);
|
|
170671
170656
|
const before = log && self.host.getMemoryUsage();
|
|
170672
170657
|
self.host.gc();
|
|
@@ -170674,7 +170659,7 @@ var GcTimer = class {
|
|
|
170674
170659
|
const after = self.host.getMemoryUsage();
|
|
170675
170660
|
self.logger.perftrc(`GC::before ${before}, after ${after}`);
|
|
170676
170661
|
}
|
|
170677
|
-
perfLogger.logStopScheduledOperation();
|
|
170662
|
+
(_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
|
|
170678
170663
|
}
|
|
170679
170664
|
};
|
|
170680
170665
|
function getBaseConfigFileName(configFilePath) {
|
|
@@ -172379,9 +172364,9 @@ var Project3 = class {
|
|
|
172379
172364
|
* @returns: true if set of files in the project stays the same and false - otherwise.
|
|
172380
172365
|
*/
|
|
172381
172366
|
updateGraph() {
|
|
172382
|
-
var _a2, _b, _c;
|
|
172367
|
+
var _a2, _b, _c, _d, _e;
|
|
172383
172368
|
(_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] });
|
|
172384
|
-
perfLogger.logStartUpdateGraph();
|
|
172369
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartUpdateGraph();
|
|
172385
172370
|
this.resolutionCache.startRecordingFilesWithChangedResolutions();
|
|
172386
172371
|
const hasNewProgram = this.updateGraphWorker();
|
|
172387
172372
|
const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles;
|
|
@@ -172406,13 +172391,13 @@ var Project3 = class {
|
|
|
172406
172391
|
if (hasAddedorRemovedFiles) {
|
|
172407
172392
|
if (!this.autoImportProviderHost)
|
|
172408
172393
|
this.autoImportProviderHost = void 0;
|
|
172409
|
-
(
|
|
172394
|
+
(_c = this.autoImportProviderHost) == null ? void 0 : _c.markAsDirty();
|
|
172410
172395
|
}
|
|
172411
172396
|
if (isFirstProgramLoad) {
|
|
172412
172397
|
this.getPackageJsonAutoImportProvider();
|
|
172413
172398
|
}
|
|
172414
|
-
perfLogger.logStopUpdateGraph();
|
|
172415
|
-
(
|
|
172399
|
+
(_d = perfLogger) == null ? void 0 : _d.logStopUpdateGraph();
|
|
172400
|
+
(_e = tracing) == null ? void 0 : _e.pop();
|
|
172416
172401
|
return !hasNewProgram;
|
|
172417
172402
|
}
|
|
172418
172403
|
/** @internal */
|
|
@@ -178530,8 +178515,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
178530
178515
|
this.writeMessage(msg);
|
|
178531
178516
|
}
|
|
178532
178517
|
writeMessage(msg) {
|
|
178518
|
+
var _a2;
|
|
178533
178519
|
const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine);
|
|
178534
|
-
perfLogger.logEvent(`Response message size: ${msgText.length}`);
|
|
178520
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logEvent(`Response message size: ${msgText.length}`);
|
|
178535
178521
|
this.host.write(msgText);
|
|
178536
178522
|
}
|
|
178537
178523
|
event(body, eventName) {
|
|
@@ -180299,7 +180285,7 @@ ${e.message}`;
|
|
|
180299
180285
|
}
|
|
180300
180286
|
}
|
|
180301
180287
|
onMessage(message) {
|
|
180302
|
-
var _a2, _b, _c, _d, _e, _f, _g;
|
|
180288
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
180303
180289
|
this.gcTimer.scheduleCollect();
|
|
180304
180290
|
this.performanceData = void 0;
|
|
180305
180291
|
let start2;
|
|
@@ -180315,8 +180301,8 @@ ${e.message}`;
|
|
|
180315
180301
|
request = this.parseMessage(message);
|
|
180316
180302
|
relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0;
|
|
180317
180303
|
(_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.Session, "request", { seq: request.seq, command: request.command });
|
|
180318
|
-
perfLogger.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100));
|
|
180319
|
-
(
|
|
180304
|
+
(_b = perfLogger) == null ? void 0 : _b.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100));
|
|
180305
|
+
(_c = tracing) == null ? void 0 : _c.push(
|
|
180320
180306
|
tracing.Phase.Session,
|
|
180321
180307
|
"executeCommand",
|
|
180322
180308
|
{ seq: request.seq, command: request.command },
|
|
@@ -180324,7 +180310,7 @@ ${e.message}`;
|
|
|
180324
180310
|
true
|
|
180325
180311
|
);
|
|
180326
180312
|
const { response, responseRequired } = this.executeCommand(request);
|
|
180327
|
-
(
|
|
180313
|
+
(_d = tracing) == null ? void 0 : _d.pop();
|
|
180328
180314
|
if (this.logger.hasLevel(2 /* requestTime */)) {
|
|
180329
180315
|
const elapsedTime = hrTimeToMilliseconds(this.hrtime(start2)).toFixed(4);
|
|
180330
180316
|
if (responseRequired) {
|
|
@@ -180333,8 +180319,8 @@ ${e.message}`;
|
|
|
180333
180319
|
this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`);
|
|
180334
180320
|
}
|
|
180335
180321
|
}
|
|
180336
|
-
perfLogger.logStopCommand("" + request.command, "Success");
|
|
180337
|
-
(
|
|
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 });
|
|
180338
180324
|
if (response) {
|
|
180339
180325
|
this.doOutput(
|
|
180340
180326
|
response,
|
|
@@ -180355,10 +180341,10 @@ ${e.message}`;
|
|
|
180355
180341
|
);
|
|
180356
180342
|
}
|
|
180357
180343
|
} catch (err) {
|
|
180358
|
-
(
|
|
180344
|
+
(_g = tracing) == null ? void 0 : _g.popAll();
|
|
180359
180345
|
if (err instanceof OperationCanceledException) {
|
|
180360
|
-
perfLogger.logStopCommand("" + (request && request.command), "Canceled: " + err);
|
|
180361
|
-
(
|
|
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 });
|
|
180362
180348
|
this.doOutput(
|
|
180363
180349
|
{ canceled: true },
|
|
180364
180350
|
request.command,
|
|
@@ -180369,8 +180355,8 @@ ${e.message}`;
|
|
|
180369
180355
|
return;
|
|
180370
180356
|
}
|
|
180371
180357
|
this.logErrorWorker(err, this.toStringMessage(message), relevantFile);
|
|
180372
|
-
perfLogger.logStopCommand("" + (request && request.command), "Error: " + err);
|
|
180373
|
-
(
|
|
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 });
|
|
180374
180360
|
this.doOutput(
|
|
180375
180361
|
/*info*/
|
|
180376
180362
|
void 0,
|
|
@@ -181371,15 +181357,16 @@ function initializeNodeSystem() {
|
|
|
181371
181357
|
return this.loggingEnabled() && this.level >= level;
|
|
181372
181358
|
}
|
|
181373
181359
|
msg(s, type = "Err" /* Err */) {
|
|
181360
|
+
var _a2, _b, _c;
|
|
181374
181361
|
switch (type) {
|
|
181375
181362
|
case "Info" /* Info */:
|
|
181376
|
-
perfLogger.logInfoEvent(s);
|
|
181363
|
+
(_a2 = perfLogger) == null ? void 0 : _a2.logInfoEvent(s);
|
|
181377
181364
|
break;
|
|
181378
181365
|
case "Perf" /* Perf */:
|
|
181379
|
-
perfLogger.logPerfEvent(s);
|
|
181366
|
+
(_b = perfLogger) == null ? void 0 : _b.logPerfEvent(s);
|
|
181380
181367
|
break;
|
|
181381
181368
|
default:
|
|
181382
|
-
perfLogger.logErrEvent(s);
|
|
181369
|
+
(_c = perfLogger) == null ? void 0 : _c.logErrEvent(s);
|
|
181383
181370
|
break;
|
|
181384
181371
|
}
|
|
181385
181372
|
if (!this.canWrite())
|