typescript 5.9.0-dev.20250630 → 5.9.0-dev.20250702
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 +137 -50
- package/lib/lib.dom.d.ts +12689 -4227
- package/lib/lib.dom.iterable.d.ts +99 -21
- package/lib/lib.es2022.intl.d.ts +25 -1
- package/lib/lib.webworker.d.ts +3715 -1028
- package/lib/lib.webworker.iterable.d.ts +68 -15
- package/lib/typescript.js +197 -76
- package/package.json +2 -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.9";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20250702`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -6686,7 +6686,7 @@ var Diagnostics = {
|
|
6686
6686
|
Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, 1 /* Error */, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."),
|
6687
6687
|
Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, 1 /* Error */, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."),
|
6688
6688
|
_0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, 1 /* Error */, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),
|
6689
|
-
|
6689
|
+
Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 and above with module {0}."),
|
6690
6690
|
Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
|
6691
6691
|
Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* Error */, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"),
|
6692
6692
|
_0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."),
|
@@ -16081,7 +16081,7 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
16081
16081
|
function getBinaryOperatorPrecedence(kind) {
|
16082
16082
|
switch (kind) {
|
16083
16083
|
case 61 /* QuestionQuestionToken */:
|
16084
|
-
return
|
16084
|
+
return 5 /* Coalesce */;
|
16085
16085
|
case 57 /* BarBarToken */:
|
16086
16086
|
return 5 /* LogicalOR */;
|
16087
16087
|
case 56 /* AmpersandAmpersandToken */:
|
@@ -18334,7 +18334,7 @@ function isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) {
|
|
18334
18334
|
var reservedCharacterPattern = /[^\w\s/]/g;
|
18335
18335
|
var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
18336
18336
|
var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
18337
|
-
var implicitExcludePathRegexPattern = `(?!(
|
18337
|
+
var implicitExcludePathRegexPattern = `(?!(?:${commonPackageFolders.join("|")})(?:/|$))`;
|
18338
18338
|
var filesMatcher = {
|
18339
18339
|
/**
|
18340
18340
|
* Matches any single directory segment unless it is the last segment and a .min.js file
|
@@ -18342,12 +18342,12 @@ var filesMatcher = {
|
|
18342
18342
|
* [^./] # matches everything up to the first . character (excluding directory separators)
|
18343
18343
|
* (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension
|
18344
18344
|
*/
|
18345
|
-
singleAsteriskRegexFragment: "([^./]|(
|
18345
|
+
singleAsteriskRegexFragment: "(?:[^./]|(?:\\.(?!min\\.js$))?)*",
|
18346
18346
|
/**
|
18347
18347
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
18348
18348
|
* files or directories, does not match subdirectories that start with a . character
|
18349
18349
|
*/
|
18350
|
-
doubleAsteriskRegexFragment: `(
|
18350
|
+
doubleAsteriskRegexFragment: `(?:/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,
|
18351
18351
|
replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment)
|
18352
18352
|
};
|
18353
18353
|
var directoriesMatcher = {
|
@@ -18356,12 +18356,12 @@ var directoriesMatcher = {
|
|
18356
18356
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
18357
18357
|
* files or directories, does not match subdirectories that start with a . character
|
18358
18358
|
*/
|
18359
|
-
doubleAsteriskRegexFragment: `(
|
18359
|
+
doubleAsteriskRegexFragment: `(?:/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`,
|
18360
18360
|
replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment)
|
18361
18361
|
};
|
18362
18362
|
var excludeMatcher = {
|
18363
18363
|
singleAsteriskRegexFragment: "[^/]*",
|
18364
|
-
doubleAsteriskRegexFragment: "(
|
18364
|
+
doubleAsteriskRegexFragment: "(?:/.+?)?",
|
18365
18365
|
replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment)
|
18366
18366
|
};
|
18367
18367
|
var wildcardMatchers = {
|
@@ -18374,9 +18374,9 @@ function getRegularExpressionForWildcard(specs, basePath, usage) {
|
|
18374
18374
|
if (!patterns || !patterns.length) {
|
18375
18375
|
return void 0;
|
18376
18376
|
}
|
18377
|
-
const pattern = patterns.map((pattern2) => `(
|
18378
|
-
const terminator = usage === "exclude" ? "(
|
18379
|
-
return `^(
|
18377
|
+
const pattern = patterns.map((pattern2) => `(?:${pattern2})`).join("|");
|
18378
|
+
const terminator = usage === "exclude" ? "(?:$|/)" : "$";
|
18379
|
+
return `^(?:${pattern})${terminator}`;
|
18380
18380
|
}
|
18381
18381
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
18382
18382
|
if (specs === void 0 || specs.length === 0) {
|
@@ -18389,7 +18389,7 @@ function isImplicitGlob(lastPathComponent) {
|
|
18389
18389
|
}
|
18390
18390
|
function getPatternFromSpec(spec, basePath, usage) {
|
18391
18391
|
const pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
18392
|
-
return pattern && `^(
|
18392
|
+
return pattern && `^(?:${pattern})${usage === "exclude" ? "(?:$|/)" : "$"}`;
|
18393
18393
|
}
|
18394
18394
|
function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) {
|
18395
18395
|
let subpattern = "";
|
@@ -18409,7 +18409,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
|
|
18409
18409
|
subpattern += doubleAsteriskRegexFragment;
|
18410
18410
|
} else {
|
18411
18411
|
if (usage === "directories") {
|
18412
|
-
subpattern += "(";
|
18412
|
+
subpattern += "(?:";
|
18413
18413
|
optionalCount++;
|
18414
18414
|
}
|
18415
18415
|
if (hasWrittenComponent) {
|
@@ -18418,7 +18418,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm
|
|
18418
18418
|
if (usage !== "exclude") {
|
18419
18419
|
let componentPattern = "";
|
18420
18420
|
if (component.charCodeAt(0) === 42 /* asterisk */) {
|
18421
|
-
componentPattern += "([^./]" + singleAsteriskRegexFragment + ")?";
|
18421
|
+
componentPattern += "(?:[^./]" + singleAsteriskRegexFragment + ")?";
|
18422
18422
|
component = component.substr(1);
|
18423
18423
|
} else if (component.charCodeAt(0) === 63 /* question */) {
|
18424
18424
|
componentPattern += "[^./]";
|
@@ -31976,10 +31976,13 @@ var Parser;
|
|
31976
31976
|
if (token() !== 27 /* SemicolonToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) {
|
31977
31977
|
return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */));
|
31978
31978
|
}
|
31979
|
+
const savedYieldContext = inYieldContext();
|
31980
|
+
setYieldContext(false);
|
31979
31981
|
const savedTopLevel = topLevel;
|
31980
31982
|
topLevel = false;
|
31981
31983
|
const node = isAsync ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)) : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction));
|
31982
31984
|
topLevel = savedTopLevel;
|
31985
|
+
setYieldContext(savedYieldContext);
|
31983
31986
|
return node;
|
31984
31987
|
}
|
31985
31988
|
function parseConditionalExpressionRest(leftOperand, pos, allowReturnTypeInArrowFunction) {
|
@@ -47224,6 +47227,7 @@ function createTypeChecker(host) {
|
|
47224
47227
|
}
|
47225
47228
|
};
|
47226
47229
|
var anyIterationTypes = createIterationTypes(anyType, anyType, anyType);
|
47230
|
+
var silentNeverIterationTypes = createIterationTypes(silentNeverType, silentNeverType, silentNeverType);
|
47227
47231
|
var asyncIterationTypesResolver = {
|
47228
47232
|
iterableCacheKey: "iterationTypesOfAsyncIterable",
|
47229
47233
|
iteratorCacheKey: "iterationTypesOfAsyncIterator",
|
@@ -50437,7 +50441,14 @@ function createTypeChecker(host) {
|
|
50437
50441
|
if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) {
|
50438
50442
|
return addVisibleAlias(declaration, declaration.parent.parent.parent.parent);
|
50439
50443
|
} else if (symbol.flags & 2 /* BlockScopedVariable */) {
|
50440
|
-
const
|
50444
|
+
const rootDeclaration = walkUpBindingElementsAndPatterns(declaration);
|
50445
|
+
if (rootDeclaration.kind === 170 /* Parameter */) {
|
50446
|
+
return false;
|
50447
|
+
}
|
50448
|
+
const variableStatement = rootDeclaration.parent.parent;
|
50449
|
+
if (variableStatement.kind !== 244 /* VariableStatement */) {
|
50450
|
+
return false;
|
50451
|
+
}
|
50441
50452
|
if (hasSyntacticModifier(variableStatement, 32 /* Export */)) {
|
50442
50453
|
return true;
|
50443
50454
|
}
|
@@ -52131,27 +52142,77 @@ function createTypeChecker(host) {
|
|
52131
52142
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
52132
52143
|
if (propertySymbol.flags & 98304 /* Accessor */) {
|
52133
52144
|
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
52134
|
-
if (
|
52145
|
+
if (!isErrorType(propertyType) && !isErrorType(writeType)) {
|
52135
52146
|
const symbolMapper = getSymbolLinks(propertySymbol).mapper;
|
52136
|
-
const
|
52137
|
-
|
52138
|
-
|
52139
|
-
|
52140
|
-
|
52141
|
-
|
52142
|
-
|
52143
|
-
|
52144
|
-
|
52145
|
-
|
52146
|
-
|
52147
|
-
|
52148
|
-
|
52149
|
-
|
52150
|
-
|
52151
|
-
setterDeclaration
|
52152
|
-
|
52153
|
-
|
52154
|
-
|
52147
|
+
const propDeclaration = getDeclarationOfKind(propertySymbol, 173 /* PropertyDeclaration */);
|
52148
|
+
if (propertyType !== writeType || propertySymbol.parent.flags & 32 /* Class */ && !propDeclaration) {
|
52149
|
+
const getterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* GetAccessor */);
|
52150
|
+
if (getterDeclaration) {
|
52151
|
+
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
52152
|
+
typeElements.push(
|
52153
|
+
setCommentRange2(
|
52154
|
+
context,
|
52155
|
+
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 178 /* GetAccessor */, context, { name: propertyName }),
|
52156
|
+
getterDeclaration
|
52157
|
+
)
|
52158
|
+
);
|
52159
|
+
}
|
52160
|
+
const setterDeclaration = getDeclarationOfKind(propertySymbol, 179 /* SetAccessor */);
|
52161
|
+
if (setterDeclaration) {
|
52162
|
+
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
52163
|
+
typeElements.push(
|
52164
|
+
setCommentRange2(
|
52165
|
+
context,
|
52166
|
+
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 179 /* SetAccessor */, context, { name: propertyName }),
|
52167
|
+
setterDeclaration
|
52168
|
+
)
|
52169
|
+
);
|
52170
|
+
}
|
52171
|
+
return;
|
52172
|
+
}
|
52173
|
+
if (propertySymbol.parent.flags & 32 /* Class */ && propDeclaration && find(propDeclaration.modifiers, isAccessorModifier)) {
|
52174
|
+
const fakeGetterSignature = createSignature(
|
52175
|
+
/*declaration*/
|
52176
|
+
void 0,
|
52177
|
+
/*typeParameters*/
|
52178
|
+
void 0,
|
52179
|
+
/*thisParameter*/
|
52180
|
+
void 0,
|
52181
|
+
emptyArray,
|
52182
|
+
propertyType,
|
52183
|
+
/*resolvedTypePredicate*/
|
52184
|
+
void 0,
|
52185
|
+
0,
|
52186
|
+
0 /* None */
|
52187
|
+
);
|
52188
|
+
typeElements.push(
|
52189
|
+
setCommentRange2(
|
52190
|
+
context,
|
52191
|
+
signatureToSignatureDeclarationHelper(fakeGetterSignature, 178 /* GetAccessor */, context, { name: propertyName }),
|
52192
|
+
propDeclaration
|
52193
|
+
)
|
52194
|
+
);
|
52195
|
+
const setterParam = createSymbol(1 /* FunctionScopedVariable */, "arg");
|
52196
|
+
setterParam.links.type = writeType;
|
52197
|
+
const fakeSetterSignature = createSignature(
|
52198
|
+
/*declaration*/
|
52199
|
+
void 0,
|
52200
|
+
/*typeParameters*/
|
52201
|
+
void 0,
|
52202
|
+
/*thisParameter*/
|
52203
|
+
void 0,
|
52204
|
+
[setterParam],
|
52205
|
+
voidType,
|
52206
|
+
/*resolvedTypePredicate*/
|
52207
|
+
void 0,
|
52208
|
+
0,
|
52209
|
+
0 /* None */
|
52210
|
+
);
|
52211
|
+
typeElements.push(
|
52212
|
+
signatureToSignatureDeclarationHelper(fakeSetterSignature, 179 /* SetAccessor */, context, { name: propertyName })
|
52213
|
+
);
|
52214
|
+
return;
|
52215
|
+
}
|
52155
52216
|
}
|
52156
52217
|
}
|
52157
52218
|
const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
|
@@ -56742,11 +56803,14 @@ function createTypeChecker(host) {
|
|
56742
56803
|
}
|
56743
56804
|
function getWriteTypeOfSymbol(symbol) {
|
56744
56805
|
const checkFlags = getCheckFlags(symbol);
|
56745
|
-
if (
|
56746
|
-
return checkFlags &
|
56806
|
+
if (checkFlags & 2 /* SyntheticProperty */) {
|
56807
|
+
return checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : (
|
56747
56808
|
// NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty
|
56748
56809
|
symbol.links.writeType || symbol.links.type
|
56749
|
-
)
|
56810
|
+
);
|
56811
|
+
}
|
56812
|
+
if (symbol.flags & 4 /* Property */) {
|
56813
|
+
return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */));
|
56750
56814
|
}
|
56751
56815
|
if (symbol.flags & 98304 /* Accessor */) {
|
56752
56816
|
return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);
|
@@ -58902,6 +58966,7 @@ function createTypeChecker(host) {
|
|
58902
58966
|
}
|
58903
58967
|
function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {
|
58904
58968
|
var _a, _b, _c;
|
58969
|
+
let propFlags = 0 /* None */;
|
58905
58970
|
let singleProp;
|
58906
58971
|
let propSet;
|
58907
58972
|
let indexTypes;
|
@@ -58926,6 +58991,7 @@ function createTypeChecker(host) {
|
|
58926
58991
|
}
|
58927
58992
|
if (!singleProp) {
|
58928
58993
|
singleProp = prop;
|
58994
|
+
propFlags = prop.flags & 98304 /* Accessor */ || 4 /* Property */;
|
58929
58995
|
} else if (prop !== singleProp) {
|
58930
58996
|
const isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp);
|
58931
58997
|
if (isInstantiation && compareProperties(singleProp, prop, (a, b) => a === b ? -1 /* True */ : 0 /* False */) === -1 /* True */) {
|
@@ -58940,6 +59006,9 @@ function createTypeChecker(host) {
|
|
58940
59006
|
propSet.set(id, prop);
|
58941
59007
|
}
|
58942
59008
|
}
|
59009
|
+
if (propFlags & 98304 /* Accessor */ && (prop.flags & 98304 /* Accessor */) !== (propFlags & 98304 /* Accessor */)) {
|
59010
|
+
propFlags = propFlags & ~98304 /* Accessor */ | 4 /* Property */;
|
59011
|
+
}
|
58943
59012
|
}
|
58944
59013
|
if (isUnion && isReadonlySymbol(prop)) {
|
58945
59014
|
checkFlags |= 8 /* Readonly */;
|
@@ -58953,6 +59022,7 @@ function createTypeChecker(host) {
|
|
58953
59022
|
} else if (isUnion) {
|
58954
59023
|
const indexInfo = !isLateBoundName(name) && getApplicableIndexInfoForName(type, name);
|
58955
59024
|
if (indexInfo) {
|
59025
|
+
propFlags = propFlags & ~98304 /* Accessor */ | 4 /* Property */;
|
58956
59026
|
checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0);
|
58957
59027
|
indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type);
|
58958
59028
|
} else if (isObjectLiteralType(type) && !(getObjectFlags(type) & 2097152 /* ContainsSpread */)) {
|
@@ -59016,7 +59086,7 @@ function createTypeChecker(host) {
|
|
59016
59086
|
propTypes.push(type);
|
59017
59087
|
}
|
59018
59088
|
addRange(propTypes, indexTypes);
|
59019
|
-
const result = createSymbol(
|
59089
|
+
const result = createSymbol(propFlags | (optionalFlag ?? 0), name, syntheticFlag | checkFlags);
|
59020
59090
|
result.links.containingType = containingType;
|
59021
59091
|
if (!hasNonUniformValueDeclaration && firstValueDeclaration) {
|
59022
59092
|
result.valueDeclaration = firstValueDeclaration;
|
@@ -78649,6 +78719,9 @@ function createTypeChecker(host) {
|
|
78649
78719
|
return { yieldTypes, nextTypes };
|
78650
78720
|
}
|
78651
78721
|
function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) {
|
78722
|
+
if (expressionType === silentNeverType) {
|
78723
|
+
return silentNeverType;
|
78724
|
+
}
|
78652
78725
|
const errorNode = node.expression || node;
|
78653
78726
|
const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType;
|
78654
78727
|
return !isAsync ? yieldedType : getAwaitedType(
|
@@ -79682,17 +79755,27 @@ function createTypeChecker(host) {
|
|
79682
79755
|
}
|
79683
79756
|
}
|
79684
79757
|
function checkNullishCoalesceOperands(node) {
|
79685
|
-
|
79686
|
-
|
79687
|
-
|
79688
|
-
|
79758
|
+
if (node.operatorToken.kind !== 61 /* QuestionQuestionToken */) {
|
79759
|
+
return;
|
79760
|
+
}
|
79761
|
+
if (isBinaryExpression(node.parent)) {
|
79762
|
+
const { left, operatorToken } = node.parent;
|
79763
|
+
if (isBinaryExpression(left) && operatorToken.kind === 57 /* BarBarToken */) {
|
79764
|
+
grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(61 /* QuestionQuestionToken */), tokenToString(operatorToken.kind));
|
79689
79765
|
}
|
79690
|
-
|
79691
|
-
|
79766
|
+
} else if (isBinaryExpression(node.left)) {
|
79767
|
+
const { operatorToken } = node.left;
|
79768
|
+
if (operatorToken.kind === 57 /* BarBarToken */ || operatorToken.kind === 56 /* AmpersandAmpersandToken */) {
|
79769
|
+
grammarErrorOnNode(node.left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(operatorToken.kind), tokenToString(61 /* QuestionQuestionToken */));
|
79770
|
+
}
|
79771
|
+
} else if (isBinaryExpression(node.right)) {
|
79772
|
+
const { operatorToken } = node.right;
|
79773
|
+
if (operatorToken.kind === 56 /* AmpersandAmpersandToken */) {
|
79774
|
+
grammarErrorOnNode(node.right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(61 /* QuestionQuestionToken */), tokenToString(operatorToken.kind));
|
79692
79775
|
}
|
79693
|
-
checkNullishCoalesceOperandLeft(node);
|
79694
|
-
checkNullishCoalesceOperandRight(node);
|
79695
79776
|
}
|
79777
|
+
checkNullishCoalesceOperandLeft(node);
|
79778
|
+
checkNullishCoalesceOperandRight(node);
|
79696
79779
|
}
|
79697
79780
|
function checkNullishCoalesceOperandLeft(node) {
|
79698
79781
|
const leftTarget = skipOuterExpressions(node.left, 63 /* All */);
|
@@ -83731,6 +83814,9 @@ function createTypeChecker(host) {
|
|
83731
83814
|
}
|
83732
83815
|
function getIterationTypesOfIterable(type, use, errorNode) {
|
83733
83816
|
var _a, _b;
|
83817
|
+
if (type === silentNeverType) {
|
83818
|
+
return silentNeverIterationTypes;
|
83819
|
+
}
|
83734
83820
|
if (isTypeAny(type)) {
|
83735
83821
|
return anyIterationTypes;
|
83736
83822
|
}
|
@@ -84456,7 +84542,7 @@ function createTypeChecker(host) {
|
|
84456
84542
|
}
|
84457
84543
|
function checkClassNameCollisionWithObject(name) {
|
84458
84544
|
if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < 5 /* ES2015 */) {
|
84459
|
-
error(name, Diagnostics.
|
84545
|
+
error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0, ModuleKind[moduleKind]);
|
84460
84546
|
}
|
84461
84547
|
}
|
84462
84548
|
function checkUnmatchedJSDocParameters(node) {
|
@@ -128529,7 +128615,7 @@ function getMatchedIncludeSpec(program, fileName) {
|
|
128529
128615
|
const index = findIndex((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => {
|
128530
128616
|
if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false;
|
128531
128617
|
const pattern = getPatternFromSpec(includeSpec, basePath, "files");
|
128532
|
-
return !!pattern && getRegexFromPattern(`(
|
128618
|
+
return !!pattern && getRegexFromPattern(`(?:${pattern})$`, useCaseSensitiveFileNames2).test(fileName);
|
128533
128619
|
});
|
128534
128620
|
return index !== -1 ? configFile.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[index] : void 0;
|
128535
128621
|
}
|
@@ -133464,7 +133550,8 @@ function createSyntacticTypeNodeBuilder(options, resolver) {
|
|
133464
133550
|
function ensureParameter(p, context) {
|
133465
133551
|
return factory.updateParameterDeclaration(
|
133466
133552
|
p,
|
133467
|
-
|
133553
|
+
/*modifiers*/
|
133554
|
+
void 0,
|
133468
133555
|
reuseNode(context, p.dotDotDotToken),
|
133469
133556
|
resolver.serializeNameOfParameter(context, p),
|
133470
133557
|
resolver.isOptionalParameter(p) ? factory.createToken(58 /* QuestionToken */) : void 0,
|