@typescript-deploys/pr-build 5.4.0-pr-56908-17 → 5.4.0-pr-56780-8
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.dom.asynciterable.d.ts +28 -0
- package/lib/lib.es2018.full.d.ts +1 -0
- package/lib/lib.es2019.full.d.ts +1 -0
- package/lib/lib.es2020.full.d.ts +1 -0
- package/lib/lib.es2021.full.d.ts +1 -0
- package/lib/lib.es2022.full.d.ts +1 -0
- package/lib/lib.es2023.full.d.ts +1 -0
- package/lib/lib.esnext.full.d.ts +1 -0
- package/lib/lib.webworker.asynciterable.d.ts +28 -0
- package/lib/tsc.js +35 -67
- package/lib/tsserver.js +59 -76
- package/lib/typescript.js +57 -76
- package/lib/typingsInstaller.js +4 -2
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/////////////////////////////
|
|
20
|
+
/// Window Async Iterable APIs
|
|
21
|
+
/////////////////////////////
|
|
22
|
+
|
|
23
|
+
interface FileSystemDirectoryHandle {
|
|
24
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
25
|
+
entries(): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
26
|
+
keys(): AsyncIterableIterator<string>;
|
|
27
|
+
values(): AsyncIterableIterator<FileSystemHandle>;
|
|
28
|
+
}
|
package/lib/lib.es2018.full.d.ts
CHANGED
package/lib/lib.es2019.full.d.ts
CHANGED
package/lib/lib.es2020.full.d.ts
CHANGED
package/lib/lib.es2021.full.d.ts
CHANGED
package/lib/lib.es2022.full.d.ts
CHANGED
package/lib/lib.es2023.full.d.ts
CHANGED
package/lib/lib.esnext.full.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
/////////////////////////////
|
|
20
|
+
/// Worker Async Iterable APIs
|
|
21
|
+
/////////////////////////////
|
|
22
|
+
|
|
23
|
+
interface FileSystemDirectoryHandle {
|
|
24
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
25
|
+
entries(): AsyncIterableIterator<[string, FileSystemHandle]>;
|
|
26
|
+
keys(): AsyncIterableIterator<string>;
|
|
27
|
+
values(): AsyncIterableIterator<FileSystemHandle>;
|
|
28
|
+
}
|
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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -12913,9 +12913,6 @@ function forEachTsConfigPropArray(tsConfigSourceFile, propKey, callback) {
|
|
|
12913
12913
|
function getContainingFunction(node) {
|
|
12914
12914
|
return findAncestor(node.parent, isFunctionLike);
|
|
12915
12915
|
}
|
|
12916
|
-
function getContainingFunctionDeclaration(node) {
|
|
12917
|
-
return findAncestor(node.parent, isFunctionLikeDeclaration);
|
|
12918
|
-
}
|
|
12919
12916
|
function getContainingClass(node) {
|
|
12920
12917
|
return findAncestor(node.parent, isClassLike);
|
|
12921
12918
|
}
|
|
@@ -16084,7 +16081,7 @@ function Symbol4(flags, name) {
|
|
|
16084
16081
|
this.exportSymbol = void 0;
|
|
16085
16082
|
this.constEnumOnlyModule = void 0;
|
|
16086
16083
|
this.isReferenced = void 0;
|
|
16087
|
-
this.
|
|
16084
|
+
this.isAssigned = void 0;
|
|
16088
16085
|
this.links = void 0;
|
|
16089
16086
|
}
|
|
16090
16087
|
function Type3(checker, flags) {
|
|
@@ -17506,6 +17503,13 @@ function hasContextSensitiveParameters(node) {
|
|
|
17506
17503
|
function isInfinityOrNaNString(name) {
|
|
17507
17504
|
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
17508
17505
|
}
|
|
17506
|
+
function isCatchClauseVariableDeclaration(node) {
|
|
17507
|
+
return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */;
|
|
17508
|
+
}
|
|
17509
|
+
function isParameterOrCatchClauseVariable(symbol) {
|
|
17510
|
+
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
17511
|
+
return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration));
|
|
17512
|
+
}
|
|
17509
17513
|
function isFunctionExpressionOrArrowFunction(node) {
|
|
17510
17514
|
return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */;
|
|
17511
17515
|
}
|
|
@@ -33999,9 +34003,11 @@ var libEntries = [
|
|
|
33999
34003
|
// Host only
|
|
34000
34004
|
["dom", "lib.dom.d.ts"],
|
|
34001
34005
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
34006
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
34002
34007
|
["webworker", "lib.webworker.d.ts"],
|
|
34003
34008
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
34004
34009
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
34010
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
34005
34011
|
["scripthost", "lib.scripthost.d.ts"],
|
|
34006
34012
|
// ES2015 Or ESNext By-feature options
|
|
34007
34013
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -52156,7 +52162,7 @@ function createTypeChecker(host) {
|
|
|
52156
52162
|
if (declaration.dotDotDotToken) {
|
|
52157
52163
|
const baseConstraint = mapType(parentType, (t) => t.flags & 58982400 /* InstantiableNonPrimitive */ ? getBaseConstraintOrType(t) : t);
|
|
52158
52164
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
52159
|
-
} else if (isArrayLikeType(parentType)) {
|
|
52165
|
+
} else if (isArrayLikeType(parentType) && !isErrorType(elementType)) {
|
|
52160
52166
|
const indexType = getNumberLiteralType(index);
|
|
52161
52167
|
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
52162
52168
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
@@ -58203,7 +58209,7 @@ function createTypeChecker(host) {
|
|
|
58203
58209
|
}
|
|
58204
58210
|
}
|
|
58205
58211
|
if (!(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */)) {
|
|
58206
|
-
if (objectType.flags &
|
|
58212
|
+
if (objectType.flags & 1 /* Any */ || objectType.flags & 131072 /* Never */ && !(accessFlags & 32 /* ExpressionPosition */)) {
|
|
58207
58213
|
return objectType;
|
|
58208
58214
|
}
|
|
58209
58215
|
const indexInfo = getApplicableIndexInfo(objectType, indexType) || getIndexInfoOfType(objectType, stringType);
|
|
@@ -59049,6 +59055,12 @@ function createTypeChecker(host) {
|
|
|
59049
59055
|
return type;
|
|
59050
59056
|
}
|
|
59051
59057
|
function getESSymbolLikeTypeForNode(node) {
|
|
59058
|
+
if (isInJSFile(node) && isJSDocTypeExpression(node)) {
|
|
59059
|
+
const host2 = getJSDocHost(node);
|
|
59060
|
+
if (host2) {
|
|
59061
|
+
node = getSingleVariableOfVariableStatement(host2) || host2;
|
|
59062
|
+
}
|
|
59063
|
+
}
|
|
59052
59064
|
if (isValidESSymbolDeclaration(node)) {
|
|
59053
59065
|
const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
59054
59066
|
if (symbol) {
|
|
@@ -61993,7 +62005,7 @@ function createTypeChecker(host) {
|
|
|
61993
62005
|
}
|
|
61994
62006
|
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
61995
62007
|
let constraint = getConstraintOfTypeParameter(source2);
|
|
61996
|
-
if (constraint
|
|
62008
|
+
if (constraint) {
|
|
61997
62009
|
while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {
|
|
61998
62010
|
if (result2 = isRelatedTo(
|
|
61999
62011
|
constraint,
|
|
@@ -66150,7 +66162,7 @@ function createTypeChecker(host) {
|
|
|
66150
66162
|
case 80 /* Identifier */:
|
|
66151
66163
|
if (!isThisInTypeQuery(node)) {
|
|
66152
66164
|
const symbol = getResolvedSymbol(node);
|
|
66153
|
-
return isConstantVariable(symbol) ||
|
|
66165
|
+
return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
|
|
66154
66166
|
}
|
|
66155
66167
|
break;
|
|
66156
66168
|
case 211 /* PropertyAccessExpression */:
|
|
@@ -67240,17 +67252,10 @@ function createTypeChecker(host) {
|
|
|
67240
67252
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
67241
67253
|
}
|
|
67242
67254
|
function isSymbolAssigned(symbol) {
|
|
67243
|
-
|
|
67244
|
-
symbol,
|
|
67245
|
-
/*location*/
|
|
67246
|
-
void 0
|
|
67247
|
-
);
|
|
67248
|
-
}
|
|
67249
|
-
function isPastLastAssignment(symbol, location) {
|
|
67250
|
-
const parent = findAncestor(symbol.valueDeclaration, isAssignmentMarkingContainer);
|
|
67251
|
-
if (!parent) {
|
|
67255
|
+
if (!symbol.valueDeclaration) {
|
|
67252
67256
|
return false;
|
|
67253
67257
|
}
|
|
67258
|
+
const parent = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
67254
67259
|
const links = getNodeLinks(parent);
|
|
67255
67260
|
if (!(links.flags & 131072 /* AssignmentsMarked */)) {
|
|
67256
67261
|
links.flags |= 131072 /* AssignmentsMarked */;
|
|
@@ -67258,7 +67263,7 @@ function createTypeChecker(host) {
|
|
|
67258
67263
|
markNodeAssignments(parent);
|
|
67259
67264
|
}
|
|
67260
67265
|
}
|
|
67261
|
-
return
|
|
67266
|
+
return symbol.isAssigned || false;
|
|
67262
67267
|
}
|
|
67263
67268
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
67264
67269
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -67271,60 +67276,23 @@ function createTypeChecker(host) {
|
|
|
67271
67276
|
return some(node.elements, (e) => e.kind !== 232 /* OmittedExpression */ && isSomeSymbolAssignedWorker(e.name));
|
|
67272
67277
|
}
|
|
67273
67278
|
function hasParentWithAssignmentsMarked(node) {
|
|
67274
|
-
return !!findAncestor(node.parent, (node2) =>
|
|
67275
|
-
}
|
|
67276
|
-
function isAssignmentMarkingContainer(node) {
|
|
67277
|
-
return isFunctionLikeDeclaration(node) || isBlock(node) || isSourceFile(node) || isForStatement(node) || isForInOrOfStatement(node) || isCatchClause(node);
|
|
67279
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */));
|
|
67278
67280
|
}
|
|
67279
67281
|
function markNodeAssignments(node) {
|
|
67280
|
-
|
|
67281
|
-
|
|
67282
|
-
|
|
67283
|
-
|
|
67284
|
-
|
|
67285
|
-
|
|
67286
|
-
const symbol = getResolvedSymbol(node2);
|
|
67287
|
-
if (isParameterOrLetOrCatchVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
67288
|
-
const referencingFunction = getContainingFunctionDeclaration(node2) || getSourceFileOfNode(node2);
|
|
67289
|
-
const declaringFunction = getContainingFunctionDeclaration(symbol.valueDeclaration) || getSourceFileOfNode(node2);
|
|
67290
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? statementEnd ?? node2.pos : Number.MAX_VALUE;
|
|
67291
|
-
}
|
|
67292
|
-
}
|
|
67293
|
-
return;
|
|
67294
|
-
case 243 /* VariableStatement */:
|
|
67295
|
-
case 244 /* ExpressionStatement */:
|
|
67296
|
-
case 245 /* IfStatement */:
|
|
67297
|
-
case 246 /* DoStatement */:
|
|
67298
|
-
case 247 /* WhileStatement */:
|
|
67299
|
-
case 248 /* ForStatement */:
|
|
67300
|
-
case 249 /* ForInStatement */:
|
|
67301
|
-
case 250 /* ForOfStatement */:
|
|
67302
|
-
case 254 /* WithStatement */:
|
|
67303
|
-
case 255 /* SwitchStatement */:
|
|
67304
|
-
case 258 /* TryStatement */:
|
|
67305
|
-
case 263 /* ClassDeclaration */:
|
|
67306
|
-
const saveStatementEnd = statementEnd;
|
|
67307
|
-
statementEnd ?? (statementEnd = node2.end);
|
|
67308
|
-
forEachChild(node2, markAssignments);
|
|
67309
|
-
statementEnd = saveStatementEnd;
|
|
67310
|
-
return;
|
|
67311
|
-
case 264 /* InterfaceDeclaration */:
|
|
67312
|
-
case 265 /* TypeAliasDeclaration */:
|
|
67313
|
-
case 266 /* EnumDeclaration */:
|
|
67314
|
-
return;
|
|
67315
|
-
}
|
|
67316
|
-
if (!isTypeNode(node2)) {
|
|
67317
|
-
forEachChild(node2, markAssignments);
|
|
67282
|
+
if (node.kind === 80 /* Identifier */) {
|
|
67283
|
+
if (isAssignmentTarget(node)) {
|
|
67284
|
+
const symbol = getResolvedSymbol(node);
|
|
67285
|
+
if (isParameterOrCatchClauseVariable(symbol)) {
|
|
67286
|
+
symbol.isAssigned = true;
|
|
67287
|
+
}
|
|
67318
67288
|
}
|
|
67289
|
+
} else {
|
|
67290
|
+
forEachChild(node, markNodeAssignments);
|
|
67319
67291
|
}
|
|
67320
67292
|
}
|
|
67321
67293
|
function isConstantVariable(symbol) {
|
|
67322
67294
|
return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0;
|
|
67323
67295
|
}
|
|
67324
|
-
function isParameterOrLetOrCatchVariable(symbol) {
|
|
67325
|
-
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
67326
|
-
return !!(declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (declaration.parent.kind === 299 /* CatchClause */ || declaration.parent.flags & 1 /* Let */)));
|
|
67327
|
-
}
|
|
67328
67296
|
function parameterInitializerContainsUndefined(declaration) {
|
|
67329
67297
|
const links = getNodeLinks(declaration);
|
|
67330
67298
|
if (links.parameterInitializerContainsUndefined === void 0) {
|
|
@@ -67573,7 +67541,7 @@ function createTypeChecker(host) {
|
|
|
67573
67541
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
67574
67542
|
const typeIsAutomatic = type === autoType || type === autoArrayType;
|
|
67575
67543
|
const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */;
|
|
67576
|
-
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType ||
|
|
67544
|
+
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
67577
67545
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
67578
67546
|
}
|
|
67579
67547
|
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
@@ -78765,7 +78733,7 @@ function createTypeChecker(host) {
|
|
|
78765
78733
|
const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
|
|
78766
78734
|
if (inputType === neverType) {
|
|
78767
78735
|
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
|
78768
|
-
return
|
|
78736
|
+
return errorType;
|
|
78769
78737
|
}
|
|
78770
78738
|
const uplevelIteration = languageVersion >= 2 /* ES2015 */;
|
|
78771
78739
|
const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
|
package/lib/tsserver.js
CHANGED
|
@@ -1251,6 +1251,7 @@ __export(server_exports, {
|
|
|
1251
1251
|
isCaseKeyword: () => isCaseKeyword,
|
|
1252
1252
|
isCaseOrDefaultClause: () => isCaseOrDefaultClause,
|
|
1253
1253
|
isCatchClause: () => isCatchClause,
|
|
1254
|
+
isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration,
|
|
1254
1255
|
isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement,
|
|
1255
1256
|
isCheckJsEnabledForFile: () => isCheckJsEnabledForFile,
|
|
1256
1257
|
isChildOfNodeWithKind: () => isChildOfNodeWithKind,
|
|
@@ -1652,6 +1653,7 @@ __export(server_exports, {
|
|
|
1652
1653
|
isPackedArrayLiteral: () => isPackedArrayLiteral,
|
|
1653
1654
|
isParameter: () => isParameter,
|
|
1654
1655
|
isParameterDeclaration: () => isParameterDeclaration,
|
|
1656
|
+
isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable,
|
|
1655
1657
|
isParameterPropertyDeclaration: () => isParameterPropertyDeclaration,
|
|
1656
1658
|
isParameterPropertyModifier: () => isParameterPropertyModifier,
|
|
1657
1659
|
isParenthesizedExpression: () => isParenthesizedExpression,
|
|
@@ -2337,7 +2339,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2337
2339
|
|
|
2338
2340
|
// src/compiler/corePublic.ts
|
|
2339
2341
|
var versionMajorMinor = "5.4";
|
|
2340
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2342
|
+
var version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
2341
2343
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2342
2344
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2343
2345
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -20230,7 +20232,7 @@ function Symbol4(flags, name) {
|
|
|
20230
20232
|
this.exportSymbol = void 0;
|
|
20231
20233
|
this.constEnumOnlyModule = void 0;
|
|
20232
20234
|
this.isReferenced = void 0;
|
|
20233
|
-
this.
|
|
20235
|
+
this.isAssigned = void 0;
|
|
20234
20236
|
this.links = void 0;
|
|
20235
20237
|
}
|
|
20236
20238
|
function Type3(checker, flags) {
|
|
@@ -21702,6 +21704,13 @@ function hasContextSensitiveParameters(node) {
|
|
|
21702
21704
|
function isInfinityOrNaNString(name) {
|
|
21703
21705
|
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
21704
21706
|
}
|
|
21707
|
+
function isCatchClauseVariableDeclaration(node) {
|
|
21708
|
+
return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */;
|
|
21709
|
+
}
|
|
21710
|
+
function isParameterOrCatchClauseVariable(symbol) {
|
|
21711
|
+
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
21712
|
+
return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration));
|
|
21713
|
+
}
|
|
21705
21714
|
function isFunctionExpressionOrArrowFunction(node) {
|
|
21706
21715
|
return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */;
|
|
21707
21716
|
}
|
|
@@ -38413,9 +38422,11 @@ var libEntries = [
|
|
|
38413
38422
|
// Host only
|
|
38414
38423
|
["dom", "lib.dom.d.ts"],
|
|
38415
38424
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
38425
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
38416
38426
|
["webworker", "lib.webworker.d.ts"],
|
|
38417
38427
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
38418
38428
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
38429
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
38419
38430
|
["scripthost", "lib.scripthost.d.ts"],
|
|
38420
38431
|
// ES2015 Or ESNext By-feature options
|
|
38421
38432
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -56870,7 +56881,7 @@ function createTypeChecker(host) {
|
|
|
56870
56881
|
if (declaration.dotDotDotToken) {
|
|
56871
56882
|
const baseConstraint = mapType(parentType, (t) => t.flags & 58982400 /* InstantiableNonPrimitive */ ? getBaseConstraintOrType(t) : t);
|
|
56872
56883
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
56873
|
-
} else if (isArrayLikeType(parentType)) {
|
|
56884
|
+
} else if (isArrayLikeType(parentType) && !isErrorType(elementType)) {
|
|
56874
56885
|
const indexType = getNumberLiteralType(index);
|
|
56875
56886
|
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
56876
56887
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
@@ -62917,7 +62928,7 @@ function createTypeChecker(host) {
|
|
|
62917
62928
|
}
|
|
62918
62929
|
}
|
|
62919
62930
|
if (!(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */)) {
|
|
62920
|
-
if (objectType.flags &
|
|
62931
|
+
if (objectType.flags & 1 /* Any */ || objectType.flags & 131072 /* Never */ && !(accessFlags & 32 /* ExpressionPosition */)) {
|
|
62921
62932
|
return objectType;
|
|
62922
62933
|
}
|
|
62923
62934
|
const indexInfo = getApplicableIndexInfo(objectType, indexType) || getIndexInfoOfType(objectType, stringType);
|
|
@@ -63763,6 +63774,12 @@ function createTypeChecker(host) {
|
|
|
63763
63774
|
return type;
|
|
63764
63775
|
}
|
|
63765
63776
|
function getESSymbolLikeTypeForNode(node) {
|
|
63777
|
+
if (isInJSFile(node) && isJSDocTypeExpression(node)) {
|
|
63778
|
+
const host2 = getJSDocHost(node);
|
|
63779
|
+
if (host2) {
|
|
63780
|
+
node = getSingleVariableOfVariableStatement(host2) || host2;
|
|
63781
|
+
}
|
|
63782
|
+
}
|
|
63766
63783
|
if (isValidESSymbolDeclaration(node)) {
|
|
63767
63784
|
const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
63768
63785
|
if (symbol) {
|
|
@@ -66707,7 +66724,7 @@ function createTypeChecker(host) {
|
|
|
66707
66724
|
}
|
|
66708
66725
|
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
66709
66726
|
let constraint = getConstraintOfTypeParameter(source2);
|
|
66710
|
-
if (constraint
|
|
66727
|
+
if (constraint) {
|
|
66711
66728
|
while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {
|
|
66712
66729
|
if (result2 = isRelatedTo(
|
|
66713
66730
|
constraint,
|
|
@@ -70864,7 +70881,7 @@ function createTypeChecker(host) {
|
|
|
70864
70881
|
case 80 /* Identifier */:
|
|
70865
70882
|
if (!isThisInTypeQuery(node)) {
|
|
70866
70883
|
const symbol = getResolvedSymbol(node);
|
|
70867
|
-
return isConstantVariable(symbol) ||
|
|
70884
|
+
return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
|
|
70868
70885
|
}
|
|
70869
70886
|
break;
|
|
70870
70887
|
case 211 /* PropertyAccessExpression */:
|
|
@@ -71954,17 +71971,10 @@ function createTypeChecker(host) {
|
|
|
71954
71971
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
71955
71972
|
}
|
|
71956
71973
|
function isSymbolAssigned(symbol) {
|
|
71957
|
-
|
|
71958
|
-
symbol,
|
|
71959
|
-
/*location*/
|
|
71960
|
-
void 0
|
|
71961
|
-
);
|
|
71962
|
-
}
|
|
71963
|
-
function isPastLastAssignment(symbol, location) {
|
|
71964
|
-
const parent2 = findAncestor(symbol.valueDeclaration, isAssignmentMarkingContainer);
|
|
71965
|
-
if (!parent2) {
|
|
71974
|
+
if (!symbol.valueDeclaration) {
|
|
71966
71975
|
return false;
|
|
71967
71976
|
}
|
|
71977
|
+
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
71968
71978
|
const links = getNodeLinks(parent2);
|
|
71969
71979
|
if (!(links.flags & 131072 /* AssignmentsMarked */)) {
|
|
71970
71980
|
links.flags |= 131072 /* AssignmentsMarked */;
|
|
@@ -71972,7 +71982,7 @@ function createTypeChecker(host) {
|
|
|
71972
71982
|
markNodeAssignments(parent2);
|
|
71973
71983
|
}
|
|
71974
71984
|
}
|
|
71975
|
-
return
|
|
71985
|
+
return symbol.isAssigned || false;
|
|
71976
71986
|
}
|
|
71977
71987
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
71978
71988
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -71985,60 +71995,23 @@ function createTypeChecker(host) {
|
|
|
71985
71995
|
return some(node.elements, (e) => e.kind !== 232 /* OmittedExpression */ && isSomeSymbolAssignedWorker(e.name));
|
|
71986
71996
|
}
|
|
71987
71997
|
function hasParentWithAssignmentsMarked(node) {
|
|
71988
|
-
return !!findAncestor(node.parent, (node2) =>
|
|
71989
|
-
}
|
|
71990
|
-
function isAssignmentMarkingContainer(node) {
|
|
71991
|
-
return isFunctionLikeDeclaration(node) || isBlock(node) || isSourceFile(node) || isForStatement(node) || isForInOrOfStatement(node) || isCatchClause(node);
|
|
71998
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */));
|
|
71992
71999
|
}
|
|
71993
72000
|
function markNodeAssignments(node) {
|
|
71994
|
-
|
|
71995
|
-
|
|
71996
|
-
|
|
71997
|
-
|
|
71998
|
-
|
|
71999
|
-
|
|
72000
|
-
const symbol = getResolvedSymbol(node2);
|
|
72001
|
-
if (isParameterOrLetOrCatchVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
72002
|
-
const referencingFunction = getContainingFunctionDeclaration(node2) || getSourceFileOfNode(node2);
|
|
72003
|
-
const declaringFunction = getContainingFunctionDeclaration(symbol.valueDeclaration) || getSourceFileOfNode(node2);
|
|
72004
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? statementEnd ?? node2.pos : Number.MAX_VALUE;
|
|
72005
|
-
}
|
|
72006
|
-
}
|
|
72007
|
-
return;
|
|
72008
|
-
case 243 /* VariableStatement */:
|
|
72009
|
-
case 244 /* ExpressionStatement */:
|
|
72010
|
-
case 245 /* IfStatement */:
|
|
72011
|
-
case 246 /* DoStatement */:
|
|
72012
|
-
case 247 /* WhileStatement */:
|
|
72013
|
-
case 248 /* ForStatement */:
|
|
72014
|
-
case 249 /* ForInStatement */:
|
|
72015
|
-
case 250 /* ForOfStatement */:
|
|
72016
|
-
case 254 /* WithStatement */:
|
|
72017
|
-
case 255 /* SwitchStatement */:
|
|
72018
|
-
case 258 /* TryStatement */:
|
|
72019
|
-
case 263 /* ClassDeclaration */:
|
|
72020
|
-
const saveStatementEnd = statementEnd;
|
|
72021
|
-
statementEnd ?? (statementEnd = node2.end);
|
|
72022
|
-
forEachChild(node2, markAssignments);
|
|
72023
|
-
statementEnd = saveStatementEnd;
|
|
72024
|
-
return;
|
|
72025
|
-
case 264 /* InterfaceDeclaration */:
|
|
72026
|
-
case 265 /* TypeAliasDeclaration */:
|
|
72027
|
-
case 266 /* EnumDeclaration */:
|
|
72028
|
-
return;
|
|
72029
|
-
}
|
|
72030
|
-
if (!isTypeNode(node2)) {
|
|
72031
|
-
forEachChild(node2, markAssignments);
|
|
72001
|
+
if (node.kind === 80 /* Identifier */) {
|
|
72002
|
+
if (isAssignmentTarget(node)) {
|
|
72003
|
+
const symbol = getResolvedSymbol(node);
|
|
72004
|
+
if (isParameterOrCatchClauseVariable(symbol)) {
|
|
72005
|
+
symbol.isAssigned = true;
|
|
72006
|
+
}
|
|
72032
72007
|
}
|
|
72008
|
+
} else {
|
|
72009
|
+
forEachChild(node, markNodeAssignments);
|
|
72033
72010
|
}
|
|
72034
72011
|
}
|
|
72035
72012
|
function isConstantVariable(symbol) {
|
|
72036
72013
|
return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0;
|
|
72037
72014
|
}
|
|
72038
|
-
function isParameterOrLetOrCatchVariable(symbol) {
|
|
72039
|
-
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
72040
|
-
return !!(declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (declaration.parent.kind === 299 /* CatchClause */ || declaration.parent.flags & 1 /* Let */)));
|
|
72041
|
-
}
|
|
72042
72015
|
function parameterInitializerContainsUndefined(declaration) {
|
|
72043
72016
|
const links = getNodeLinks(declaration);
|
|
72044
72017
|
if (links.parameterInitializerContainsUndefined === void 0) {
|
|
@@ -72287,7 +72260,7 @@ function createTypeChecker(host) {
|
|
|
72287
72260
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
72288
72261
|
const typeIsAutomatic = type === autoType || type === autoArrayType;
|
|
72289
72262
|
const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */;
|
|
72290
|
-
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType ||
|
|
72263
|
+
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
72291
72264
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
72292
72265
|
}
|
|
72293
72266
|
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
@@ -83479,7 +83452,7 @@ function createTypeChecker(host) {
|
|
|
83479
83452
|
const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
|
|
83480
83453
|
if (inputType === neverType) {
|
|
83481
83454
|
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
|
83482
|
-
return
|
|
83455
|
+
return errorType;
|
|
83483
83456
|
}
|
|
83484
83457
|
const uplevelIteration = languageVersion >= 2 /* ES2015 */;
|
|
83485
83458
|
const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
|
|
@@ -147659,21 +147632,24 @@ __export(ts_CallHierarchy_exports, {
|
|
|
147659
147632
|
function isNamedExpression(node) {
|
|
147660
147633
|
return (isFunctionExpression(node) || isClassExpression(node)) && isNamedDeclaration(node);
|
|
147661
147634
|
}
|
|
147662
|
-
function
|
|
147663
|
-
return (
|
|
147635
|
+
function isVariableLike2(node) {
|
|
147636
|
+
return isPropertyDeclaration(node) || isVariableDeclaration(node);
|
|
147637
|
+
}
|
|
147638
|
+
function isAssignedExpression(node) {
|
|
147639
|
+
return (isFunctionExpression(node) || isArrowFunction(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2 /* Const */) || isPropertyDeclaration(node.parent));
|
|
147664
147640
|
}
|
|
147665
147641
|
function isPossibleCallHierarchyDeclaration(node) {
|
|
147666
147642
|
return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration(node) || isFunctionExpression(node) || isClassDeclaration(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node);
|
|
147667
147643
|
}
|
|
147668
147644
|
function isValidCallHierarchyDeclaration(node) {
|
|
147669
|
-
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) ||
|
|
147645
|
+
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node);
|
|
147670
147646
|
}
|
|
147671
147647
|
function getCallHierarchyDeclarationReferenceNode(node) {
|
|
147672
147648
|
if (isSourceFile(node))
|
|
147673
147649
|
return node;
|
|
147674
147650
|
if (isNamedDeclaration(node))
|
|
147675
147651
|
return node.name;
|
|
147676
|
-
if (
|
|
147652
|
+
if (isAssignedExpression(node))
|
|
147677
147653
|
return node.parent.name;
|
|
147678
147654
|
return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3));
|
|
147679
147655
|
}
|
|
@@ -147703,7 +147679,7 @@ function getCallHierarchyItemName(program, node) {
|
|
|
147703
147679
|
const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : "";
|
|
147704
147680
|
return { text: `${prefix}static {}`, pos, end };
|
|
147705
147681
|
}
|
|
147706
|
-
const declName =
|
|
147682
|
+
const declName = isAssignedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
147707
147683
|
let text = isIdentifier(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0;
|
|
147708
147684
|
if (text === void 0) {
|
|
147709
147685
|
const typeChecker = program.getTypeChecker();
|
|
@@ -147719,8 +147695,11 @@ function getCallHierarchyItemName(program, node) {
|
|
|
147719
147695
|
return { text, pos: declName.getStart(), end: declName.getEnd() };
|
|
147720
147696
|
}
|
|
147721
147697
|
function getCallHierarchItemContainerName(node) {
|
|
147722
|
-
var _a, _b;
|
|
147723
|
-
if (
|
|
147698
|
+
var _a, _b, _c, _d;
|
|
147699
|
+
if (isAssignedExpression(node)) {
|
|
147700
|
+
if (isPropertyDeclaration(node.parent) && isClassLike(node.parent.parent)) {
|
|
147701
|
+
return isClassExpression(node.parent.parent) ? (_a = getAssignedName(node.parent.parent)) == null ? void 0 : _a.getText() : (_b = node.parent.parent.name) == null ? void 0 : _b.getText();
|
|
147702
|
+
}
|
|
147724
147703
|
if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier(node.parent.parent.parent.parent.parent.name)) {
|
|
147725
147704
|
return node.parent.parent.parent.parent.parent.name.getText();
|
|
147726
147705
|
}
|
|
@@ -147731,9 +147710,9 @@ function getCallHierarchItemContainerName(node) {
|
|
|
147731
147710
|
case 178 /* SetAccessor */:
|
|
147732
147711
|
case 174 /* MethodDeclaration */:
|
|
147733
147712
|
if (node.parent.kind === 210 /* ObjectLiteralExpression */) {
|
|
147734
|
-
return (
|
|
147713
|
+
return (_c = getAssignedName(node.parent)) == null ? void 0 : _c.getText();
|
|
147735
147714
|
}
|
|
147736
|
-
return (
|
|
147715
|
+
return (_d = getNameOfDeclaration(node.parent)) == null ? void 0 : _d.getText();
|
|
147737
147716
|
case 262 /* FunctionDeclaration */:
|
|
147738
147717
|
case 263 /* ClassDeclaration */:
|
|
147739
147718
|
case 267 /* ModuleDeclaration */:
|
|
@@ -147806,7 +147785,7 @@ function resolveCallHierarchyDeclaration(program, location) {
|
|
|
147806
147785
|
const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration);
|
|
147807
147786
|
return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor);
|
|
147808
147787
|
}
|
|
147809
|
-
if (
|
|
147788
|
+
if (isVariableLike2(location.parent) && location.parent.initializer && isAssignedExpression(location.parent.initializer)) {
|
|
147810
147789
|
return location.parent.initializer;
|
|
147811
147790
|
}
|
|
147812
147791
|
return void 0;
|
|
@@ -147821,7 +147800,7 @@ function resolveCallHierarchyDeclaration(program, location) {
|
|
|
147821
147800
|
location = location.parent;
|
|
147822
147801
|
continue;
|
|
147823
147802
|
}
|
|
147824
|
-
if (isVariableDeclaration(location) && location.initializer &&
|
|
147803
|
+
if (isVariableDeclaration(location) && location.initializer && isAssignedExpression(location.initializer)) {
|
|
147825
147804
|
return location.initializer;
|
|
147826
147805
|
}
|
|
147827
147806
|
if (!followingSymbol) {
|
|
@@ -153894,7 +153873,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ
|
|
|
153894
153873
|
/*enclosingDeclaration*/
|
|
153895
153874
|
void 0,
|
|
153896
153875
|
/*flags*/
|
|
153897
|
-
|
|
153876
|
+
64 /* UseFullyQualifiedType */
|
|
153898
153877
|
);
|
|
153899
153878
|
return enumMember === void 0 || name === void 0 ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember));
|
|
153900
153879
|
}
|
|
@@ -174956,6 +174935,7 @@ __export(ts_exports2, {
|
|
|
174956
174935
|
isCaseKeyword: () => isCaseKeyword,
|
|
174957
174936
|
isCaseOrDefaultClause: () => isCaseOrDefaultClause,
|
|
174958
174937
|
isCatchClause: () => isCatchClause,
|
|
174938
|
+
isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration,
|
|
174959
174939
|
isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement,
|
|
174960
174940
|
isCheckJsEnabledForFile: () => isCheckJsEnabledForFile,
|
|
174961
174941
|
isChildOfNodeWithKind: () => isChildOfNodeWithKind,
|
|
@@ -175357,6 +175337,7 @@ __export(ts_exports2, {
|
|
|
175357
175337
|
isPackedArrayLiteral: () => isPackedArrayLiteral,
|
|
175358
175338
|
isParameter: () => isParameter,
|
|
175359
175339
|
isParameterDeclaration: () => isParameterDeclaration,
|
|
175340
|
+
isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable,
|
|
175360
175341
|
isParameterPropertyDeclaration: () => isParameterPropertyDeclaration,
|
|
175361
175342
|
isParameterPropertyModifier: () => isParameterPropertyModifier,
|
|
175362
175343
|
isParenthesizedExpression: () => isParenthesizedExpression,
|
|
@@ -189753,6 +189734,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
189753
189734
|
isCaseKeyword,
|
|
189754
189735
|
isCaseOrDefaultClause,
|
|
189755
189736
|
isCatchClause,
|
|
189737
|
+
isCatchClauseVariableDeclaration,
|
|
189756
189738
|
isCatchClauseVariableDeclarationOrBindingElement,
|
|
189757
189739
|
isCheckJsEnabledForFile,
|
|
189758
189740
|
isChildOfNodeWithKind,
|
|
@@ -190154,6 +190136,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
190154
190136
|
isPackedArrayLiteral,
|
|
190155
190137
|
isParameter,
|
|
190156
190138
|
isParameterDeclaration,
|
|
190139
|
+
isParameterOrCatchClauseVariable,
|
|
190157
190140
|
isParameterPropertyDeclaration,
|
|
190158
190141
|
isParameterPropertyModifier,
|
|
190159
190142
|
isParenthesizedExpression,
|
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.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -17522,7 +17522,7 @@ ${lanes.join("\n")}
|
|
|
17522
17522
|
this.exportSymbol = void 0;
|
|
17523
17523
|
this.constEnumOnlyModule = void 0;
|
|
17524
17524
|
this.isReferenced = void 0;
|
|
17525
|
-
this.
|
|
17525
|
+
this.isAssigned = void 0;
|
|
17526
17526
|
this.links = void 0;
|
|
17527
17527
|
}
|
|
17528
17528
|
function Type3(checker, flags) {
|
|
@@ -18701,6 +18701,13 @@ ${lanes.join("\n")}
|
|
|
18701
18701
|
function isInfinityOrNaNString(name) {
|
|
18702
18702
|
return name === "Infinity" || name === "-Infinity" || name === "NaN";
|
|
18703
18703
|
}
|
|
18704
|
+
function isCatchClauseVariableDeclaration(node) {
|
|
18705
|
+
return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */;
|
|
18706
|
+
}
|
|
18707
|
+
function isParameterOrCatchClauseVariable(symbol) {
|
|
18708
|
+
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
18709
|
+
return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration));
|
|
18710
|
+
}
|
|
18704
18711
|
function isFunctionExpressionOrArrowFunction(node) {
|
|
18705
18712
|
return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */;
|
|
18706
18713
|
}
|
|
@@ -37911,9 +37918,11 @@ ${lanes.join("\n")}
|
|
|
37911
37918
|
// Host only
|
|
37912
37919
|
["dom", "lib.dom.d.ts"],
|
|
37913
37920
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
37921
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
37914
37922
|
["webworker", "lib.webworker.d.ts"],
|
|
37915
37923
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
37916
37924
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
37925
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
37917
37926
|
["scripthost", "lib.scripthost.d.ts"],
|
|
37918
37927
|
// ES2015 Or ESNext By-feature options
|
|
37919
37928
|
["es2015.core", "lib.es2015.core.d.ts"],
|
|
@@ -54628,7 +54637,7 @@ ${lanes.join("\n")}
|
|
|
54628
54637
|
if (declaration.dotDotDotToken) {
|
|
54629
54638
|
const baseConstraint = mapType(parentType, (t) => t.flags & 58982400 /* InstantiableNonPrimitive */ ? getBaseConstraintOrType(t) : t);
|
|
54630
54639
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
54631
|
-
} else if (isArrayLikeType(parentType)) {
|
|
54640
|
+
} else if (isArrayLikeType(parentType) && !isErrorType(elementType)) {
|
|
54632
54641
|
const indexType = getNumberLiteralType(index);
|
|
54633
54642
|
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
54634
54643
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
@@ -60675,7 +60684,7 @@ ${lanes.join("\n")}
|
|
|
60675
60684
|
}
|
|
60676
60685
|
}
|
|
60677
60686
|
if (!(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */)) {
|
|
60678
|
-
if (objectType.flags &
|
|
60687
|
+
if (objectType.flags & 1 /* Any */ || objectType.flags & 131072 /* Never */ && !(accessFlags & 32 /* ExpressionPosition */)) {
|
|
60679
60688
|
return objectType;
|
|
60680
60689
|
}
|
|
60681
60690
|
const indexInfo = getApplicableIndexInfo(objectType, indexType) || getIndexInfoOfType(objectType, stringType);
|
|
@@ -61521,6 +61530,12 @@ ${lanes.join("\n")}
|
|
|
61521
61530
|
return type;
|
|
61522
61531
|
}
|
|
61523
61532
|
function getESSymbolLikeTypeForNode(node) {
|
|
61533
|
+
if (isInJSFile(node) && isJSDocTypeExpression(node)) {
|
|
61534
|
+
const host2 = getJSDocHost(node);
|
|
61535
|
+
if (host2) {
|
|
61536
|
+
node = getSingleVariableOfVariableStatement(host2) || host2;
|
|
61537
|
+
}
|
|
61538
|
+
}
|
|
61524
61539
|
if (isValidESSymbolDeclaration(node)) {
|
|
61525
61540
|
const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
61526
61541
|
if (symbol) {
|
|
@@ -64465,7 +64480,7 @@ ${lanes.join("\n")}
|
|
|
64465
64480
|
}
|
|
64466
64481
|
if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) {
|
|
64467
64482
|
let constraint = getConstraintOfTypeParameter(source2);
|
|
64468
|
-
if (constraint
|
|
64483
|
+
if (constraint) {
|
|
64469
64484
|
while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) {
|
|
64470
64485
|
if (result2 = isRelatedTo(
|
|
64471
64486
|
constraint,
|
|
@@ -68622,7 +68637,7 @@ ${lanes.join("\n")}
|
|
|
68622
68637
|
case 80 /* Identifier */:
|
|
68623
68638
|
if (!isThisInTypeQuery(node)) {
|
|
68624
68639
|
const symbol = getResolvedSymbol(node);
|
|
68625
|
-
return isConstantVariable(symbol) ||
|
|
68640
|
+
return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
|
|
68626
68641
|
}
|
|
68627
68642
|
break;
|
|
68628
68643
|
case 211 /* PropertyAccessExpression */:
|
|
@@ -69712,17 +69727,10 @@ ${lanes.join("\n")}
|
|
|
69712
69727
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
69713
69728
|
}
|
|
69714
69729
|
function isSymbolAssigned(symbol) {
|
|
69715
|
-
|
|
69716
|
-
symbol,
|
|
69717
|
-
/*location*/
|
|
69718
|
-
void 0
|
|
69719
|
-
);
|
|
69720
|
-
}
|
|
69721
|
-
function isPastLastAssignment(symbol, location) {
|
|
69722
|
-
const parent2 = findAncestor(symbol.valueDeclaration, isAssignmentMarkingContainer);
|
|
69723
|
-
if (!parent2) {
|
|
69730
|
+
if (!symbol.valueDeclaration) {
|
|
69724
69731
|
return false;
|
|
69725
69732
|
}
|
|
69733
|
+
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
69726
69734
|
const links = getNodeLinks(parent2);
|
|
69727
69735
|
if (!(links.flags & 131072 /* AssignmentsMarked */)) {
|
|
69728
69736
|
links.flags |= 131072 /* AssignmentsMarked */;
|
|
@@ -69730,7 +69738,7 @@ ${lanes.join("\n")}
|
|
|
69730
69738
|
markNodeAssignments(parent2);
|
|
69731
69739
|
}
|
|
69732
69740
|
}
|
|
69733
|
-
return
|
|
69741
|
+
return symbol.isAssigned || false;
|
|
69734
69742
|
}
|
|
69735
69743
|
function isSomeSymbolAssigned(rootDeclaration) {
|
|
69736
69744
|
Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration));
|
|
@@ -69743,60 +69751,23 @@ ${lanes.join("\n")}
|
|
|
69743
69751
|
return some(node.elements, (e) => e.kind !== 232 /* OmittedExpression */ && isSomeSymbolAssignedWorker(e.name));
|
|
69744
69752
|
}
|
|
69745
69753
|
function hasParentWithAssignmentsMarked(node) {
|
|
69746
|
-
return !!findAncestor(node.parent, (node2) =>
|
|
69747
|
-
}
|
|
69748
|
-
function isAssignmentMarkingContainer(node) {
|
|
69749
|
-
return isFunctionLikeDeclaration(node) || isBlock(node) || isSourceFile(node) || isForStatement(node) || isForInOrOfStatement(node) || isCatchClause(node);
|
|
69754
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */));
|
|
69750
69755
|
}
|
|
69751
69756
|
function markNodeAssignments(node) {
|
|
69752
|
-
|
|
69753
|
-
|
|
69754
|
-
|
|
69755
|
-
|
|
69756
|
-
|
|
69757
|
-
|
|
69758
|
-
const symbol = getResolvedSymbol(node2);
|
|
69759
|
-
if (isParameterOrLetOrCatchVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) {
|
|
69760
|
-
const referencingFunction = getContainingFunctionDeclaration(node2) || getSourceFileOfNode(node2);
|
|
69761
|
-
const declaringFunction = getContainingFunctionDeclaration(symbol.valueDeclaration) || getSourceFileOfNode(node2);
|
|
69762
|
-
symbol.lastAssignmentPos = referencingFunction === declaringFunction ? statementEnd ?? node2.pos : Number.MAX_VALUE;
|
|
69763
|
-
}
|
|
69764
|
-
}
|
|
69765
|
-
return;
|
|
69766
|
-
case 243 /* VariableStatement */:
|
|
69767
|
-
case 244 /* ExpressionStatement */:
|
|
69768
|
-
case 245 /* IfStatement */:
|
|
69769
|
-
case 246 /* DoStatement */:
|
|
69770
|
-
case 247 /* WhileStatement */:
|
|
69771
|
-
case 248 /* ForStatement */:
|
|
69772
|
-
case 249 /* ForInStatement */:
|
|
69773
|
-
case 250 /* ForOfStatement */:
|
|
69774
|
-
case 254 /* WithStatement */:
|
|
69775
|
-
case 255 /* SwitchStatement */:
|
|
69776
|
-
case 258 /* TryStatement */:
|
|
69777
|
-
case 263 /* ClassDeclaration */:
|
|
69778
|
-
const saveStatementEnd = statementEnd;
|
|
69779
|
-
statementEnd ?? (statementEnd = node2.end);
|
|
69780
|
-
forEachChild(node2, markAssignments);
|
|
69781
|
-
statementEnd = saveStatementEnd;
|
|
69782
|
-
return;
|
|
69783
|
-
case 264 /* InterfaceDeclaration */:
|
|
69784
|
-
case 265 /* TypeAliasDeclaration */:
|
|
69785
|
-
case 266 /* EnumDeclaration */:
|
|
69786
|
-
return;
|
|
69787
|
-
}
|
|
69788
|
-
if (!isTypeNode(node2)) {
|
|
69789
|
-
forEachChild(node2, markAssignments);
|
|
69757
|
+
if (node.kind === 80 /* Identifier */) {
|
|
69758
|
+
if (isAssignmentTarget(node)) {
|
|
69759
|
+
const symbol = getResolvedSymbol(node);
|
|
69760
|
+
if (isParameterOrCatchClauseVariable(symbol)) {
|
|
69761
|
+
symbol.isAssigned = true;
|
|
69762
|
+
}
|
|
69790
69763
|
}
|
|
69764
|
+
} else {
|
|
69765
|
+
forEachChild(node, markNodeAssignments);
|
|
69791
69766
|
}
|
|
69792
69767
|
}
|
|
69793
69768
|
function isConstantVariable(symbol) {
|
|
69794
69769
|
return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0;
|
|
69795
69770
|
}
|
|
69796
|
-
function isParameterOrLetOrCatchVariable(symbol) {
|
|
69797
|
-
const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
|
|
69798
|
-
return !!(declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (declaration.parent.kind === 299 /* CatchClause */ || declaration.parent.flags & 1 /* Let */)));
|
|
69799
|
-
}
|
|
69800
69771
|
function parameterInitializerContainsUndefined(declaration) {
|
|
69801
69772
|
const links = getNodeLinks(declaration);
|
|
69802
69773
|
if (links.parameterInitializerContainsUndefined === void 0) {
|
|
@@ -70045,7 +70016,7 @@ ${lanes.join("\n")}
|
|
|
70045
70016
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
70046
70017
|
const typeIsAutomatic = type === autoType || type === autoArrayType;
|
|
70047
70018
|
const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */;
|
|
70048
|
-
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType ||
|
|
70019
|
+
while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
70049
70020
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
70050
70021
|
}
|
|
70051
70022
|
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */;
|
|
@@ -81237,7 +81208,7 @@ ${lanes.join("\n")}
|
|
|
81237
81208
|
const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
|
|
81238
81209
|
if (inputType === neverType) {
|
|
81239
81210
|
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
|
81240
|
-
return
|
|
81211
|
+
return errorType;
|
|
81241
81212
|
}
|
|
81242
81213
|
const uplevelIteration = languageVersion >= 2 /* ES2015 */;
|
|
81243
81214
|
const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration;
|
|
@@ -146282,21 +146253,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146282
146253
|
function isNamedExpression(node) {
|
|
146283
146254
|
return (isFunctionExpression(node) || isClassExpression(node)) && isNamedDeclaration(node);
|
|
146284
146255
|
}
|
|
146285
|
-
function
|
|
146286
|
-
return (
|
|
146256
|
+
function isVariableLike2(node) {
|
|
146257
|
+
return isPropertyDeclaration(node) || isVariableDeclaration(node);
|
|
146258
|
+
}
|
|
146259
|
+
function isAssignedExpression(node) {
|
|
146260
|
+
return (isFunctionExpression(node) || isArrowFunction(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2 /* Const */) || isPropertyDeclaration(node.parent));
|
|
146287
146261
|
}
|
|
146288
146262
|
function isPossibleCallHierarchyDeclaration(node) {
|
|
146289
146263
|
return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration(node) || isFunctionExpression(node) || isClassDeclaration(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node);
|
|
146290
146264
|
}
|
|
146291
146265
|
function isValidCallHierarchyDeclaration(node) {
|
|
146292
|
-
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) ||
|
|
146266
|
+
return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node);
|
|
146293
146267
|
}
|
|
146294
146268
|
function getCallHierarchyDeclarationReferenceNode(node) {
|
|
146295
146269
|
if (isSourceFile(node))
|
|
146296
146270
|
return node;
|
|
146297
146271
|
if (isNamedDeclaration(node))
|
|
146298
146272
|
return node.name;
|
|
146299
|
-
if (
|
|
146273
|
+
if (isAssignedExpression(node))
|
|
146300
146274
|
return node.parent.name;
|
|
146301
146275
|
return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3));
|
|
146302
146276
|
}
|
|
@@ -146326,7 +146300,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146326
146300
|
const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : "";
|
|
146327
146301
|
return { text: `${prefix}static {}`, pos, end };
|
|
146328
146302
|
}
|
|
146329
|
-
const declName =
|
|
146303
|
+
const declName = isAssignedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
146330
146304
|
let text = isIdentifier(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0;
|
|
146331
146305
|
if (text === void 0) {
|
|
146332
146306
|
const typeChecker = program.getTypeChecker();
|
|
@@ -146342,8 +146316,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146342
146316
|
return { text, pos: declName.getStart(), end: declName.getEnd() };
|
|
146343
146317
|
}
|
|
146344
146318
|
function getCallHierarchItemContainerName(node) {
|
|
146345
|
-
var _a, _b;
|
|
146346
|
-
if (
|
|
146319
|
+
var _a, _b, _c, _d;
|
|
146320
|
+
if (isAssignedExpression(node)) {
|
|
146321
|
+
if (isPropertyDeclaration(node.parent) && isClassLike(node.parent.parent)) {
|
|
146322
|
+
return isClassExpression(node.parent.parent) ? (_a = getAssignedName(node.parent.parent)) == null ? void 0 : _a.getText() : (_b = node.parent.parent.name) == null ? void 0 : _b.getText();
|
|
146323
|
+
}
|
|
146347
146324
|
if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier(node.parent.parent.parent.parent.parent.name)) {
|
|
146348
146325
|
return node.parent.parent.parent.parent.parent.name.getText();
|
|
146349
146326
|
}
|
|
@@ -146354,9 +146331,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146354
146331
|
case 178 /* SetAccessor */:
|
|
146355
146332
|
case 174 /* MethodDeclaration */:
|
|
146356
146333
|
if (node.parent.kind === 210 /* ObjectLiteralExpression */) {
|
|
146357
|
-
return (
|
|
146334
|
+
return (_c = getAssignedName(node.parent)) == null ? void 0 : _c.getText();
|
|
146358
146335
|
}
|
|
146359
|
-
return (
|
|
146336
|
+
return (_d = getNameOfDeclaration(node.parent)) == null ? void 0 : _d.getText();
|
|
146360
146337
|
case 262 /* FunctionDeclaration */:
|
|
146361
146338
|
case 263 /* ClassDeclaration */:
|
|
146362
146339
|
case 267 /* ModuleDeclaration */:
|
|
@@ -146429,7 +146406,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146429
146406
|
const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration);
|
|
146430
146407
|
return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor);
|
|
146431
146408
|
}
|
|
146432
|
-
if (
|
|
146409
|
+
if (isVariableLike2(location.parent) && location.parent.initializer && isAssignedExpression(location.parent.initializer)) {
|
|
146433
146410
|
return location.parent.initializer;
|
|
146434
146411
|
}
|
|
146435
146412
|
return void 0;
|
|
@@ -146444,7 +146421,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146444
146421
|
location = location.parent;
|
|
146445
146422
|
continue;
|
|
146446
146423
|
}
|
|
146447
|
-
if (isVariableDeclaration(location) && location.initializer &&
|
|
146424
|
+
if (isVariableDeclaration(location) && location.initializer && isAssignedExpression(location.initializer)) {
|
|
146448
146425
|
return location.initializer;
|
|
146449
146426
|
}
|
|
146450
146427
|
if (!followingSymbol) {
|
|
@@ -152639,7 +152616,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
152639
152616
|
/*enclosingDeclaration*/
|
|
152640
152617
|
void 0,
|
|
152641
152618
|
/*flags*/
|
|
152642
|
-
|
|
152619
|
+
64 /* UseFullyQualifiedType */
|
|
152643
152620
|
);
|
|
152644
152621
|
return enumMember === void 0 || name === void 0 ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember));
|
|
152645
152622
|
}
|
|
@@ -186509,6 +186486,7 @@ ${e.message}`;
|
|
|
186509
186486
|
isCaseKeyword: () => isCaseKeyword,
|
|
186510
186487
|
isCaseOrDefaultClause: () => isCaseOrDefaultClause,
|
|
186511
186488
|
isCatchClause: () => isCatchClause,
|
|
186489
|
+
isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration,
|
|
186512
186490
|
isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement,
|
|
186513
186491
|
isCheckJsEnabledForFile: () => isCheckJsEnabledForFile,
|
|
186514
186492
|
isChildOfNodeWithKind: () => isChildOfNodeWithKind,
|
|
@@ -186910,6 +186888,7 @@ ${e.message}`;
|
|
|
186910
186888
|
isPackedArrayLiteral: () => isPackedArrayLiteral,
|
|
186911
186889
|
isParameter: () => isParameter,
|
|
186912
186890
|
isParameterDeclaration: () => isParameterDeclaration,
|
|
186891
|
+
isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable,
|
|
186913
186892
|
isParameterPropertyDeclaration: () => isParameterPropertyDeclaration,
|
|
186914
186893
|
isParameterPropertyModifier: () => isParameterPropertyModifier,
|
|
186915
186894
|
isParenthesizedExpression: () => isParenthesizedExpression,
|
|
@@ -188927,6 +188906,7 @@ ${e.message}`;
|
|
|
188927
188906
|
isCaseKeyword: () => isCaseKeyword,
|
|
188928
188907
|
isCaseOrDefaultClause: () => isCaseOrDefaultClause,
|
|
188929
188908
|
isCatchClause: () => isCatchClause,
|
|
188909
|
+
isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration,
|
|
188930
188910
|
isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement,
|
|
188931
188911
|
isCheckJsEnabledForFile: () => isCheckJsEnabledForFile,
|
|
188932
188912
|
isChildOfNodeWithKind: () => isChildOfNodeWithKind,
|
|
@@ -189328,6 +189308,7 @@ ${e.message}`;
|
|
|
189328
189308
|
isPackedArrayLiteral: () => isPackedArrayLiteral,
|
|
189329
189309
|
isParameter: () => isParameter,
|
|
189330
189310
|
isParameterDeclaration: () => isParameterDeclaration,
|
|
189311
|
+
isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable,
|
|
189331
189312
|
isParameterPropertyDeclaration: () => isParameterPropertyDeclaration,
|
|
189332
189313
|
isParameterPropertyModifier: () => isParameterPropertyModifier,
|
|
189333
189314
|
isParenthesizedExpression: () => isParenthesizedExpression,
|
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.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240102`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -11129,7 +11129,7 @@ function Symbol4(flags, name) {
|
|
|
11129
11129
|
this.exportSymbol = void 0;
|
|
11130
11130
|
this.constEnumOnlyModule = void 0;
|
|
11131
11131
|
this.isReferenced = void 0;
|
|
11132
|
-
this.
|
|
11132
|
+
this.isAssigned = void 0;
|
|
11133
11133
|
this.links = void 0;
|
|
11134
11134
|
}
|
|
11135
11135
|
function Type3(checker, flags) {
|
|
@@ -25859,9 +25859,11 @@ var libEntries = [
|
|
|
25859
25859
|
// Host only
|
|
25860
25860
|
["dom", "lib.dom.d.ts"],
|
|
25861
25861
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
25862
|
+
["dom.asynciterable", "lib.dom.asynciterable.d.ts"],
|
|
25862
25863
|
["webworker", "lib.webworker.d.ts"],
|
|
25863
25864
|
["webworker.importscripts", "lib.webworker.importscripts.d.ts"],
|
|
25864
25865
|
["webworker.iterable", "lib.webworker.iterable.d.ts"],
|
|
25866
|
+
["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"],
|
|
25865
25867
|
["scripthost", "lib.scripthost.d.ts"],
|
|
25866
25868
|
// ES2015 Or ESNext By-feature options
|
|
25867
25869
|
["es2015.core", "lib.es2015.core.d.ts"],
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56780-8",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "a3e8fb1ca240be269ee36cd7368120195972a734"
|
|
118
118
|
}
|