typescript 4.9.2-rc → 5.0.0-dev.20221102
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 +28 -10
- package/lib/tsserver.js +33 -11
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +33 -11
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +33 -11
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +33 -11
- package/lib/typingsInstaller.js +33 -11
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
46
|
function step(op) {
|
|
47
47
|
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (
|
|
48
|
+
while (_) try {
|
|
49
49
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
50
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
51
|
switch (op[0]) {
|
|
@@ -68,8 +68,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
68
68
|
};
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
|
-
ts.versionMajorMinor = "
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".
|
|
71
|
+
ts.versionMajorMinor = "5.0";
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221102");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -32769,9 +32769,6 @@ var ts;
|
|
|
32769
32769
|
name: "listFilesOnly",
|
|
32770
32770
|
type: "boolean",
|
|
32771
32771
|
category: ts.Diagnostics.Command_line_Options,
|
|
32772
|
-
affectsSemanticDiagnostics: true,
|
|
32773
|
-
affectsEmit: true,
|
|
32774
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
32775
32772
|
isCommandLineOnly: true,
|
|
32776
32773
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
32777
32774
|
defaultValueDescription: false,
|
|
@@ -34395,6 +34392,7 @@ var ts;
|
|
|
34395
34392
|
return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a)));
|
|
34396
34393
|
}, {}));
|
|
34397
34394
|
}
|
|
34395
|
+
ts.optionMapToObject = optionMapToObject;
|
|
34398
34396
|
function filterSameAsDefaultInclude(specs) {
|
|
34399
34397
|
if (!ts.length(specs))
|
|
34400
34398
|
return undefined;
|
|
@@ -34443,6 +34441,7 @@ var ts;
|
|
|
34443
34441
|
function serializeCompilerOptions(options, pathOptions) {
|
|
34444
34442
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
34445
34443
|
}
|
|
34444
|
+
ts.serializeCompilerOptions = serializeCompilerOptions;
|
|
34446
34445
|
function serializeWatchOptions(options) {
|
|
34447
34446
|
return serializeOptionBaseObject(options, getWatchOptionsNameMap());
|
|
34448
34447
|
}
|
|
@@ -47764,13 +47763,27 @@ var ts;
|
|
|
47764
47763
|
return getTypeFromTypeNode(typeNode);
|
|
47765
47764
|
}
|
|
47766
47765
|
}
|
|
47766
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
47767
|
+
var decl = symbol.valueDeclaration;
|
|
47768
|
+
if (!decl) {
|
|
47769
|
+
return false;
|
|
47770
|
+
}
|
|
47771
|
+
if (ts.isBindingElement(decl)) {
|
|
47772
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
47773
|
+
}
|
|
47774
|
+
if (ts.isParameter(decl)) {
|
|
47775
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
47776
|
+
}
|
|
47777
|
+
return false;
|
|
47778
|
+
}
|
|
47767
47779
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
47768
47780
|
var links = getSymbolLinks(symbol);
|
|
47769
47781
|
if (!links.type) {
|
|
47770
47782
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
47771
|
-
if (!links.type) {
|
|
47783
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
47772
47784
|
links.type = type;
|
|
47773
47785
|
}
|
|
47786
|
+
return type;
|
|
47774
47787
|
}
|
|
47775
47788
|
return links.type;
|
|
47776
47789
|
}
|
|
@@ -102218,7 +102231,8 @@ var ts;
|
|
|
102218
102231
|
for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
|
|
102219
102232
|
var path = _c[_b];
|
|
102220
102233
|
if (ts.tryAddToSet(seenFiles, path)) {
|
|
102221
|
-
|
|
102234
|
+
var fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
|
|
102235
|
+
(affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(emitKind === 1 ? fileId : [fileId]);
|
|
102222
102236
|
}
|
|
102223
102237
|
}
|
|
102224
102238
|
}
|
|
@@ -102623,6 +102637,10 @@ var ts;
|
|
|
102623
102637
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
102624
102638
|
}
|
|
102625
102639
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
102640
|
+
function toBuilderFileEmit(value) {
|
|
102641
|
+
return ts.isNumber(value) ? 1 : 0;
|
|
102642
|
+
}
|
|
102643
|
+
ts.toBuilderFileEmit = toBuilderFileEmit;
|
|
102626
102644
|
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
102627
102645
|
var _a, _b, _c, _d;
|
|
102628
102646
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -102664,8 +102682,8 @@ var ts;
|
|
|
102664
102682
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
102665
102683
|
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
102666
102684
|
hasReusableDiagnostic: true,
|
|
102667
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
102668
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value
|
|
102685
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }),
|
|
102686
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, toBuilderFileEmit),
|
|
102669
102687
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
102670
102688
|
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
102671
102689
|
latestChangedDtsFile: latestChangedDtsFile,
|
package/lib/tsserver.js
CHANGED
|
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
46
|
function step(op) {
|
|
47
47
|
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (
|
|
48
|
+
while (_) try {
|
|
49
49
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
50
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
51
|
switch (op[0]) {
|
|
@@ -105,11 +105,11 @@ var ts;
|
|
|
105
105
|
(function (ts) {
|
|
106
106
|
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
|
|
107
107
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
108
|
-
ts.versionMajorMinor = "
|
|
108
|
+
ts.versionMajorMinor = "5.0";
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = "".concat(ts.versionMajorMinor, ".
|
|
112
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221102");
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -40383,9 +40383,6 @@ var ts;
|
|
|
40383
40383
|
name: "listFilesOnly",
|
|
40384
40384
|
type: "boolean",
|
|
40385
40385
|
category: ts.Diagnostics.Command_line_Options,
|
|
40386
|
-
affectsSemanticDiagnostics: true,
|
|
40387
|
-
affectsEmit: true,
|
|
40388
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
40389
40386
|
isCommandLineOnly: true,
|
|
40390
40387
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
40391
40388
|
defaultValueDescription: false,
|
|
@@ -42113,12 +42110,14 @@ var ts;
|
|
|
42113
42110
|
return config;
|
|
42114
42111
|
}
|
|
42115
42112
|
ts.convertToTSConfig = convertToTSConfig;
|
|
42113
|
+
/*@internal*/
|
|
42116
42114
|
function optionMapToObject(optionMap) {
|
|
42117
42115
|
return __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) {
|
|
42118
42116
|
var _a;
|
|
42119
42117
|
return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a)));
|
|
42120
42118
|
}, {}));
|
|
42121
42119
|
}
|
|
42120
|
+
ts.optionMapToObject = optionMapToObject;
|
|
42122
42121
|
function filterSameAsDefaultInclude(specs) {
|
|
42123
42122
|
if (!ts.length(specs))
|
|
42124
42123
|
return undefined;
|
|
@@ -42167,9 +42166,11 @@ var ts;
|
|
|
42167
42166
|
});
|
|
42168
42167
|
}
|
|
42169
42168
|
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
42169
|
+
/* @internal */
|
|
42170
42170
|
function serializeCompilerOptions(options, pathOptions) {
|
|
42171
42171
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
42172
42172
|
}
|
|
42173
|
+
ts.serializeCompilerOptions = serializeCompilerOptions;
|
|
42173
42174
|
function serializeWatchOptions(options) {
|
|
42174
42175
|
return serializeOptionBaseObject(options, getWatchOptionsNameMap());
|
|
42175
42176
|
}
|
|
@@ -57732,16 +57733,32 @@ var ts;
|
|
|
57732
57733
|
return getTypeFromTypeNode(typeNode);
|
|
57733
57734
|
}
|
|
57734
57735
|
}
|
|
57736
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
57737
|
+
var decl = symbol.valueDeclaration;
|
|
57738
|
+
if (!decl) {
|
|
57739
|
+
return false;
|
|
57740
|
+
}
|
|
57741
|
+
if (ts.isBindingElement(decl)) {
|
|
57742
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
57743
|
+
}
|
|
57744
|
+
if (ts.isParameter(decl)) {
|
|
57745
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
57746
|
+
}
|
|
57747
|
+
return false;
|
|
57748
|
+
}
|
|
57735
57749
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
57736
57750
|
var links = getSymbolLinks(symbol);
|
|
57737
57751
|
if (!links.type) {
|
|
57738
57752
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
57739
57753
|
// For a contextually typed parameter it is possible that a type has already
|
|
57740
57754
|
// been assigned (in assignTypeToParameterAndFixTypeParameters), and we want
|
|
57741
|
-
// to preserve this type.
|
|
57742
|
-
|
|
57755
|
+
// to preserve this type. In fact, we need to _prefer_ that type, but it won't
|
|
57756
|
+
// be assigned until contextual typing is complete, so we need to defer in
|
|
57757
|
+
// cases where contextual typing may take place.
|
|
57758
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
57743
57759
|
links.type = type;
|
|
57744
57760
|
}
|
|
57761
|
+
return type;
|
|
57745
57762
|
}
|
|
57746
57763
|
return links.type;
|
|
57747
57764
|
}
|
|
@@ -123343,7 +123360,8 @@ var ts;
|
|
|
123343
123360
|
for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
|
|
123344
123361
|
var path = _c[_b];
|
|
123345
123362
|
if (ts.tryAddToSet(seenFiles, path)) {
|
|
123346
|
-
|
|
123363
|
+
var fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
|
|
123364
|
+
(affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(emitKind === 1 /* BuilderFileEmit.Full */ ? fileId : [fileId]);
|
|
123347
123365
|
}
|
|
123348
123366
|
}
|
|
123349
123367
|
}
|
|
@@ -123822,6 +123840,10 @@ var ts;
|
|
|
123822
123840
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
123823
123841
|
}
|
|
123824
123842
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
123843
|
+
function toBuilderFileEmit(value) {
|
|
123844
|
+
return ts.isNumber(value) ? 1 /* BuilderFileEmit.Full */ : 0 /* BuilderFileEmit.DtsOnly */;
|
|
123845
|
+
}
|
|
123846
|
+
ts.toBuilderFileEmit = toBuilderFileEmit;
|
|
123825
123847
|
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
123826
123848
|
var _a, _b, _c, _d;
|
|
123827
123849
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -123863,8 +123885,8 @@ var ts;
|
|
|
123863
123885
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
123864
123886
|
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
123865
123887
|
hasReusableDiagnostic: true,
|
|
123866
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
123867
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value
|
|
123888
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }),
|
|
123889
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, toBuilderFileEmit),
|
|
123868
123890
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
123869
123891
|
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
123870
123892
|
latestChangedDtsFile: latestChangedDtsFile,
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
declare namespace ts {
|
|
17
|
-
const versionMajorMinor = "
|
|
17
|
+
const versionMajorMinor = "5.0";
|
|
18
18
|
/** The version of the TypeScript compiler release */
|
|
19
19
|
const version: string;
|
|
20
20
|
/**
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
44
44
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
45
|
function step(op) {
|
|
46
46
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (
|
|
47
|
+
while (_) try {
|
|
48
48
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
49
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
50
|
switch (op[0]) {
|
|
@@ -104,11 +104,11 @@ var ts;
|
|
|
104
104
|
(function (ts) {
|
|
105
105
|
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
|
|
106
106
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
107
|
-
ts.versionMajorMinor = "
|
|
107
|
+
ts.versionMajorMinor = "5.0";
|
|
108
108
|
// The following is baselined as a literal template type without intervention
|
|
109
109
|
/** The version of the TypeScript compiler release */
|
|
110
110
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
111
|
-
ts.version = "".concat(ts.versionMajorMinor, ".
|
|
111
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221102");
|
|
112
112
|
/* @internal */
|
|
113
113
|
var Comparison;
|
|
114
114
|
(function (Comparison) {
|
|
@@ -40382,9 +40382,6 @@ var ts;
|
|
|
40382
40382
|
name: "listFilesOnly",
|
|
40383
40383
|
type: "boolean",
|
|
40384
40384
|
category: ts.Diagnostics.Command_line_Options,
|
|
40385
|
-
affectsSemanticDiagnostics: true,
|
|
40386
|
-
affectsEmit: true,
|
|
40387
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
40388
40385
|
isCommandLineOnly: true,
|
|
40389
40386
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
40390
40387
|
defaultValueDescription: false,
|
|
@@ -42112,12 +42109,14 @@ var ts;
|
|
|
42112
42109
|
return config;
|
|
42113
42110
|
}
|
|
42114
42111
|
ts.convertToTSConfig = convertToTSConfig;
|
|
42112
|
+
/*@internal*/
|
|
42115
42113
|
function optionMapToObject(optionMap) {
|
|
42116
42114
|
return __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) {
|
|
42117
42115
|
var _a;
|
|
42118
42116
|
return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a)));
|
|
42119
42117
|
}, {}));
|
|
42120
42118
|
}
|
|
42119
|
+
ts.optionMapToObject = optionMapToObject;
|
|
42121
42120
|
function filterSameAsDefaultInclude(specs) {
|
|
42122
42121
|
if (!ts.length(specs))
|
|
42123
42122
|
return undefined;
|
|
@@ -42166,9 +42165,11 @@ var ts;
|
|
|
42166
42165
|
});
|
|
42167
42166
|
}
|
|
42168
42167
|
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
42168
|
+
/* @internal */
|
|
42169
42169
|
function serializeCompilerOptions(options, pathOptions) {
|
|
42170
42170
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
42171
42171
|
}
|
|
42172
|
+
ts.serializeCompilerOptions = serializeCompilerOptions;
|
|
42172
42173
|
function serializeWatchOptions(options) {
|
|
42173
42174
|
return serializeOptionBaseObject(options, getWatchOptionsNameMap());
|
|
42174
42175
|
}
|
|
@@ -57731,16 +57732,32 @@ var ts;
|
|
|
57731
57732
|
return getTypeFromTypeNode(typeNode);
|
|
57732
57733
|
}
|
|
57733
57734
|
}
|
|
57735
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
57736
|
+
var decl = symbol.valueDeclaration;
|
|
57737
|
+
if (!decl) {
|
|
57738
|
+
return false;
|
|
57739
|
+
}
|
|
57740
|
+
if (ts.isBindingElement(decl)) {
|
|
57741
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
57742
|
+
}
|
|
57743
|
+
if (ts.isParameter(decl)) {
|
|
57744
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
57745
|
+
}
|
|
57746
|
+
return false;
|
|
57747
|
+
}
|
|
57734
57748
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
57735
57749
|
var links = getSymbolLinks(symbol);
|
|
57736
57750
|
if (!links.type) {
|
|
57737
57751
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
57738
57752
|
// For a contextually typed parameter it is possible that a type has already
|
|
57739
57753
|
// been assigned (in assignTypeToParameterAndFixTypeParameters), and we want
|
|
57740
|
-
// to preserve this type.
|
|
57741
|
-
|
|
57754
|
+
// to preserve this type. In fact, we need to _prefer_ that type, but it won't
|
|
57755
|
+
// be assigned until contextual typing is complete, so we need to defer in
|
|
57756
|
+
// cases where contextual typing may take place.
|
|
57757
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
57742
57758
|
links.type = type;
|
|
57743
57759
|
}
|
|
57760
|
+
return type;
|
|
57744
57761
|
}
|
|
57745
57762
|
return links.type;
|
|
57746
57763
|
}
|
|
@@ -123342,7 +123359,8 @@ var ts;
|
|
|
123342
123359
|
for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
|
|
123343
123360
|
var path = _c[_b];
|
|
123344
123361
|
if (ts.tryAddToSet(seenFiles, path)) {
|
|
123345
|
-
|
|
123362
|
+
var fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
|
|
123363
|
+
(affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(emitKind === 1 /* BuilderFileEmit.Full */ ? fileId : [fileId]);
|
|
123346
123364
|
}
|
|
123347
123365
|
}
|
|
123348
123366
|
}
|
|
@@ -123821,6 +123839,10 @@ var ts;
|
|
|
123821
123839
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
123822
123840
|
}
|
|
123823
123841
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
123842
|
+
function toBuilderFileEmit(value) {
|
|
123843
|
+
return ts.isNumber(value) ? 1 /* BuilderFileEmit.Full */ : 0 /* BuilderFileEmit.DtsOnly */;
|
|
123844
|
+
}
|
|
123845
|
+
ts.toBuilderFileEmit = toBuilderFileEmit;
|
|
123824
123846
|
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
123825
123847
|
var _a, _b, _c, _d;
|
|
123826
123848
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -123862,8 +123884,8 @@ var ts;
|
|
|
123862
123884
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
123863
123885
|
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
123864
123886
|
hasReusableDiagnostic: true,
|
|
123865
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
123866
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value
|
|
123887
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }),
|
|
123888
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, toBuilderFileEmit),
|
|
123867
123889
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
123868
123890
|
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
123869
123891
|
latestChangedDtsFile: latestChangedDtsFile,
|
package/lib/typescript.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
declare namespace ts {
|
|
17
|
-
const versionMajorMinor = "
|
|
17
|
+
const versionMajorMinor = "5.0";
|
|
18
18
|
/** The version of the TypeScript compiler release */
|
|
19
19
|
const version: string;
|
|
20
20
|
/**
|
package/lib/typescript.js
CHANGED
|
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
44
44
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
45
|
function step(op) {
|
|
46
46
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (
|
|
47
|
+
while (_) try {
|
|
48
48
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
49
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
50
|
switch (op[0]) {
|
|
@@ -95,11 +95,11 @@ var ts;
|
|
|
95
95
|
(function (ts) {
|
|
96
96
|
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
|
|
97
97
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
98
|
-
ts.versionMajorMinor = "
|
|
98
|
+
ts.versionMajorMinor = "5.0";
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221102");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -40373,9 +40373,6 @@ var ts;
|
|
|
40373
40373
|
name: "listFilesOnly",
|
|
40374
40374
|
type: "boolean",
|
|
40375
40375
|
category: ts.Diagnostics.Command_line_Options,
|
|
40376
|
-
affectsSemanticDiagnostics: true,
|
|
40377
|
-
affectsEmit: true,
|
|
40378
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
40379
40376
|
isCommandLineOnly: true,
|
|
40380
40377
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
40381
40378
|
defaultValueDescription: false,
|
|
@@ -42103,12 +42100,14 @@ var ts;
|
|
|
42103
42100
|
return config;
|
|
42104
42101
|
}
|
|
42105
42102
|
ts.convertToTSConfig = convertToTSConfig;
|
|
42103
|
+
/*@internal*/
|
|
42106
42104
|
function optionMapToObject(optionMap) {
|
|
42107
42105
|
return __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) {
|
|
42108
42106
|
var _a;
|
|
42109
42107
|
return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a)));
|
|
42110
42108
|
}, {}));
|
|
42111
42109
|
}
|
|
42110
|
+
ts.optionMapToObject = optionMapToObject;
|
|
42112
42111
|
function filterSameAsDefaultInclude(specs) {
|
|
42113
42112
|
if (!ts.length(specs))
|
|
42114
42113
|
return undefined;
|
|
@@ -42157,9 +42156,11 @@ var ts;
|
|
|
42157
42156
|
});
|
|
42158
42157
|
}
|
|
42159
42158
|
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
42159
|
+
/* @internal */
|
|
42160
42160
|
function serializeCompilerOptions(options, pathOptions) {
|
|
42161
42161
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
42162
42162
|
}
|
|
42163
|
+
ts.serializeCompilerOptions = serializeCompilerOptions;
|
|
42163
42164
|
function serializeWatchOptions(options) {
|
|
42164
42165
|
return serializeOptionBaseObject(options, getWatchOptionsNameMap());
|
|
42165
42166
|
}
|
|
@@ -57722,16 +57723,32 @@ var ts;
|
|
|
57722
57723
|
return getTypeFromTypeNode(typeNode);
|
|
57723
57724
|
}
|
|
57724
57725
|
}
|
|
57726
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
57727
|
+
var decl = symbol.valueDeclaration;
|
|
57728
|
+
if (!decl) {
|
|
57729
|
+
return false;
|
|
57730
|
+
}
|
|
57731
|
+
if (ts.isBindingElement(decl)) {
|
|
57732
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
57733
|
+
}
|
|
57734
|
+
if (ts.isParameter(decl)) {
|
|
57735
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
57736
|
+
}
|
|
57737
|
+
return false;
|
|
57738
|
+
}
|
|
57725
57739
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
57726
57740
|
var links = getSymbolLinks(symbol);
|
|
57727
57741
|
if (!links.type) {
|
|
57728
57742
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
57729
57743
|
// For a contextually typed parameter it is possible that a type has already
|
|
57730
57744
|
// been assigned (in assignTypeToParameterAndFixTypeParameters), and we want
|
|
57731
|
-
// to preserve this type.
|
|
57732
|
-
|
|
57745
|
+
// to preserve this type. In fact, we need to _prefer_ that type, but it won't
|
|
57746
|
+
// be assigned until contextual typing is complete, so we need to defer in
|
|
57747
|
+
// cases where contextual typing may take place.
|
|
57748
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
57733
57749
|
links.type = type;
|
|
57734
57750
|
}
|
|
57751
|
+
return type;
|
|
57735
57752
|
}
|
|
57736
57753
|
return links.type;
|
|
57737
57754
|
}
|
|
@@ -123333,7 +123350,8 @@ var ts;
|
|
|
123333
123350
|
for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
|
|
123334
123351
|
var path = _c[_b];
|
|
123335
123352
|
if (ts.tryAddToSet(seenFiles, path)) {
|
|
123336
|
-
|
|
123353
|
+
var fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
|
|
123354
|
+
(affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(emitKind === 1 /* BuilderFileEmit.Full */ ? fileId : [fileId]);
|
|
123337
123355
|
}
|
|
123338
123356
|
}
|
|
123339
123357
|
}
|
|
@@ -123812,6 +123830,10 @@ var ts;
|
|
|
123812
123830
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
123813
123831
|
}
|
|
123814
123832
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
123833
|
+
function toBuilderFileEmit(value) {
|
|
123834
|
+
return ts.isNumber(value) ? 1 /* BuilderFileEmit.Full */ : 0 /* BuilderFileEmit.DtsOnly */;
|
|
123835
|
+
}
|
|
123836
|
+
ts.toBuilderFileEmit = toBuilderFileEmit;
|
|
123815
123837
|
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
123816
123838
|
var _a, _b, _c, _d;
|
|
123817
123839
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -123853,8 +123875,8 @@ var ts;
|
|
|
123853
123875
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
123854
123876
|
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
123855
123877
|
hasReusableDiagnostic: true,
|
|
123856
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
123857
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value
|
|
123878
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }),
|
|
123879
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, toBuilderFileEmit),
|
|
123858
123880
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
123859
123881
|
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
123860
123882
|
latestChangedDtsFile: latestChangedDtsFile,
|
|
@@ -14,7 +14,7 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
|
|
16
16
|
declare namespace ts {
|
|
17
|
-
const versionMajorMinor = "
|
|
17
|
+
const versionMajorMinor = "5.0";
|
|
18
18
|
/** The version of the TypeScript compiler release */
|
|
19
19
|
const version: string;
|
|
20
20
|
/**
|
|
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
44
44
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
45
|
function step(op) {
|
|
46
46
|
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (
|
|
47
|
+
while (_) try {
|
|
48
48
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
49
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
50
|
switch (op[0]) {
|
|
@@ -95,11 +95,11 @@ var ts;
|
|
|
95
95
|
(function (ts) {
|
|
96
96
|
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
|
|
97
97
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
98
|
-
ts.versionMajorMinor = "
|
|
98
|
+
ts.versionMajorMinor = "5.0";
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221102");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -40373,9 +40373,6 @@ var ts;
|
|
|
40373
40373
|
name: "listFilesOnly",
|
|
40374
40374
|
type: "boolean",
|
|
40375
40375
|
category: ts.Diagnostics.Command_line_Options,
|
|
40376
|
-
affectsSemanticDiagnostics: true,
|
|
40377
|
-
affectsEmit: true,
|
|
40378
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
40379
40376
|
isCommandLineOnly: true,
|
|
40380
40377
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
40381
40378
|
defaultValueDescription: false,
|
|
@@ -42103,12 +42100,14 @@ var ts;
|
|
|
42103
42100
|
return config;
|
|
42104
42101
|
}
|
|
42105
42102
|
ts.convertToTSConfig = convertToTSConfig;
|
|
42103
|
+
/*@internal*/
|
|
42106
42104
|
function optionMapToObject(optionMap) {
|
|
42107
42105
|
return __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) {
|
|
42108
42106
|
var _a;
|
|
42109
42107
|
return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a)));
|
|
42110
42108
|
}, {}));
|
|
42111
42109
|
}
|
|
42110
|
+
ts.optionMapToObject = optionMapToObject;
|
|
42112
42111
|
function filterSameAsDefaultInclude(specs) {
|
|
42113
42112
|
if (!ts.length(specs))
|
|
42114
42113
|
return undefined;
|
|
@@ -42157,9 +42156,11 @@ var ts;
|
|
|
42157
42156
|
});
|
|
42158
42157
|
}
|
|
42159
42158
|
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
42159
|
+
/* @internal */
|
|
42160
42160
|
function serializeCompilerOptions(options, pathOptions) {
|
|
42161
42161
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
42162
42162
|
}
|
|
42163
|
+
ts.serializeCompilerOptions = serializeCompilerOptions;
|
|
42163
42164
|
function serializeWatchOptions(options) {
|
|
42164
42165
|
return serializeOptionBaseObject(options, getWatchOptionsNameMap());
|
|
42165
42166
|
}
|
|
@@ -57722,16 +57723,32 @@ var ts;
|
|
|
57722
57723
|
return getTypeFromTypeNode(typeNode);
|
|
57723
57724
|
}
|
|
57724
57725
|
}
|
|
57726
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
57727
|
+
var decl = symbol.valueDeclaration;
|
|
57728
|
+
if (!decl) {
|
|
57729
|
+
return false;
|
|
57730
|
+
}
|
|
57731
|
+
if (ts.isBindingElement(decl)) {
|
|
57732
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
57733
|
+
}
|
|
57734
|
+
if (ts.isParameter(decl)) {
|
|
57735
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
57736
|
+
}
|
|
57737
|
+
return false;
|
|
57738
|
+
}
|
|
57725
57739
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
57726
57740
|
var links = getSymbolLinks(symbol);
|
|
57727
57741
|
if (!links.type) {
|
|
57728
57742
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
57729
57743
|
// For a contextually typed parameter it is possible that a type has already
|
|
57730
57744
|
// been assigned (in assignTypeToParameterAndFixTypeParameters), and we want
|
|
57731
|
-
// to preserve this type.
|
|
57732
|
-
|
|
57745
|
+
// to preserve this type. In fact, we need to _prefer_ that type, but it won't
|
|
57746
|
+
// be assigned until contextual typing is complete, so we need to defer in
|
|
57747
|
+
// cases where contextual typing may take place.
|
|
57748
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
57733
57749
|
links.type = type;
|
|
57734
57750
|
}
|
|
57751
|
+
return type;
|
|
57735
57752
|
}
|
|
57736
57753
|
return links.type;
|
|
57737
57754
|
}
|
|
@@ -123333,7 +123350,8 @@ var ts;
|
|
|
123333
123350
|
for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
|
|
123334
123351
|
var path = _c[_b];
|
|
123335
123352
|
if (ts.tryAddToSet(seenFiles, path)) {
|
|
123336
|
-
|
|
123353
|
+
var fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
|
|
123354
|
+
(affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(emitKind === 1 /* BuilderFileEmit.Full */ ? fileId : [fileId]);
|
|
123337
123355
|
}
|
|
123338
123356
|
}
|
|
123339
123357
|
}
|
|
@@ -123812,6 +123830,10 @@ var ts;
|
|
|
123812
123830
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
123813
123831
|
}
|
|
123814
123832
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
123833
|
+
function toBuilderFileEmit(value) {
|
|
123834
|
+
return ts.isNumber(value) ? 1 /* BuilderFileEmit.Full */ : 0 /* BuilderFileEmit.DtsOnly */;
|
|
123835
|
+
}
|
|
123836
|
+
ts.toBuilderFileEmit = toBuilderFileEmit;
|
|
123815
123837
|
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
123816
123838
|
var _a, _b, _c, _d;
|
|
123817
123839
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -123853,8 +123875,8 @@ var ts;
|
|
|
123853
123875
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
123854
123876
|
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
123855
123877
|
hasReusableDiagnostic: true,
|
|
123856
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
123857
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value
|
|
123878
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }),
|
|
123879
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, toBuilderFileEmit),
|
|
123858
123880
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
123859
123881
|
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
123860
123882
|
latestChangedDtsFile: latestChangedDtsFile,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
46
|
function step(op) {
|
|
47
47
|
if (f) throw new TypeError("Generator is already executing.");
|
|
48
|
-
while (
|
|
48
|
+
while (_) try {
|
|
49
49
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
50
50
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
51
51
|
switch (op[0]) {
|
|
@@ -85,11 +85,11 @@ var ts;
|
|
|
85
85
|
(function (ts) {
|
|
86
86
|
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
|
|
87
87
|
// If changing the text in this section, be sure to test `configurePrerelease` too.
|
|
88
|
-
ts.versionMajorMinor = "
|
|
88
|
+
ts.versionMajorMinor = "5.0";
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "".concat(ts.versionMajorMinor, ".
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221102");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -40363,9 +40363,6 @@ var ts;
|
|
|
40363
40363
|
name: "listFilesOnly",
|
|
40364
40364
|
type: "boolean",
|
|
40365
40365
|
category: ts.Diagnostics.Command_line_Options,
|
|
40366
|
-
affectsSemanticDiagnostics: true,
|
|
40367
|
-
affectsEmit: true,
|
|
40368
|
-
affectsMultiFileEmitBuildInfo: true,
|
|
40369
40366
|
isCommandLineOnly: true,
|
|
40370
40367
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
40371
40368
|
defaultValueDescription: false,
|
|
@@ -42093,12 +42090,14 @@ var ts;
|
|
|
42093
42090
|
return config;
|
|
42094
42091
|
}
|
|
42095
42092
|
ts.convertToTSConfig = convertToTSConfig;
|
|
42093
|
+
/*@internal*/
|
|
42096
42094
|
function optionMapToObject(optionMap) {
|
|
42097
42095
|
return __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) {
|
|
42098
42096
|
var _a;
|
|
42099
42097
|
return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a)));
|
|
42100
42098
|
}, {}));
|
|
42101
42099
|
}
|
|
42100
|
+
ts.optionMapToObject = optionMapToObject;
|
|
42102
42101
|
function filterSameAsDefaultInclude(specs) {
|
|
42103
42102
|
if (!ts.length(specs))
|
|
42104
42103
|
return undefined;
|
|
@@ -42147,9 +42146,11 @@ var ts;
|
|
|
42147
42146
|
});
|
|
42148
42147
|
}
|
|
42149
42148
|
ts.getNameOfCompilerOptionValue = getNameOfCompilerOptionValue;
|
|
42149
|
+
/* @internal */
|
|
42150
42150
|
function serializeCompilerOptions(options, pathOptions) {
|
|
42151
42151
|
return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions);
|
|
42152
42152
|
}
|
|
42153
|
+
ts.serializeCompilerOptions = serializeCompilerOptions;
|
|
42153
42154
|
function serializeWatchOptions(options) {
|
|
42154
42155
|
return serializeOptionBaseObject(options, getWatchOptionsNameMap());
|
|
42155
42156
|
}
|
|
@@ -57712,16 +57713,32 @@ var ts;
|
|
|
57712
57713
|
return getTypeFromTypeNode(typeNode);
|
|
57713
57714
|
}
|
|
57714
57715
|
}
|
|
57716
|
+
function isParameterOfContextSensitiveSignature(symbol) {
|
|
57717
|
+
var decl = symbol.valueDeclaration;
|
|
57718
|
+
if (!decl) {
|
|
57719
|
+
return false;
|
|
57720
|
+
}
|
|
57721
|
+
if (ts.isBindingElement(decl)) {
|
|
57722
|
+
decl = ts.walkUpBindingElementsAndPatterns(decl);
|
|
57723
|
+
}
|
|
57724
|
+
if (ts.isParameter(decl)) {
|
|
57725
|
+
return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent);
|
|
57726
|
+
}
|
|
57727
|
+
return false;
|
|
57728
|
+
}
|
|
57715
57729
|
function getTypeOfVariableOrParameterOrProperty(symbol) {
|
|
57716
57730
|
var links = getSymbolLinks(symbol);
|
|
57717
57731
|
if (!links.type) {
|
|
57718
57732
|
var type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
|
|
57719
57733
|
// For a contextually typed parameter it is possible that a type has already
|
|
57720
57734
|
// been assigned (in assignTypeToParameterAndFixTypeParameters), and we want
|
|
57721
|
-
// to preserve this type.
|
|
57722
|
-
|
|
57735
|
+
// to preserve this type. In fact, we need to _prefer_ that type, but it won't
|
|
57736
|
+
// be assigned until contextual typing is complete, so we need to defer in
|
|
57737
|
+
// cases where contextual typing may take place.
|
|
57738
|
+
if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
|
|
57723
57739
|
links.type = type;
|
|
57724
57740
|
}
|
|
57741
|
+
return type;
|
|
57725
57742
|
}
|
|
57726
57743
|
return links.type;
|
|
57727
57744
|
}
|
|
@@ -123323,7 +123340,8 @@ var ts;
|
|
|
123323
123340
|
for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
|
|
123324
123341
|
var path = _c[_b];
|
|
123325
123342
|
if (ts.tryAddToSet(seenFiles, path)) {
|
|
123326
|
-
|
|
123343
|
+
var fileId = toFileId(path), emitKind = state.affectedFilesPendingEmitKind.get(path);
|
|
123344
|
+
(affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(emitKind === 1 /* BuilderFileEmit.Full */ ? fileId : [fileId]);
|
|
123327
123345
|
}
|
|
123328
123346
|
}
|
|
123329
123347
|
}
|
|
@@ -123802,6 +123820,10 @@ var ts;
|
|
|
123802
123820
|
{ version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
|
|
123803
123821
|
}
|
|
123804
123822
|
ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
|
|
123823
|
+
function toBuilderFileEmit(value) {
|
|
123824
|
+
return ts.isNumber(value) ? 1 /* BuilderFileEmit.Full */ : 0 /* BuilderFileEmit.DtsOnly */;
|
|
123825
|
+
}
|
|
123826
|
+
ts.toBuilderFileEmit = toBuilderFileEmit;
|
|
123805
123827
|
function createBuilderProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
|
|
123806
123828
|
var _a, _b, _c, _d;
|
|
123807
123829
|
var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
@@ -123843,8 +123865,8 @@ var ts;
|
|
|
123843
123865
|
exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
|
|
123844
123866
|
semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
|
|
123845
123867
|
hasReusableDiagnostic: true,
|
|
123846
|
-
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
|
|
123847
|
-
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value
|
|
123868
|
+
affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }),
|
|
123869
|
+
affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, toBuilderFileEmit),
|
|
123848
123870
|
affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
|
|
123849
123871
|
changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
|
|
123850
123872
|
latestChangedDtsFile: latestChangedDtsFile,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "5.0.0-dev.20221102",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|