typescript 5.3.0-dev.20230914 → 5.3.0-dev.20230915
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 +44 -17
- package/lib/tsserver.js +44 -17
- package/lib/typescript.js +44 -17
- package/lib/typingsInstaller.js +2 -2
- package/package.json +3 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230915`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -8717,7 +8717,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8717
8717
|
start2 = pos;
|
|
8718
8718
|
continue;
|
|
8719
8719
|
}
|
|
8720
|
-
if (
|
|
8720
|
+
if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {
|
|
8721
8721
|
result += text.substring(start2, pos);
|
|
8722
8722
|
tokenFlags |= 4 /* Unterminated */;
|
|
8723
8723
|
error(Diagnostics.Unterminated_string_literal);
|
|
@@ -51377,10 +51377,6 @@ function createTypeChecker(host) {
|
|
|
51377
51377
|
const prop = getPropertyOfType(type, name);
|
|
51378
51378
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
51379
51379
|
}
|
|
51380
|
-
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
51381
|
-
var _a;
|
|
51382
|
-
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
51383
|
-
}
|
|
51384
51380
|
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
51385
51381
|
var _a;
|
|
51386
51382
|
let propType;
|
|
@@ -51519,9 +51515,14 @@ function createTypeChecker(host) {
|
|
|
51519
51515
|
function getTypeForBindingElement(declaration) {
|
|
51520
51516
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
51521
51517
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
51522
|
-
return parentType && getBindingElementTypeFromParentType(
|
|
51518
|
+
return parentType && getBindingElementTypeFromParentType(
|
|
51519
|
+
declaration,
|
|
51520
|
+
parentType,
|
|
51521
|
+
/*noTupleBoundsCheck*/
|
|
51522
|
+
false
|
|
51523
|
+
);
|
|
51523
51524
|
}
|
|
51524
|
-
function getBindingElementTypeFromParentType(declaration, parentType) {
|
|
51525
|
+
function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) {
|
|
51525
51526
|
if (isTypeAny(parentType)) {
|
|
51526
51527
|
return parentType;
|
|
51527
51528
|
}
|
|
@@ -51560,7 +51561,7 @@ function createTypeChecker(host) {
|
|
|
51560
51561
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
51561
51562
|
} else if (isArrayLikeType(parentType)) {
|
|
51562
51563
|
const indexType = getNumberLiteralType(index);
|
|
51563
|
-
const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
51564
|
+
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
51564
51565
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
51565
51566
|
type = getFlowTypeOfDestructuring(declaration, declaredType);
|
|
51566
51567
|
} else {
|
|
@@ -65731,7 +65732,7 @@ function createTypeChecker(host) {
|
|
|
65731
65732
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
65732
65733
|
const narrowedPropType = narrowType2(propType);
|
|
65733
65734
|
return filterType(type, (t) => {
|
|
65734
|
-
const discriminantType =
|
|
65735
|
+
const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType;
|
|
65735
65736
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
65736
65737
|
});
|
|
65737
65738
|
}
|
|
@@ -66448,7 +66449,12 @@ function createTypeChecker(host) {
|
|
|
66448
66449
|
if (narrowedType.flags & 131072 /* Never */) {
|
|
66449
66450
|
return neverType;
|
|
66450
66451
|
}
|
|
66451
|
-
return getBindingElementTypeFromParentType(
|
|
66452
|
+
return getBindingElementTypeFromParentType(
|
|
66453
|
+
declaration,
|
|
66454
|
+
narrowedType,
|
|
66455
|
+
/*noTupleBoundsCheck*/
|
|
66456
|
+
true
|
|
66457
|
+
);
|
|
66452
66458
|
}
|
|
66453
66459
|
}
|
|
66454
66460
|
}
|
|
@@ -66972,6 +66978,9 @@ function createTypeChecker(host) {
|
|
|
66972
66978
|
error(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class);
|
|
66973
66979
|
return errorType;
|
|
66974
66980
|
}
|
|
66981
|
+
if (classDeclarationExtendsNull(classLikeDeclaration)) {
|
|
66982
|
+
return isCallExpression2 ? errorType : nullWideningType;
|
|
66983
|
+
}
|
|
66975
66984
|
const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration));
|
|
66976
66985
|
const baseClassType = classType && getBaseTypes(classType)[0];
|
|
66977
66986
|
if (!baseClassType) {
|
|
@@ -72502,7 +72511,12 @@ function createTypeChecker(host) {
|
|
|
72502
72511
|
function assignBindingElementTypes(pattern, parentType) {
|
|
72503
72512
|
for (const element of pattern.elements) {
|
|
72504
72513
|
if (!isOmittedExpression(element)) {
|
|
72505
|
-
const type = getBindingElementTypeFromParentType(
|
|
72514
|
+
const type = getBindingElementTypeFromParentType(
|
|
72515
|
+
element,
|
|
72516
|
+
parentType,
|
|
72517
|
+
/*noTupleBoundsCheck*/
|
|
72518
|
+
false
|
|
72519
|
+
);
|
|
72506
72520
|
if (element.name.kind === 80 /* Identifier */) {
|
|
72507
72521
|
getSymbolLinks(getSymbolOfDeclaration(element)).type = type;
|
|
72508
72522
|
} else {
|
|
@@ -112972,6 +112986,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112972
112986
|
increaseIndent();
|
|
112973
112987
|
shouldDecreaseIndentAfterEmit = true;
|
|
112974
112988
|
}
|
|
112989
|
+
if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) {
|
|
112990
|
+
const commentRange = getCommentRange(child);
|
|
112991
|
+
emitTrailingCommentsOfPosition(
|
|
112992
|
+
commentRange.pos,
|
|
112993
|
+
/*prefixSpace*/
|
|
112994
|
+
!!(format & 512 /* SpaceBetweenSiblings */),
|
|
112995
|
+
/*forceNoNewline*/
|
|
112996
|
+
true
|
|
112997
|
+
);
|
|
112998
|
+
}
|
|
112975
112999
|
writeLine(separatingLineTerminatorCount);
|
|
112976
113000
|
shouldEmitInterveningComments = false;
|
|
112977
113001
|
} else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) {
|
|
@@ -120509,19 +120533,22 @@ function removeIgnoredPath(path) {
|
|
|
120509
120533
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
120510
120534
|
if (length2 <= 1)
|
|
120511
120535
|
return 1;
|
|
120512
|
-
let
|
|
120536
|
+
let indexAfterOsRoot = 1;
|
|
120513
120537
|
let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0;
|
|
120514
120538
|
if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths
|
|
120515
120539
|
pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) {
|
|
120516
120540
|
if (length2 === 2)
|
|
120517
120541
|
return 2;
|
|
120518
|
-
|
|
120542
|
+
indexAfterOsRoot = 2;
|
|
120519
120543
|
isDosStyle = true;
|
|
120520
120544
|
}
|
|
120521
|
-
if (isDosStyle && !pathComponents2[
|
|
120522
|
-
return
|
|
120545
|
+
if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) {
|
|
120546
|
+
return indexAfterOsRoot;
|
|
120547
|
+
}
|
|
120548
|
+
if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) {
|
|
120549
|
+
return indexAfterOsRoot + 1;
|
|
120523
120550
|
}
|
|
120524
|
-
return
|
|
120551
|
+
return indexAfterOsRoot + 2;
|
|
120525
120552
|
}
|
|
120526
120553
|
function canWatchDirectoryOrFile(pathComponents2, length2) {
|
|
120527
120554
|
if (length2 === void 0)
|
package/lib/tsserver.js
CHANGED
|
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/compiler/corePublic.ts
|
|
2330
2330
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-dev.20230915`;
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -12258,7 +12258,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12258
12258
|
start3 = pos;
|
|
12259
12259
|
continue;
|
|
12260
12260
|
}
|
|
12261
|
-
if (
|
|
12261
|
+
if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {
|
|
12262
12262
|
result += text.substring(start3, pos);
|
|
12263
12263
|
tokenFlags |= 4 /* Unterminated */;
|
|
12264
12264
|
error2(Diagnostics.Unterminated_string_literal);
|
|
@@ -56077,10 +56077,6 @@ function createTypeChecker(host) {
|
|
|
56077
56077
|
const prop = getPropertyOfType(type, name);
|
|
56078
56078
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
56079
56079
|
}
|
|
56080
|
-
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
56081
|
-
var _a;
|
|
56082
|
-
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
56083
|
-
}
|
|
56084
56080
|
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
56085
56081
|
var _a;
|
|
56086
56082
|
let propType;
|
|
@@ -56219,9 +56215,14 @@ function createTypeChecker(host) {
|
|
|
56219
56215
|
function getTypeForBindingElement(declaration) {
|
|
56220
56216
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
56221
56217
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
56222
|
-
return parentType && getBindingElementTypeFromParentType(
|
|
56218
|
+
return parentType && getBindingElementTypeFromParentType(
|
|
56219
|
+
declaration,
|
|
56220
|
+
parentType,
|
|
56221
|
+
/*noTupleBoundsCheck*/
|
|
56222
|
+
false
|
|
56223
|
+
);
|
|
56223
56224
|
}
|
|
56224
|
-
function getBindingElementTypeFromParentType(declaration, parentType) {
|
|
56225
|
+
function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) {
|
|
56225
56226
|
if (isTypeAny(parentType)) {
|
|
56226
56227
|
return parentType;
|
|
56227
56228
|
}
|
|
@@ -56260,7 +56261,7 @@ function createTypeChecker(host) {
|
|
|
56260
56261
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
56261
56262
|
} else if (isArrayLikeType(parentType)) {
|
|
56262
56263
|
const indexType = getNumberLiteralType(index);
|
|
56263
|
-
const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
56264
|
+
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
56264
56265
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
56265
56266
|
type = getFlowTypeOfDestructuring(declaration, declaredType);
|
|
56266
56267
|
} else {
|
|
@@ -70431,7 +70432,7 @@ function createTypeChecker(host) {
|
|
|
70431
70432
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
70432
70433
|
const narrowedPropType = narrowType2(propType);
|
|
70433
70434
|
return filterType(type, (t) => {
|
|
70434
|
-
const discriminantType =
|
|
70435
|
+
const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType;
|
|
70435
70436
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
70436
70437
|
});
|
|
70437
70438
|
}
|
|
@@ -71148,7 +71149,12 @@ function createTypeChecker(host) {
|
|
|
71148
71149
|
if (narrowedType.flags & 131072 /* Never */) {
|
|
71149
71150
|
return neverType;
|
|
71150
71151
|
}
|
|
71151
|
-
return getBindingElementTypeFromParentType(
|
|
71152
|
+
return getBindingElementTypeFromParentType(
|
|
71153
|
+
declaration,
|
|
71154
|
+
narrowedType,
|
|
71155
|
+
/*noTupleBoundsCheck*/
|
|
71156
|
+
true
|
|
71157
|
+
);
|
|
71152
71158
|
}
|
|
71153
71159
|
}
|
|
71154
71160
|
}
|
|
@@ -71672,6 +71678,9 @@ function createTypeChecker(host) {
|
|
|
71672
71678
|
error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class);
|
|
71673
71679
|
return errorType;
|
|
71674
71680
|
}
|
|
71681
|
+
if (classDeclarationExtendsNull(classLikeDeclaration)) {
|
|
71682
|
+
return isCallExpression2 ? errorType : nullWideningType;
|
|
71683
|
+
}
|
|
71675
71684
|
const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration));
|
|
71676
71685
|
const baseClassType = classType && getBaseTypes(classType)[0];
|
|
71677
71686
|
if (!baseClassType) {
|
|
@@ -77202,7 +77211,12 @@ function createTypeChecker(host) {
|
|
|
77202
77211
|
function assignBindingElementTypes(pattern, parentType) {
|
|
77203
77212
|
for (const element of pattern.elements) {
|
|
77204
77213
|
if (!isOmittedExpression(element)) {
|
|
77205
|
-
const type = getBindingElementTypeFromParentType(
|
|
77214
|
+
const type = getBindingElementTypeFromParentType(
|
|
77215
|
+
element,
|
|
77216
|
+
parentType,
|
|
77217
|
+
/*noTupleBoundsCheck*/
|
|
77218
|
+
false
|
|
77219
|
+
);
|
|
77206
77220
|
if (element.name.kind === 80 /* Identifier */) {
|
|
77207
77221
|
getSymbolLinks(getSymbolOfDeclaration(element)).type = type;
|
|
77208
77222
|
} else {
|
|
@@ -117854,6 +117868,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
117854
117868
|
increaseIndent();
|
|
117855
117869
|
shouldDecreaseIndentAfterEmit = true;
|
|
117856
117870
|
}
|
|
117871
|
+
if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) {
|
|
117872
|
+
const commentRange = getCommentRange(child);
|
|
117873
|
+
emitTrailingCommentsOfPosition(
|
|
117874
|
+
commentRange.pos,
|
|
117875
|
+
/*prefixSpace*/
|
|
117876
|
+
!!(format & 512 /* SpaceBetweenSiblings */),
|
|
117877
|
+
/*forceNoNewline*/
|
|
117878
|
+
true
|
|
117879
|
+
);
|
|
117880
|
+
}
|
|
117857
117881
|
writeLine(separatingLineTerminatorCount);
|
|
117858
117882
|
shouldEmitInterveningComments = false;
|
|
117859
117883
|
} else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) {
|
|
@@ -125477,19 +125501,22 @@ function removeIgnoredPath(path) {
|
|
|
125477
125501
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
125478
125502
|
if (length2 <= 1)
|
|
125479
125503
|
return 1;
|
|
125480
|
-
let
|
|
125504
|
+
let indexAfterOsRoot = 1;
|
|
125481
125505
|
let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0;
|
|
125482
125506
|
if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths
|
|
125483
125507
|
pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) {
|
|
125484
125508
|
if (length2 === 2)
|
|
125485
125509
|
return 2;
|
|
125486
|
-
|
|
125510
|
+
indexAfterOsRoot = 2;
|
|
125487
125511
|
isDosStyle = true;
|
|
125488
125512
|
}
|
|
125489
|
-
if (isDosStyle && !pathComponents2[
|
|
125490
|
-
return
|
|
125513
|
+
if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) {
|
|
125514
|
+
return indexAfterOsRoot;
|
|
125515
|
+
}
|
|
125516
|
+
if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) {
|
|
125517
|
+
return indexAfterOsRoot + 1;
|
|
125491
125518
|
}
|
|
125492
|
-
return
|
|
125519
|
+
return indexAfterOsRoot + 2;
|
|
125493
125520
|
}
|
|
125494
125521
|
function canWatchDirectoryOrFile(pathComponents2, length2) {
|
|
125495
125522
|
if (length2 === void 0)
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230915`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9880,7 +9880,7 @@ ${lanes.join("\n")}
|
|
|
9880
9880
|
start2 = pos;
|
|
9881
9881
|
continue;
|
|
9882
9882
|
}
|
|
9883
|
-
if (
|
|
9883
|
+
if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {
|
|
9884
9884
|
result += text.substring(start2, pos);
|
|
9885
9885
|
tokenFlags |= 4 /* Unterminated */;
|
|
9886
9886
|
error2(Diagnostics.Unterminated_string_literal);
|
|
@@ -53843,10 +53843,6 @@ ${lanes.join("\n")}
|
|
|
53843
53843
|
const prop = getPropertyOfType(type, name);
|
|
53844
53844
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
53845
53845
|
}
|
|
53846
|
-
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
53847
|
-
var _a;
|
|
53848
|
-
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
53849
|
-
}
|
|
53850
53846
|
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
53851
53847
|
var _a;
|
|
53852
53848
|
let propType;
|
|
@@ -53985,9 +53981,14 @@ ${lanes.join("\n")}
|
|
|
53985
53981
|
function getTypeForBindingElement(declaration) {
|
|
53986
53982
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
53987
53983
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
53988
|
-
return parentType && getBindingElementTypeFromParentType(
|
|
53984
|
+
return parentType && getBindingElementTypeFromParentType(
|
|
53985
|
+
declaration,
|
|
53986
|
+
parentType,
|
|
53987
|
+
/*noTupleBoundsCheck*/
|
|
53988
|
+
false
|
|
53989
|
+
);
|
|
53989
53990
|
}
|
|
53990
|
-
function getBindingElementTypeFromParentType(declaration, parentType) {
|
|
53991
|
+
function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) {
|
|
53991
53992
|
if (isTypeAny(parentType)) {
|
|
53992
53993
|
return parentType;
|
|
53993
53994
|
}
|
|
@@ -54026,7 +54027,7 @@ ${lanes.join("\n")}
|
|
|
54026
54027
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
54027
54028
|
} else if (isArrayLikeType(parentType)) {
|
|
54028
54029
|
const indexType = getNumberLiteralType(index);
|
|
54029
|
-
const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
54030
|
+
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
54030
54031
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
54031
54032
|
type = getFlowTypeOfDestructuring(declaration, declaredType);
|
|
54032
54033
|
} else {
|
|
@@ -68197,7 +68198,7 @@ ${lanes.join("\n")}
|
|
|
68197
68198
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
68198
68199
|
const narrowedPropType = narrowType2(propType);
|
|
68199
68200
|
return filterType(type, (t) => {
|
|
68200
|
-
const discriminantType =
|
|
68201
|
+
const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType;
|
|
68201
68202
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
68202
68203
|
});
|
|
68203
68204
|
}
|
|
@@ -68914,7 +68915,12 @@ ${lanes.join("\n")}
|
|
|
68914
68915
|
if (narrowedType.flags & 131072 /* Never */) {
|
|
68915
68916
|
return neverType;
|
|
68916
68917
|
}
|
|
68917
|
-
return getBindingElementTypeFromParentType(
|
|
68918
|
+
return getBindingElementTypeFromParentType(
|
|
68919
|
+
declaration,
|
|
68920
|
+
narrowedType,
|
|
68921
|
+
/*noTupleBoundsCheck*/
|
|
68922
|
+
true
|
|
68923
|
+
);
|
|
68918
68924
|
}
|
|
68919
68925
|
}
|
|
68920
68926
|
}
|
|
@@ -69438,6 +69444,9 @@ ${lanes.join("\n")}
|
|
|
69438
69444
|
error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class);
|
|
69439
69445
|
return errorType;
|
|
69440
69446
|
}
|
|
69447
|
+
if (classDeclarationExtendsNull(classLikeDeclaration)) {
|
|
69448
|
+
return isCallExpression2 ? errorType : nullWideningType;
|
|
69449
|
+
}
|
|
69441
69450
|
const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration));
|
|
69442
69451
|
const baseClassType = classType && getBaseTypes(classType)[0];
|
|
69443
69452
|
if (!baseClassType) {
|
|
@@ -74968,7 +74977,12 @@ ${lanes.join("\n")}
|
|
|
74968
74977
|
function assignBindingElementTypes(pattern, parentType) {
|
|
74969
74978
|
for (const element of pattern.elements) {
|
|
74970
74979
|
if (!isOmittedExpression(element)) {
|
|
74971
|
-
const type = getBindingElementTypeFromParentType(
|
|
74980
|
+
const type = getBindingElementTypeFromParentType(
|
|
74981
|
+
element,
|
|
74982
|
+
parentType,
|
|
74983
|
+
/*noTupleBoundsCheck*/
|
|
74984
|
+
false
|
|
74985
|
+
);
|
|
74972
74986
|
if (element.name.kind === 80 /* Identifier */) {
|
|
74973
74987
|
getSymbolLinks(getSymbolOfDeclaration(element)).type = type;
|
|
74974
74988
|
} else {
|
|
@@ -115898,6 +115912,16 @@ ${lanes.join("\n")}
|
|
|
115898
115912
|
increaseIndent();
|
|
115899
115913
|
shouldDecreaseIndentAfterEmit = true;
|
|
115900
115914
|
}
|
|
115915
|
+
if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) {
|
|
115916
|
+
const commentRange = getCommentRange(child);
|
|
115917
|
+
emitTrailingCommentsOfPosition(
|
|
115918
|
+
commentRange.pos,
|
|
115919
|
+
/*prefixSpace*/
|
|
115920
|
+
!!(format & 512 /* SpaceBetweenSiblings */),
|
|
115921
|
+
/*forceNoNewline*/
|
|
115922
|
+
true
|
|
115923
|
+
);
|
|
115924
|
+
}
|
|
115901
115925
|
writeLine(separatingLineTerminatorCount);
|
|
115902
115926
|
shouldEmitInterveningComments = false;
|
|
115903
115927
|
} else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) {
|
|
@@ -123620,19 +123644,22 @@ ${lanes.join("\n")}
|
|
|
123620
123644
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
123621
123645
|
if (length2 <= 1)
|
|
123622
123646
|
return 1;
|
|
123623
|
-
let
|
|
123647
|
+
let indexAfterOsRoot = 1;
|
|
123624
123648
|
let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0;
|
|
123625
123649
|
if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths
|
|
123626
123650
|
pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) {
|
|
123627
123651
|
if (length2 === 2)
|
|
123628
123652
|
return 2;
|
|
123629
|
-
|
|
123653
|
+
indexAfterOsRoot = 2;
|
|
123630
123654
|
isDosStyle = true;
|
|
123631
123655
|
}
|
|
123632
|
-
if (isDosStyle && !pathComponents2[
|
|
123633
|
-
return
|
|
123656
|
+
if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) {
|
|
123657
|
+
return indexAfterOsRoot;
|
|
123658
|
+
}
|
|
123659
|
+
if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) {
|
|
123660
|
+
return indexAfterOsRoot + 1;
|
|
123634
123661
|
}
|
|
123635
|
-
return
|
|
123662
|
+
return indexAfterOsRoot + 2;
|
|
123636
123663
|
}
|
|
123637
123664
|
function canWatchDirectoryOrFile(pathComponents2, length2) {
|
|
123638
123665
|
if (length2 === void 0)
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230915`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -8037,7 +8037,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8037
8037
|
start2 = pos;
|
|
8038
8038
|
continue;
|
|
8039
8039
|
}
|
|
8040
|
-
if (
|
|
8040
|
+
if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {
|
|
8041
8041
|
result += text.substring(start2, pos);
|
|
8042
8042
|
tokenFlags |= 4 /* Unterminated */;
|
|
8043
8043
|
error(Diagnostics.Unterminated_string_literal);
|
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.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20230915",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"mocha-fivemat-progress-reporter": "^0.1.0",
|
|
76
76
|
"ms": "^2.1.3",
|
|
77
77
|
"node-fetch": "^3.2.10",
|
|
78
|
+
"playwright": "^1.38.0",
|
|
78
79
|
"source-map-support": "^0.5.21",
|
|
79
80
|
"tslib": "^2.5.0",
|
|
80
81
|
"typescript": "^5.0.2",
|
|
@@ -112,5 +113,5 @@
|
|
|
112
113
|
"node": "20.1.0",
|
|
113
114
|
"npm": "8.19.4"
|
|
114
115
|
},
|
|
115
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "b3770e78527a379d2345412bbab5acc0bafe0090"
|
|
116
117
|
}
|