@typescript-deploys/pr-build 4.9.0-pr-50309-2 → 4.9.0-pr-50329-13
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/lib.es5.d.ts +4 -6
- package/lib/tsc.js +76 -45
- package/lib/tsserver.js +107 -54
- package/lib/tsserverlibrary.js +107 -54
- package/lib/typescript.js +107 -54
- package/lib/typescriptServices.js +107 -54
- package/lib/typingsInstaller.js +83 -45
- package/package.json +1 -1
package/lib/lib.es5.d.ts
CHANGED
|
@@ -214,12 +214,6 @@ interface ObjectConstructor {
|
|
|
214
214
|
*/
|
|
215
215
|
seal<T>(o: T): T;
|
|
216
216
|
|
|
217
|
-
/**
|
|
218
|
-
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
219
|
-
* @param a Object on which to lock the attributes.
|
|
220
|
-
*/
|
|
221
|
-
freeze<T>(a: T[]): readonly T[];
|
|
222
|
-
|
|
223
217
|
/**
|
|
224
218
|
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
|
225
219
|
* @param f Object on which to lock the attributes.
|
|
@@ -951,6 +945,10 @@ interface RegExpMatchArray extends Array<string> {
|
|
|
951
945
|
* A copy of the search string.
|
|
952
946
|
*/
|
|
953
947
|
input?: string;
|
|
948
|
+
/**
|
|
949
|
+
* The first match. This will always be present because `null` will be returned if there are no matches.
|
|
950
|
+
*/
|
|
951
|
+
0: string;
|
|
954
952
|
}
|
|
955
953
|
|
|
956
954
|
interface RegExpExecArray extends Array<string> {
|
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.9";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220817";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -4460,7 +4460,6 @@ var ts;
|
|
|
4460
4460
|
ts.sys = (function () {
|
|
4461
4461
|
var byteOrderMarkIndicator = "\uFEFF";
|
|
4462
4462
|
function getNodeSystem() {
|
|
4463
|
-
var _a;
|
|
4464
4463
|
var nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/;
|
|
4465
4464
|
var _fs = require("fs");
|
|
4466
4465
|
var _path = require("path");
|
|
@@ -4469,7 +4468,7 @@ var ts;
|
|
|
4469
4468
|
try {
|
|
4470
4469
|
_crypto = require("crypto");
|
|
4471
4470
|
}
|
|
4472
|
-
catch (
|
|
4471
|
+
catch (_a) {
|
|
4473
4472
|
_crypto = undefined;
|
|
4474
4473
|
}
|
|
4475
4474
|
var activeSession;
|
|
@@ -4480,10 +4479,10 @@ var ts;
|
|
|
4480
4479
|
var isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
|
|
4481
4480
|
var platform = _os.platform();
|
|
4482
4481
|
var useCaseSensitiveFileNames = isFileSystemCaseSensitive();
|
|
4483
|
-
var
|
|
4482
|
+
var fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
4484
4483
|
var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
|
|
4485
4484
|
var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
|
|
4486
|
-
var
|
|
4485
|
+
var _b = createSystemWatchFunctions({
|
|
4487
4486
|
pollingWatchFile: createSingleFileWatcherPerName(fsWatchFileWorker, useCaseSensitiveFileNames),
|
|
4488
4487
|
getModifiedTime: getModifiedTime,
|
|
4489
4488
|
setTimeout: setTimeout,
|
|
@@ -4501,7 +4500,7 @@ var ts;
|
|
|
4501
4500
|
defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
4502
4501
|
inodeWatching: isLinuxOrMacOs,
|
|
4503
4502
|
sysLog: sysLog,
|
|
4504
|
-
}), watchFile =
|
|
4503
|
+
}), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
|
|
4505
4504
|
var nodeSystem = {
|
|
4506
4505
|
args: process.argv.slice(2),
|
|
4507
4506
|
newLine: _os.EOL,
|
|
@@ -4851,9 +4850,12 @@ var ts;
|
|
|
4851
4850
|
function getDirectories(path) {
|
|
4852
4851
|
return getAccessibleFileSystemEntries(path).directories.slice();
|
|
4853
4852
|
}
|
|
4853
|
+
function fsRealPathHandlingLongPath(path) {
|
|
4854
|
+
return path.length < 260 ? _fs.realpathSync.native(path) : _fs.realpathSync(path);
|
|
4855
|
+
}
|
|
4854
4856
|
function realpath(path) {
|
|
4855
4857
|
try {
|
|
4856
|
-
return
|
|
4858
|
+
return fsRealpath(path);
|
|
4857
4859
|
}
|
|
4858
4860
|
catch (_a) {
|
|
4859
4861
|
return path;
|
|
@@ -54792,6 +54794,31 @@ var ts;
|
|
|
54792
54794
|
}
|
|
54793
54795
|
return 0;
|
|
54794
54796
|
}
|
|
54797
|
+
if (originalSource.flags & originalTarget.flags & 2097152) {
|
|
54798
|
+
var combinedTypeSet_1 = new ts.Map();
|
|
54799
|
+
ts.forEach(originalSource.types, function (t) { return combinedTypeSet_1.set(getTypeId(t), 1); });
|
|
54800
|
+
var hasOverlap_1 = false;
|
|
54801
|
+
ts.forEach(originalTarget.types, function (t) {
|
|
54802
|
+
var id = getTypeId(t);
|
|
54803
|
+
if (combinedTypeSet_1.has(id)) {
|
|
54804
|
+
combinedTypeSet_1.set(getTypeId(t), 2);
|
|
54805
|
+
hasOverlap_1 = true;
|
|
54806
|
+
}
|
|
54807
|
+
});
|
|
54808
|
+
if (hasOverlap_1) {
|
|
54809
|
+
var filteredSource = ts.filter(originalSource.types, function (t) { return combinedTypeSet_1.get(getTypeId(t)) !== 2; });
|
|
54810
|
+
var filteredTarget = ts.filter(originalTarget.types, function (t) { return combinedTypeSet_1.get(getTypeId(t)) !== 2; });
|
|
54811
|
+
if (!ts.length(filteredTarget)) {
|
|
54812
|
+
return -1;
|
|
54813
|
+
}
|
|
54814
|
+
if (ts.length(filteredSource)) {
|
|
54815
|
+
var result_7;
|
|
54816
|
+
if (result_7 = isRelatedTo(getIntersectionType(filteredSource), getIntersectionType(filteredTarget), recursionFlags, false, undefined, intersectionState)) {
|
|
54817
|
+
return result_7;
|
|
54818
|
+
}
|
|
54819
|
+
}
|
|
54820
|
+
}
|
|
54821
|
+
}
|
|
54795
54822
|
var source = getNormalizedType(originalSource, false);
|
|
54796
54823
|
var target = getNormalizedType(originalTarget, true);
|
|
54797
54824
|
if (source === target)
|
|
@@ -54831,7 +54858,8 @@ var ts;
|
|
|
54831
54858
|
return 0;
|
|
54832
54859
|
}
|
|
54833
54860
|
}
|
|
54834
|
-
var isPerformingCommonPropertyChecks = relation !== comparableRelation &&
|
|
54861
|
+
var isPerformingCommonPropertyChecks = (relation !== comparableRelation || relation === comparableRelation && isLiteralType(source)) &&
|
|
54862
|
+
!(intersectionState & 2) &&
|
|
54835
54863
|
source.flags & (131068 | 524288 | 2097152) && source !== globalObjectType &&
|
|
54836
54864
|
target.flags & (524288 | 2097152) && isWeakType(target) &&
|
|
54837
54865
|
(getPropertiesOfType(source).length > 0 || typeHasCallOrConstructSignatures(source));
|
|
@@ -54855,17 +54883,17 @@ var ts;
|
|
|
54855
54883
|
traceUnionsOrIntersectionsTooLarge(source, target);
|
|
54856
54884
|
var skipCaching = source.flags & 1048576 && source.types.length < 4 && !(target.flags & 1048576) ||
|
|
54857
54885
|
target.flags & 1048576 && target.types.length < 4 && !(source.flags & 469499904);
|
|
54858
|
-
var
|
|
54886
|
+
var result_8 = skipCaching ?
|
|
54859
54887
|
unionOrIntersectionRelatedTo(source, target, reportErrors, intersectionState) :
|
|
54860
54888
|
recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags);
|
|
54861
|
-
if (
|
|
54889
|
+
if (result_8 && !inPropertyCheck && (target.flags & 2097152 && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) ||
|
|
54862
54890
|
isNonGenericObjectType(target) && !isArrayOrTupleType(target) && source.flags & 2097152 && getApparentType(source).flags & 3670016 && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 262144); }))) {
|
|
54863
54891
|
inPropertyCheck = true;
|
|
54864
|
-
|
|
54892
|
+
result_8 &= recursiveTypeRelatedTo(source, target, reportErrors, 4, recursionFlags);
|
|
54865
54893
|
inPropertyCheck = false;
|
|
54866
54894
|
}
|
|
54867
|
-
if (
|
|
54868
|
-
return
|
|
54895
|
+
if (result_8) {
|
|
54896
|
+
return result_8;
|
|
54869
54897
|
}
|
|
54870
54898
|
}
|
|
54871
54899
|
if (reportErrors) {
|
|
@@ -55200,6 +55228,9 @@ var ts;
|
|
|
55200
55228
|
return result;
|
|
55201
55229
|
}
|
|
55202
55230
|
function recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags) {
|
|
55231
|
+
if (relation.size > Math.pow(2, 20)) {
|
|
55232
|
+
debugger;
|
|
55233
|
+
}
|
|
55203
55234
|
if (overflow) {
|
|
55204
55235
|
return 0;
|
|
55205
55236
|
}
|
|
@@ -55332,11 +55363,11 @@ var ts;
|
|
|
55332
55363
|
var targetFlags = target.flags;
|
|
55333
55364
|
if (relation === identityRelation) {
|
|
55334
55365
|
if (sourceFlags & 3145728) {
|
|
55335
|
-
var
|
|
55336
|
-
if (
|
|
55337
|
-
|
|
55366
|
+
var result_9 = eachTypeRelatedToSomeType(source, target);
|
|
55367
|
+
if (result_9) {
|
|
55368
|
+
result_9 &= eachTypeRelatedToSomeType(target, source);
|
|
55338
55369
|
}
|
|
55339
|
-
return
|
|
55370
|
+
return result_9;
|
|
55340
55371
|
}
|
|
55341
55372
|
if (sourceFlags & 4194304) {
|
|
55342
55373
|
return isRelatedTo(source.type, target.type, 3, false);
|
|
@@ -55478,7 +55509,7 @@ var ts;
|
|
|
55478
55509
|
if (reportErrors && originalErrorInfo) {
|
|
55479
55510
|
resetErrorInfo(saveErrorInfo);
|
|
55480
55511
|
}
|
|
55481
|
-
if (result = isRelatedTo(source, constraint, 2, reportErrors)) {
|
|
55512
|
+
if (result = isRelatedTo(source, constraint, 2, reportErrors, undefined, intersectionState)) {
|
|
55482
55513
|
return result;
|
|
55483
55514
|
}
|
|
55484
55515
|
if (reportErrors && originalErrorInfo && errorInfo) {
|
|
@@ -55721,9 +55752,9 @@ var ts;
|
|
|
55721
55752
|
if (sourceFlags & (524288 | 2097152) && targetFlags & 1048576) {
|
|
55722
55753
|
var objectOnlyTarget = extractTypesOfKind(target, 524288 | 2097152 | 33554432);
|
|
55723
55754
|
if (objectOnlyTarget.flags & 1048576) {
|
|
55724
|
-
var
|
|
55725
|
-
if (
|
|
55726
|
-
return
|
|
55755
|
+
var result_10 = typeRelatedToDiscriminatedType(source, objectOnlyTarget);
|
|
55756
|
+
if (result_10) {
|
|
55757
|
+
return result_10;
|
|
55727
55758
|
}
|
|
55728
55759
|
}
|
|
55729
55760
|
}
|
|
@@ -55758,13 +55789,13 @@ var ts;
|
|
|
55758
55789
|
var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) :
|
|
55759
55790
|
getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target));
|
|
55760
55791
|
if (modifiersRelated) {
|
|
55761
|
-
var
|
|
55792
|
+
var result_11;
|
|
55762
55793
|
var targetConstraint = getConstraintTypeFromMappedType(target);
|
|
55763
55794
|
var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMapper : reportUnreliableMapper);
|
|
55764
|
-
if (
|
|
55795
|
+
if (result_11 = isRelatedTo(targetConstraint, sourceConstraint, 3, reportErrors)) {
|
|
55765
55796
|
var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
|
|
55766
55797
|
if (instantiateType(getNameTypeFromMappedType(source), mapper) === instantiateType(getNameTypeFromMappedType(target), mapper)) {
|
|
55767
|
-
return
|
|
55798
|
+
return result_11 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), 3, reportErrors);
|
|
55768
55799
|
}
|
|
55769
55800
|
}
|
|
55770
55801
|
}
|
|
@@ -56927,7 +56958,7 @@ var ts;
|
|
|
56927
56958
|
if (!isLiteralOfContextualType(type, contextualType)) {
|
|
56928
56959
|
type = getWidenedUniqueESSymbolType(getWidenedLiteralType(type));
|
|
56929
56960
|
}
|
|
56930
|
-
return type;
|
|
56961
|
+
return getRegularTypeOfLiteralType(type);
|
|
56931
56962
|
}
|
|
56932
56963
|
function getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(type, contextualSignatureReturnType, isAsync) {
|
|
56933
56964
|
if (type && isUnitType(type)) {
|
|
@@ -65480,10 +65511,10 @@ var ts;
|
|
|
65480
65511
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
65481
65512
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
65482
65513
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
65483
|
-
var
|
|
65484
|
-
|
|
65485
|
-
|
|
65486
|
-
return
|
|
65514
|
+
var result_12 = createAnonymousType(undefined, resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
|
|
65515
|
+
result_12.objectFlags |= 8388608;
|
|
65516
|
+
result_12.node = node;
|
|
65517
|
+
return result_12;
|
|
65487
65518
|
}
|
|
65488
65519
|
}
|
|
65489
65520
|
else if (type.flags & 58982400) {
|
|
@@ -68932,12 +68963,12 @@ var ts;
|
|
|
68932
68963
|
case 265:
|
|
68933
68964
|
case 268:
|
|
68934
68965
|
case 267:
|
|
68935
|
-
var
|
|
68966
|
+
var result_13 = 0;
|
|
68936
68967
|
var target = resolveAlias(getSymbolOfNode(d));
|
|
68937
68968
|
ts.forEach(target.declarations, function (d) {
|
|
68938
|
-
|
|
68969
|
+
result_13 |= getDeclarationSpaces(d);
|
|
68939
68970
|
});
|
|
68940
|
-
return
|
|
68971
|
+
return result_13;
|
|
68941
68972
|
case 254:
|
|
68942
68973
|
case 203:
|
|
68943
68974
|
case 256:
|
|
@@ -83102,8 +83133,8 @@ var ts;
|
|
|
83102
83133
|
function convertJsxChildrenToChildrenPropAssignment(children) {
|
|
83103
83134
|
var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
|
|
83104
83135
|
if (ts.length(nonWhitespaceChildren) === 1 && !nonWhitespaceChildren[0].dotDotDotToken) {
|
|
83105
|
-
var
|
|
83106
|
-
return
|
|
83136
|
+
var result_14 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
|
|
83137
|
+
return result_14 && factory.createPropertyAssignment("children", result_14);
|
|
83107
83138
|
}
|
|
83108
83139
|
var result = ts.mapDefined(children, transformJsxChildToExpression);
|
|
83109
83140
|
return ts.length(result) ? factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result)) : undefined;
|
|
@@ -98032,15 +98063,15 @@ var ts;
|
|
|
98032
98063
|
}
|
|
98033
98064
|
var oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName);
|
|
98034
98065
|
if (oldSourceFile !== file && file.resolvedModules) {
|
|
98035
|
-
var
|
|
98066
|
+
var result_15 = [];
|
|
98036
98067
|
var i = 0;
|
|
98037
98068
|
for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
|
|
98038
98069
|
var moduleName = moduleNames_1[_i];
|
|
98039
98070
|
var resolvedModule = file.resolvedModules.get(moduleName, getModeForResolutionAtIndex(file, i));
|
|
98040
98071
|
i++;
|
|
98041
|
-
|
|
98072
|
+
result_15.push(resolvedModule);
|
|
98042
98073
|
}
|
|
98043
|
-
return
|
|
98074
|
+
return result_15;
|
|
98044
98075
|
}
|
|
98045
98076
|
var unknownModuleNames;
|
|
98046
98077
|
var result;
|
|
@@ -101016,14 +101047,14 @@ var ts;
|
|
|
101016
101047
|
fileNames_1.push(relativeToBuildInfo(sourceFile.resolvedPath));
|
|
101017
101048
|
fileInfos_1.push(sourceFile.version);
|
|
101018
101049
|
});
|
|
101019
|
-
var
|
|
101050
|
+
var result_16 = {
|
|
101020
101051
|
fileNames: fileNames_1,
|
|
101021
101052
|
fileInfos: fileInfos_1,
|
|
101022
101053
|
options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
|
|
101023
101054
|
outSignature: state.outSignature,
|
|
101024
101055
|
latestChangedDtsFile: latestChangedDtsFile,
|
|
101025
101056
|
};
|
|
101026
|
-
return
|
|
101057
|
+
return result_16;
|
|
101027
101058
|
}
|
|
101028
101059
|
var fileNames = [];
|
|
101029
101060
|
var fileNameToFileId = new ts.Map();
|
|
@@ -102713,9 +102744,9 @@ var ts;
|
|
|
102713
102744
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
102714
102745
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
102715
102746
|
if (!preferSymlinks) {
|
|
102716
|
-
var
|
|
102717
|
-
if (
|
|
102718
|
-
return
|
|
102747
|
+
var result_17 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
102748
|
+
if (result_17)
|
|
102749
|
+
return result_17;
|
|
102719
102750
|
}
|
|
102720
102751
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
102721
102752
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -102734,10 +102765,10 @@ var ts;
|
|
|
102734
102765
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
102735
102766
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
102736
102767
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
102737
|
-
var
|
|
102768
|
+
var result_18 = cb(option, target === referenceRedirect);
|
|
102738
102769
|
shouldFilterIgnoredPaths = true;
|
|
102739
|
-
if (
|
|
102740
|
-
return
|
|
102770
|
+
if (result_18)
|
|
102771
|
+
return result_18;
|
|
102741
102772
|
}
|
|
102742
102773
|
});
|
|
102743
102774
|
});
|