@typescript-deploys/pr-build 5.0.0-pr-52240-9 → 5.0.0-pr-52280-2
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 +198 -118
- package/lib/tsserver.js +244 -136
- package/lib/tsserverlibrary.d.ts +19 -10
- package/lib/tsserverlibrary.js +237 -136
- package/lib/typescript.d.ts +19 -10
- package/lib/typescript.js +230 -136
- package/lib/typingsInstaller.js +75 -42
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
45
|
+
version = `${versionMajorMinor}.0-insiders.20230117`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3900,14 +3900,15 @@ ${lanes.join("\n")}
|
|
|
3900
3900
|
SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag";
|
|
3901
3901
|
SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
|
|
3902
3902
|
SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
|
|
3903
|
-
SyntaxKind5[SyntaxKind5["
|
|
3904
|
-
SyntaxKind5[SyntaxKind5["
|
|
3905
|
-
SyntaxKind5[SyntaxKind5["
|
|
3906
|
-
SyntaxKind5[SyntaxKind5["
|
|
3907
|
-
SyntaxKind5[SyntaxKind5["
|
|
3908
|
-
SyntaxKind5[SyntaxKind5["
|
|
3909
|
-
SyntaxKind5[SyntaxKind5["
|
|
3910
|
-
SyntaxKind5[SyntaxKind5["
|
|
3903
|
+
SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
|
|
3904
|
+
SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList";
|
|
3905
|
+
SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement";
|
|
3906
|
+
SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
|
|
3907
|
+
SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression";
|
|
3908
|
+
SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
|
|
3909
|
+
SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
|
|
3910
|
+
SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
|
|
3911
|
+
SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count";
|
|
3911
3912
|
SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
|
|
3912
3913
|
SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
|
|
3913
3914
|
SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -3936,9 +3937,9 @@ ${lanes.join("\n")}
|
|
|
3936
3937
|
SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
|
|
3937
3938
|
SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
|
|
3938
3939
|
SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
|
|
3939
|
-
SyntaxKind5[SyntaxKind5["LastJSDocNode"] =
|
|
3940
|
+
SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
|
|
3940
3941
|
SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
|
|
3941
|
-
SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] =
|
|
3942
|
+
SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
|
|
3942
3943
|
SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
|
|
3943
3944
|
SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
|
|
3944
3945
|
return SyntaxKind5;
|
|
@@ -7171,7 +7172,6 @@ ${lanes.join("\n")}
|
|
|
7171
7172
|
An_export_declaration_cannot_have_modifiers: diag(1193, 1 /* Error */, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."),
|
|
7172
7173
|
Export_declarations_are_not_permitted_in_a_namespace: diag(1194, 1 /* Error */, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."),
|
|
7173
7174
|
export_Asterisk_does_not_re_export_a_default: diag(1195, 1 /* Error */, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."),
|
|
7174
|
-
Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, 1 /* Error */, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."),
|
|
7175
7175
|
Catch_clause_variable_cannot_have_an_initializer: diag(1197, 1 /* Error */, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."),
|
|
7176
7176
|
An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, 1 /* Error */, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),
|
|
7177
7177
|
Unterminated_Unicode_escape_sequence: diag(1199, 1 /* Error */, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."),
|
|
@@ -9039,7 +9039,8 @@ ${lanes.join("\n")}
|
|
|
9039
9039
|
_0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
9040
9040
|
_0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
9041
9041
|
_0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
9042
|
-
The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here.")
|
|
9042
|
+
The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
9043
|
+
Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string.")
|
|
9043
9044
|
};
|
|
9044
9045
|
}
|
|
9045
9046
|
});
|
|
@@ -11761,6 +11762,9 @@ ${lanes.join("\n")}
|
|
|
11761
11762
|
function getJSDocTemplateTag(node) {
|
|
11762
11763
|
return getFirstJSDocTag(node, isJSDocTemplateTag);
|
|
11763
11764
|
}
|
|
11765
|
+
function getJSDocSatisfiesTag(node) {
|
|
11766
|
+
return getFirstJSDocTag(node, isJSDocSatisfiesTag);
|
|
11767
|
+
}
|
|
11764
11768
|
function getJSDocTypeTag(node) {
|
|
11765
11769
|
const tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
11766
11770
|
if (tag && tag.typeExpression && tag.typeExpression.type) {
|
|
@@ -12320,8 +12324,8 @@ ${lanes.join("\n")}
|
|
|
12320
12324
|
case 227 /* SpreadElement */:
|
|
12321
12325
|
case 231 /* AsExpression */:
|
|
12322
12326
|
case 229 /* OmittedExpression */:
|
|
12323
|
-
case
|
|
12324
|
-
case
|
|
12327
|
+
case 357 /* CommaListExpression */:
|
|
12328
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
12325
12329
|
case 235 /* SatisfiesExpression */:
|
|
12326
12330
|
return true;
|
|
12327
12331
|
default:
|
|
@@ -12506,7 +12510,7 @@ ${lanes.join("\n")}
|
|
|
12506
12510
|
return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */;
|
|
12507
12511
|
}
|
|
12508
12512
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
12509
|
-
return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind ===
|
|
12513
|
+
return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */;
|
|
12510
12514
|
}
|
|
12511
12515
|
function isDeclaration(node) {
|
|
12512
12516
|
if (node.kind === 165 /* TypeParameter */) {
|
|
@@ -12567,13 +12571,13 @@ ${lanes.join("\n")}
|
|
|
12567
12571
|
return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
|
|
12568
12572
|
}
|
|
12569
12573
|
function isJSDocNode(node) {
|
|
12570
|
-
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <=
|
|
12574
|
+
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
|
|
12571
12575
|
}
|
|
12572
12576
|
function isJSDocCommentContainingNode(node) {
|
|
12573
12577
|
return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
|
|
12574
12578
|
}
|
|
12575
12579
|
function isJSDocTag(node) {
|
|
12576
|
-
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <=
|
|
12580
|
+
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
|
|
12577
12581
|
}
|
|
12578
12582
|
function isSetAccessor(node) {
|
|
12579
12583
|
return node.kind === 175 /* SetAccessor */;
|
|
@@ -12993,7 +12997,7 @@ ${lanes.join("\n")}
|
|
|
12993
12997
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
12994
12998
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
12995
12999
|
}
|
|
12996
|
-
if (node.kind ===
|
|
13000
|
+
if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
|
|
12997
13001
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
12998
13002
|
}
|
|
12999
13003
|
return skipTrivia(
|
|
@@ -14859,7 +14863,7 @@ ${lanes.join("\n")}
|
|
|
14859
14863
|
return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
|
|
14860
14864
|
}
|
|
14861
14865
|
function ownsJSDocTag(hostNode, tag) {
|
|
14862
|
-
return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
14866
|
+
return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
14863
14867
|
}
|
|
14864
14868
|
function getNextJSDocCommentLocation(node) {
|
|
14865
14869
|
const parent2 = node.parent;
|
|
@@ -15395,7 +15399,7 @@ ${lanes.join("\n")}
|
|
|
15395
15399
|
}
|
|
15396
15400
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
15397
15401
|
switch (nodeKind) {
|
|
15398
|
-
case
|
|
15402
|
+
case 357 /* CommaListExpression */:
|
|
15399
15403
|
return 0 /* Comma */;
|
|
15400
15404
|
case 227 /* SpreadElement */:
|
|
15401
15405
|
return 1 /* Spread */;
|
|
@@ -16365,14 +16369,23 @@ ${lanes.join("\n")}
|
|
|
16365
16369
|
}
|
|
16366
16370
|
return 0 /* None */;
|
|
16367
16371
|
}
|
|
16372
|
+
function isBinaryLogicalOperator(token) {
|
|
16373
|
+
return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
|
|
16374
|
+
}
|
|
16368
16375
|
function isLogicalOperator(token) {
|
|
16369
|
-
return token
|
|
16376
|
+
return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
|
|
16370
16377
|
}
|
|
16371
16378
|
function isLogicalOrCoalescingAssignmentOperator(token) {
|
|
16372
16379
|
return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
|
|
16373
16380
|
}
|
|
16374
16381
|
function isLogicalOrCoalescingAssignmentExpression(expr) {
|
|
16375
|
-
return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
16382
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
16383
|
+
}
|
|
16384
|
+
function isLogicalOrCoalescingBinaryOperator(token) {
|
|
16385
|
+
return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
|
|
16386
|
+
}
|
|
16387
|
+
function isLogicalOrCoalescingBinaryExpression(expr) {
|
|
16388
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
|
|
16376
16389
|
}
|
|
16377
16390
|
function isAssignmentOperator(token) {
|
|
16378
16391
|
return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
|
|
@@ -17009,7 +17022,7 @@ ${lanes.join("\n")}
|
|
|
17009
17022
|
case 209 /* ElementAccessExpression */:
|
|
17010
17023
|
case 208 /* PropertyAccessExpression */:
|
|
17011
17024
|
case 232 /* NonNullExpression */:
|
|
17012
|
-
case
|
|
17025
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
17013
17026
|
case 235 /* SatisfiesExpression */:
|
|
17014
17027
|
node = node.expression;
|
|
17015
17028
|
continue;
|
|
@@ -18250,7 +18263,7 @@ ${lanes.join("\n")}
|
|
|
18250
18263
|
return parent2.types;
|
|
18251
18264
|
case 186 /* TupleType */:
|
|
18252
18265
|
case 206 /* ArrayLiteralExpression */:
|
|
18253
|
-
case
|
|
18266
|
+
case 357 /* CommaListExpression */:
|
|
18254
18267
|
case 272 /* NamedImports */:
|
|
18255
18268
|
case 276 /* NamedExports */:
|
|
18256
18269
|
return parent2.elements;
|
|
@@ -18435,6 +18448,16 @@ ${lanes.join("\n")}
|
|
|
18435
18448
|
const kind = node.kind;
|
|
18436
18449
|
return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
|
|
18437
18450
|
}
|
|
18451
|
+
function isJSDocSatisfiesExpression(node) {
|
|
18452
|
+
return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
|
|
18453
|
+
}
|
|
18454
|
+
function getJSDocSatisfiesExpressionType(node) {
|
|
18455
|
+
return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
|
|
18456
|
+
}
|
|
18457
|
+
function tryGetJSDocSatisfiesTypeNode(node) {
|
|
18458
|
+
const tag = getJSDocSatisfiesTag(node);
|
|
18459
|
+
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
18460
|
+
}
|
|
18438
18461
|
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
|
|
18439
18462
|
var init_utilities = __esm({
|
|
18440
18463
|
"src/compiler/utilities.ts"() {
|
|
@@ -19653,6 +19676,12 @@ ${lanes.join("\n")}
|
|
|
19653
19676
|
get updateJSDocThrowsTag() {
|
|
19654
19677
|
return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
|
|
19655
19678
|
},
|
|
19679
|
+
get createJSDocSatisfiesTag() {
|
|
19680
|
+
return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
|
|
19681
|
+
},
|
|
19682
|
+
get updateJSDocSatisfiesTag() {
|
|
19683
|
+
return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
|
|
19684
|
+
},
|
|
19656
19685
|
createJSDocEnumTag: createJSDocEnumTag2,
|
|
19657
19686
|
updateJSDocEnumTag,
|
|
19658
19687
|
createJSDocUnknownTag,
|
|
@@ -22812,18 +22841,18 @@ ${lanes.join("\n")}
|
|
|
22812
22841
|
return node;
|
|
22813
22842
|
}
|
|
22814
22843
|
function createSyntaxList3(children) {
|
|
22815
|
-
const node = createBaseNode(
|
|
22844
|
+
const node = createBaseNode(354 /* SyntaxList */);
|
|
22816
22845
|
node._children = children;
|
|
22817
22846
|
return node;
|
|
22818
22847
|
}
|
|
22819
22848
|
function createNotEmittedStatement2(original) {
|
|
22820
|
-
const node = createBaseNode(
|
|
22849
|
+
const node = createBaseNode(355 /* NotEmittedStatement */);
|
|
22821
22850
|
node.original = original;
|
|
22822
22851
|
setTextRange(node, original);
|
|
22823
22852
|
return node;
|
|
22824
22853
|
}
|
|
22825
22854
|
function createPartiallyEmittedExpression2(expression, original) {
|
|
22826
|
-
const node = createBaseNode(
|
|
22855
|
+
const node = createBaseNode(356 /* PartiallyEmittedExpression */);
|
|
22827
22856
|
node.expression = expression;
|
|
22828
22857
|
node.original = original;
|
|
22829
22858
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -22845,7 +22874,7 @@ ${lanes.join("\n")}
|
|
|
22845
22874
|
return node;
|
|
22846
22875
|
}
|
|
22847
22876
|
function createCommaListExpression(elements) {
|
|
22848
|
-
const node = createBaseNode(
|
|
22877
|
+
const node = createBaseNode(357 /* CommaListExpression */);
|
|
22849
22878
|
node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements));
|
|
22850
22879
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
22851
22880
|
return node;
|
|
@@ -22854,19 +22883,19 @@ ${lanes.join("\n")}
|
|
|
22854
22883
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
22855
22884
|
}
|
|
22856
22885
|
function createEndOfDeclarationMarker(original) {
|
|
22857
|
-
const node = createBaseNode(
|
|
22886
|
+
const node = createBaseNode(359 /* EndOfDeclarationMarker */);
|
|
22858
22887
|
node.emitNode = {};
|
|
22859
22888
|
node.original = original;
|
|
22860
22889
|
return node;
|
|
22861
22890
|
}
|
|
22862
22891
|
function createMergeDeclarationMarker(original) {
|
|
22863
|
-
const node = createBaseNode(
|
|
22892
|
+
const node = createBaseNode(358 /* MergeDeclarationMarker */);
|
|
22864
22893
|
node.emitNode = {};
|
|
22865
22894
|
node.original = original;
|
|
22866
22895
|
return node;
|
|
22867
22896
|
}
|
|
22868
22897
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
22869
|
-
const node = createBaseNode(
|
|
22898
|
+
const node = createBaseNode(360 /* SyntheticReferenceExpression */);
|
|
22870
22899
|
node.expression = expression;
|
|
22871
22900
|
node.thisArg = thisArg;
|
|
22872
22901
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -23106,7 +23135,7 @@ ${lanes.join("\n")}
|
|
|
23106
23135
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
23107
23136
|
case 232 /* NonNullExpression */:
|
|
23108
23137
|
return updateNonNullExpression2(outerExpression, expression);
|
|
23109
|
-
case
|
|
23138
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
23110
23139
|
return updatePartiallyEmittedExpression2(outerExpression, expression);
|
|
23111
23140
|
}
|
|
23112
23141
|
}
|
|
@@ -23640,7 +23669,7 @@ ${lanes.join("\n")}
|
|
|
23640
23669
|
case 213 /* TypeAssertionExpression */:
|
|
23641
23670
|
case 235 /* SatisfiesExpression */:
|
|
23642
23671
|
case 231 /* AsExpression */:
|
|
23643
|
-
case
|
|
23672
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
23644
23673
|
case 214 /* ParenthesizedExpression */:
|
|
23645
23674
|
case 106 /* SuperKeyword */:
|
|
23646
23675
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -25308,10 +25337,10 @@ ${lanes.join("\n")}
|
|
|
25308
25337
|
return node.kind === 234 /* SyntheticExpression */;
|
|
25309
25338
|
}
|
|
25310
25339
|
function isPartiallyEmittedExpression(node) {
|
|
25311
|
-
return node.kind ===
|
|
25340
|
+
return node.kind === 356 /* PartiallyEmittedExpression */;
|
|
25312
25341
|
}
|
|
25313
25342
|
function isCommaListExpression(node) {
|
|
25314
|
-
return node.kind ===
|
|
25343
|
+
return node.kind === 357 /* CommaListExpression */;
|
|
25315
25344
|
}
|
|
25316
25345
|
function isTemplateSpan(node) {
|
|
25317
25346
|
return node.kind === 236 /* TemplateSpan */;
|
|
@@ -25455,16 +25484,16 @@ ${lanes.join("\n")}
|
|
|
25455
25484
|
return node.kind === 279 /* MissingDeclaration */;
|
|
25456
25485
|
}
|
|
25457
25486
|
function isNotEmittedStatement(node) {
|
|
25458
|
-
return node.kind ===
|
|
25487
|
+
return node.kind === 355 /* NotEmittedStatement */;
|
|
25459
25488
|
}
|
|
25460
25489
|
function isSyntheticReference(node) {
|
|
25461
|
-
return node.kind ===
|
|
25490
|
+
return node.kind === 360 /* SyntheticReferenceExpression */;
|
|
25462
25491
|
}
|
|
25463
25492
|
function isMergeDeclarationMarker(node) {
|
|
25464
|
-
return node.kind ===
|
|
25493
|
+
return node.kind === 358 /* MergeDeclarationMarker */;
|
|
25465
25494
|
}
|
|
25466
25495
|
function isEndOfDeclarationMarker(node) {
|
|
25467
|
-
return node.kind ===
|
|
25496
|
+
return node.kind === 359 /* EndOfDeclarationMarker */;
|
|
25468
25497
|
}
|
|
25469
25498
|
function isExternalModuleReference(node) {
|
|
25470
25499
|
return node.kind === 280 /* ExternalModuleReference */;
|
|
@@ -25655,11 +25684,14 @@ ${lanes.join("\n")}
|
|
|
25655
25684
|
function isJSDocImplementsTag(node) {
|
|
25656
25685
|
return node.kind === 332 /* JSDocImplementsTag */;
|
|
25657
25686
|
}
|
|
25687
|
+
function isJSDocSatisfiesTag(node) {
|
|
25688
|
+
return node.kind === 353 /* JSDocSatisfiesTag */;
|
|
25689
|
+
}
|
|
25658
25690
|
function isJSDocThrowsTag(node) {
|
|
25659
25691
|
return node.kind === 352 /* JSDocThrowsTag */;
|
|
25660
25692
|
}
|
|
25661
25693
|
function isSyntaxList(n) {
|
|
25662
|
-
return n.kind ===
|
|
25694
|
+
return n.kind === 354 /* SyntaxList */;
|
|
25663
25695
|
}
|
|
25664
25696
|
var init_nodeTests = __esm({
|
|
25665
25697
|
"src/compiler/factory/nodeTests.ts"() {
|
|
@@ -26033,7 +26065,7 @@ ${lanes.join("\n")}
|
|
|
26033
26065
|
return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
|
|
26034
26066
|
}
|
|
26035
26067
|
function isCommaSequence(node) {
|
|
26036
|
-
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind ===
|
|
26068
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
|
|
26037
26069
|
}
|
|
26038
26070
|
function isJSDocTypeAssertion(node) {
|
|
26039
26071
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -26056,7 +26088,7 @@ ${lanes.join("\n")}
|
|
|
26056
26088
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
26057
26089
|
case 232 /* NonNullExpression */:
|
|
26058
26090
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
26059
|
-
case
|
|
26091
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
26060
26092
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
26061
26093
|
}
|
|
26062
26094
|
return false;
|
|
@@ -27465,7 +27497,7 @@ ${lanes.join("\n")}
|
|
|
27465
27497
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
27466
27498
|
return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
|
|
27467
27499
|
},
|
|
27468
|
-
[
|
|
27500
|
+
[357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
27469
27501
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
27470
27502
|
},
|
|
27471
27503
|
[281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -27537,6 +27569,7 @@ ${lanes.join("\n")}
|
|
|
27537
27569
|
[347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27538
27570
|
[346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27539
27571
|
[343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27572
|
+
[353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27540
27573
|
[352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27541
27574
|
[342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27542
27575
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
@@ -27556,7 +27589,7 @@ ${lanes.join("\n")}
|
|
|
27556
27589
|
[339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
27557
27590
|
[334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
27558
27591
|
[340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
27559
|
-
[
|
|
27592
|
+
[356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
27560
27593
|
};
|
|
27561
27594
|
((Parser2) => {
|
|
27562
27595
|
const scanner2 = createScanner(
|
|
@@ -33449,6 +33482,9 @@ ${lanes.join("\n")}
|
|
|
33449
33482
|
case "overload":
|
|
33450
33483
|
tag = parseOverloadTag(start2, tagName, margin, indentText);
|
|
33451
33484
|
break;
|
|
33485
|
+
case "satisfies":
|
|
33486
|
+
tag = parseSatisfiesTag(start2, tagName, margin, indentText);
|
|
33487
|
+
break;
|
|
33452
33488
|
case "see":
|
|
33453
33489
|
tag = parseSeeTag(start2, tagName, margin, indentText);
|
|
33454
33490
|
break;
|
|
@@ -33757,6 +33793,14 @@ ${lanes.join("\n")}
|
|
|
33757
33793
|
const className = parseExpressionWithTypeArgumentsForAugments();
|
|
33758
33794
|
return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
|
|
33759
33795
|
}
|
|
33796
|
+
function parseSatisfiesTag(start2, tagName, margin, indentText) {
|
|
33797
|
+
const typeExpression = parseJSDocTypeExpression(
|
|
33798
|
+
/*mayOmitBraces*/
|
|
33799
|
+
false
|
|
33800
|
+
);
|
|
33801
|
+
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
33802
|
+
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
|
|
33803
|
+
}
|
|
33760
33804
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
33761
33805
|
const usedBrace = parseOptional(18 /* OpenBraceToken */);
|
|
33762
33806
|
const pos = getNodePos();
|
|
@@ -35662,7 +35706,7 @@ ${lanes.join("\n")}
|
|
|
35662
35706
|
const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
|
|
35663
35707
|
json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
|
|
35664
35708
|
let extendedConfigPath;
|
|
35665
|
-
if (json.extends) {
|
|
35709
|
+
if (json.extends || json.extends === "") {
|
|
35666
35710
|
if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
|
|
35667
35711
|
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
|
|
35668
35712
|
} else {
|
|
@@ -35789,7 +35833,11 @@ ${lanes.join("\n")}
|
|
|
35789
35833
|
if (resolved.resolvedModule) {
|
|
35790
35834
|
return resolved.resolvedModule.resolvedFileName;
|
|
35791
35835
|
}
|
|
35792
|
-
|
|
35836
|
+
if (extendedConfig === "") {
|
|
35837
|
+
errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
|
|
35838
|
+
} else {
|
|
35839
|
+
errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
|
|
35840
|
+
}
|
|
35793
35841
|
return void 0;
|
|
35794
35842
|
}
|
|
35795
35843
|
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
|
|
@@ -41036,13 +41084,12 @@ ${lanes.join("\n")}
|
|
|
41036
41084
|
} else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
|
|
41037
41085
|
node = node.operand;
|
|
41038
41086
|
} else {
|
|
41039
|
-
return
|
|
41087
|
+
return isLogicalOrCoalescingBinaryExpression(node);
|
|
41040
41088
|
}
|
|
41041
41089
|
}
|
|
41042
41090
|
}
|
|
41043
41091
|
function isLogicalAssignmentExpression(node) {
|
|
41044
|
-
|
|
41045
|
-
return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
|
|
41092
|
+
return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
|
|
41046
41093
|
}
|
|
41047
41094
|
function isTopLevelLogicalExpression(node) {
|
|
41048
41095
|
while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
|
|
@@ -41425,7 +41472,7 @@ ${lanes.join("\n")}
|
|
|
41425
41472
|
};
|
|
41426
41473
|
}
|
|
41427
41474
|
const operator = node.operatorToken.kind;
|
|
41428
|
-
if (operator
|
|
41475
|
+
if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
|
|
41429
41476
|
if (isTopLevelLogicalExpression(node)) {
|
|
41430
41477
|
const postExpressionLabel = createBranchLabel();
|
|
41431
41478
|
bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
|
|
@@ -52147,12 +52194,9 @@ ${lanes.join("\n")}
|
|
|
52147
52194
|
}
|
|
52148
52195
|
const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);
|
|
52149
52196
|
const isOptional = includeOptionality && isOptionalDeclaration(declaration);
|
|
52150
|
-
|
|
52151
|
-
if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
|
|
52152
|
-
|
|
52153
|
-
return isTypeAny(declaredType) || declaredType === unknownType ? declaredType : errorType;
|
|
52154
|
-
}
|
|
52155
|
-
declaredType = useUnknownInCatchVariables ? unknownType : anyType;
|
|
52197
|
+
const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
52198
|
+
if (!declaredType && isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
|
|
52199
|
+
return useUnknownInCatchVariables ? unknownType : anyType;
|
|
52156
52200
|
}
|
|
52157
52201
|
if (declaredType) {
|
|
52158
52202
|
return addOptionality(declaredType, isProperty, isOptional);
|
|
@@ -67320,7 +67364,7 @@ ${lanes.join("\n")}
|
|
|
67320
67364
|
}
|
|
67321
67365
|
}
|
|
67322
67366
|
function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
|
|
67323
|
-
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
67367
|
+
const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
|
|
67324
67368
|
if (typeNode) {
|
|
67325
67369
|
return getTypeFromTypeNode(typeNode);
|
|
67326
67370
|
}
|
|
@@ -67929,8 +67973,16 @@ ${lanes.join("\n")}
|
|
|
67929
67973
|
Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */);
|
|
67930
67974
|
return getContextualTypeForSubstitutionExpression(parent2.parent, node);
|
|
67931
67975
|
case 214 /* ParenthesizedExpression */: {
|
|
67932
|
-
|
|
67933
|
-
|
|
67976
|
+
if (isInJSFile(parent2)) {
|
|
67977
|
+
if (isJSDocSatisfiesExpression(parent2)) {
|
|
67978
|
+
return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2));
|
|
67979
|
+
}
|
|
67980
|
+
const typeTag = getJSDocTypeTag(parent2);
|
|
67981
|
+
if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
|
|
67982
|
+
return getTypeFromTypeNode(typeTag.typeExpression.type);
|
|
67983
|
+
}
|
|
67984
|
+
}
|
|
67985
|
+
return getContextualType2(parent2, contextFlags);
|
|
67934
67986
|
}
|
|
67935
67987
|
case 232 /* NonNullExpression */:
|
|
67936
67988
|
return getContextualType2(parent2, contextFlags);
|
|
@@ -72134,12 +72186,15 @@ ${lanes.join("\n")}
|
|
|
72134
72186
|
}
|
|
72135
72187
|
function checkSatisfiesExpression(node) {
|
|
72136
72188
|
checkSourceElement(node.type);
|
|
72137
|
-
|
|
72138
|
-
|
|
72189
|
+
return checkSatisfiesExpressionWorker(node.expression, node.type);
|
|
72190
|
+
}
|
|
72191
|
+
function checkSatisfiesExpressionWorker(expression, target, checkMode) {
|
|
72192
|
+
const exprType = checkExpression(expression, checkMode);
|
|
72193
|
+
const targetType = getTypeFromTypeNode(target);
|
|
72139
72194
|
if (isErrorType(targetType)) {
|
|
72140
72195
|
return targetType;
|
|
72141
72196
|
}
|
|
72142
|
-
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType,
|
|
72197
|
+
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
|
|
72143
72198
|
return exprType;
|
|
72144
72199
|
}
|
|
72145
72200
|
function checkMetaProperty(node) {
|
|
@@ -73546,12 +73601,12 @@ ${lanes.join("\n")}
|
|
|
73546
73601
|
void 0
|
|
73547
73602
|
);
|
|
73548
73603
|
const operator = operatorToken.kind;
|
|
73549
|
-
if (operator
|
|
73550
|
-
|
|
73551
|
-
|
|
73552
|
-
|
|
73553
|
-
|
|
73554
|
-
|
|
73604
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
73605
|
+
let parent2 = node.parent;
|
|
73606
|
+
while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) {
|
|
73607
|
+
parent2 = parent2.parent;
|
|
73608
|
+
}
|
|
73609
|
+
if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) {
|
|
73555
73610
|
checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0);
|
|
73556
73611
|
}
|
|
73557
73612
|
checkTruthinessOfType(leftType, node.left);
|
|
@@ -73628,7 +73683,7 @@ ${lanes.join("\n")}
|
|
|
73628
73683
|
return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
|
|
73629
73684
|
}
|
|
73630
73685
|
let leftType;
|
|
73631
|
-
if (operator
|
|
73686
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
73632
73687
|
leftType = checkTruthinessExpression(left, checkMode);
|
|
73633
73688
|
} else {
|
|
73634
73689
|
leftType = checkExpression(left, checkMode);
|
|
@@ -74171,6 +74226,12 @@ ${lanes.join("\n")}
|
|
|
74171
74226
|
}
|
|
74172
74227
|
function checkDeclarationInitializer(declaration, checkMode, contextualType) {
|
|
74173
74228
|
const initializer = getEffectiveInitializer(declaration);
|
|
74229
|
+
if (isInJSFile(declaration)) {
|
|
74230
|
+
const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
|
|
74231
|
+
if (typeNode) {
|
|
74232
|
+
return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
|
|
74233
|
+
}
|
|
74234
|
+
}
|
|
74174
74235
|
const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
|
|
74175
74236
|
initializer,
|
|
74176
74237
|
contextualType,
|
|
@@ -74498,9 +74559,14 @@ ${lanes.join("\n")}
|
|
|
74498
74559
|
}
|
|
74499
74560
|
}
|
|
74500
74561
|
function checkParenthesizedExpression(node, checkMode) {
|
|
74501
|
-
if (hasJSDocNodes(node)
|
|
74502
|
-
|
|
74503
|
-
|
|
74562
|
+
if (hasJSDocNodes(node)) {
|
|
74563
|
+
if (isJSDocSatisfiesExpression(node)) {
|
|
74564
|
+
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
74565
|
+
}
|
|
74566
|
+
if (isJSDocTypeAssertion(node)) {
|
|
74567
|
+
const type = getJSDocTypeAssertionType(node);
|
|
74568
|
+
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
74569
|
+
}
|
|
74504
74570
|
}
|
|
74505
74571
|
return checkExpression(node.expression, checkMode);
|
|
74506
74572
|
}
|
|
@@ -76202,6 +76268,19 @@ ${lanes.join("\n")}
|
|
|
76202
76268
|
function checkJSDocTypeTag(node) {
|
|
76203
76269
|
checkSourceElement(node.typeExpression);
|
|
76204
76270
|
}
|
|
76271
|
+
function checkJSDocSatisfiesTag(node) {
|
|
76272
|
+
checkSourceElement(node.typeExpression);
|
|
76273
|
+
const host2 = getEffectiveJSDocHost(node);
|
|
76274
|
+
if (host2) {
|
|
76275
|
+
const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
|
|
76276
|
+
if (length(tags) > 1) {
|
|
76277
|
+
for (let i = 1; i < length(tags); i++) {
|
|
76278
|
+
const tagName = tags[i].tagName;
|
|
76279
|
+
error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
|
|
76280
|
+
}
|
|
76281
|
+
}
|
|
76282
|
+
}
|
|
76283
|
+
}
|
|
76205
76284
|
function checkJSDocLinkLikeTag(node) {
|
|
76206
76285
|
if (node.name) {
|
|
76207
76286
|
resolveJSDocMemberName(
|
|
@@ -76987,15 +77066,24 @@ ${lanes.join("\n")}
|
|
|
76987
77066
|
function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
|
|
76988
77067
|
if (!strictNullChecks)
|
|
76989
77068
|
return;
|
|
76990
|
-
|
|
76991
|
-
|
|
76992
|
-
|
|
76993
|
-
helper(
|
|
77069
|
+
bothHelper(condExpr, body);
|
|
77070
|
+
function bothHelper(condExpr2, body2) {
|
|
77071
|
+
condExpr2 = skipParentheses(condExpr2);
|
|
77072
|
+
helper(condExpr2, body2);
|
|
77073
|
+
while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
|
|
77074
|
+
condExpr2 = skipParentheses(condExpr2.left);
|
|
77075
|
+
helper(condExpr2, body2);
|
|
77076
|
+
}
|
|
76994
77077
|
}
|
|
76995
77078
|
function helper(condExpr2, body2) {
|
|
76996
|
-
const location =
|
|
76997
|
-
if (isModuleExportsAccessExpression(location))
|
|
77079
|
+
const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
|
|
77080
|
+
if (isModuleExportsAccessExpression(location)) {
|
|
76998
77081
|
return;
|
|
77082
|
+
}
|
|
77083
|
+
if (isLogicalOrCoalescingBinaryExpression(location)) {
|
|
77084
|
+
bothHelper(location, body2);
|
|
77085
|
+
return;
|
|
77086
|
+
}
|
|
76999
77087
|
const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
|
|
77000
77088
|
const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion3(location.expression);
|
|
77001
77089
|
if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
|
|
@@ -77005,7 +77093,7 @@ ${lanes.join("\n")}
|
|
|
77005
77093
|
if (callSignatures.length === 0 && !isPromise) {
|
|
77006
77094
|
return;
|
|
77007
77095
|
}
|
|
77008
|
-
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name :
|
|
77096
|
+
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
|
|
77009
77097
|
const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
|
|
77010
77098
|
if (!testedSymbol && !isPromise) {
|
|
77011
77099
|
return;
|
|
@@ -77964,13 +78052,7 @@ ${lanes.join("\n")}
|
|
|
77964
78052
|
if (catchClause.variableDeclaration) {
|
|
77965
78053
|
const declaration = catchClause.variableDeclaration;
|
|
77966
78054
|
checkVariableLikeDeclaration(declaration);
|
|
77967
|
-
|
|
77968
|
-
if (typeNode) {
|
|
77969
|
-
const type = getTypeFromTypeNode(typeNode);
|
|
77970
|
-
if (type && !(type.flags & 3 /* AnyOrUnknown */)) {
|
|
77971
|
-
grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
|
|
77972
|
-
}
|
|
77973
|
-
} else if (declaration.initializer) {
|
|
78055
|
+
if (declaration.initializer) {
|
|
77974
78056
|
grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
|
|
77975
78057
|
} else {
|
|
77976
78058
|
const blockLocals = catchClause.block.locals;
|
|
@@ -79802,6 +79884,8 @@ ${lanes.join("\n")}
|
|
|
79802
79884
|
case 338 /* JSDocProtectedTag */:
|
|
79803
79885
|
case 337 /* JSDocPrivateTag */:
|
|
79804
79886
|
return checkJSDocAccessibilityModifiers(node);
|
|
79887
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
79888
|
+
return checkJSDocSatisfiesTag(node);
|
|
79805
79889
|
case 196 /* IndexedAccessType */:
|
|
79806
79890
|
return checkIndexedAccessType(node);
|
|
79807
79891
|
case 197 /* MappedType */:
|
|
@@ -84757,13 +84841,13 @@ ${lanes.join("\n")}
|
|
|
84757
84841
|
);
|
|
84758
84842
|
},
|
|
84759
84843
|
// Transformation nodes
|
|
84760
|
-
[
|
|
84844
|
+
[356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84761
84845
|
return context.factory.updatePartiallyEmittedExpression(
|
|
84762
84846
|
node,
|
|
84763
84847
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
84764
84848
|
);
|
|
84765
84849
|
},
|
|
84766
|
-
[
|
|
84850
|
+
[357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
84767
84851
|
return context.factory.updateCommaListExpression(
|
|
84768
84852
|
node,
|
|
84769
84853
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -91579,7 +91663,7 @@ ${lanes.join("\n")}
|
|
|
91579
91663
|
return visitObjectLiteralExpression(node);
|
|
91580
91664
|
case 223 /* BinaryExpression */:
|
|
91581
91665
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
91582
|
-
case
|
|
91666
|
+
case 357 /* CommaListExpression */:
|
|
91583
91667
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
91584
91668
|
case 295 /* CatchClause */:
|
|
91585
91669
|
return visitCatchClause(node);
|
|
@@ -93029,15 +93113,10 @@ ${lanes.join("\n")}
|
|
|
93029
93113
|
if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
|
|
93030
93114
|
return node;
|
|
93031
93115
|
}
|
|
93032
|
-
|
|
93033
|
-
|
|
93034
|
-
const binaryExpression = node;
|
|
93035
|
-
if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
|
|
93036
|
-
return transformLogicalAssignment(binaryExpression);
|
|
93037
|
-
}
|
|
93038
|
-
default:
|
|
93039
|
-
return visitEachChild(node, visitor, context);
|
|
93116
|
+
if (isLogicalOrCoalescingAssignmentExpression(node)) {
|
|
93117
|
+
return transformLogicalAssignment(node);
|
|
93040
93118
|
}
|
|
93119
|
+
return visitEachChild(node, visitor, context);
|
|
93041
93120
|
}
|
|
93042
93121
|
function transformLogicalAssignment(binaryExpression) {
|
|
93043
93122
|
const operator = binaryExpression.operatorToken;
|
|
@@ -94200,7 +94279,7 @@ ${lanes.join("\n")}
|
|
|
94200
94279
|
return visitParenthesizedExpression(node, expressionResultIsUnused2);
|
|
94201
94280
|
case 223 /* BinaryExpression */:
|
|
94202
94281
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
94203
|
-
case
|
|
94282
|
+
case 357 /* CommaListExpression */:
|
|
94204
94283
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
94205
94284
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
94206
94285
|
case 15 /* TemplateHead */:
|
|
@@ -97364,7 +97443,7 @@ ${lanes.join("\n")}
|
|
|
97364
97443
|
switch (node.kind) {
|
|
97365
97444
|
case 223 /* BinaryExpression */:
|
|
97366
97445
|
return visitBinaryExpression(node);
|
|
97367
|
-
case
|
|
97446
|
+
case 357 /* CommaListExpression */:
|
|
97368
97447
|
return visitCommaListExpression(node);
|
|
97369
97448
|
case 224 /* ConditionalExpression */:
|
|
97370
97449
|
return visitConditionalExpression(node);
|
|
@@ -99709,9 +99788,9 @@ ${lanes.join("\n")}
|
|
|
99709
99788
|
return visitFunctionDeclaration(node);
|
|
99710
99789
|
case 260 /* ClassDeclaration */:
|
|
99711
99790
|
return visitClassDeclaration(node);
|
|
99712
|
-
case
|
|
99791
|
+
case 358 /* MergeDeclarationMarker */:
|
|
99713
99792
|
return visitMergeDeclarationMarker(node);
|
|
99714
|
-
case
|
|
99793
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
99715
99794
|
return visitEndOfDeclarationMarker(node);
|
|
99716
99795
|
default:
|
|
99717
99796
|
return visitor(node);
|
|
@@ -99728,7 +99807,7 @@ ${lanes.join("\n")}
|
|
|
99728
99807
|
return visitExpressionStatement(node);
|
|
99729
99808
|
case 214 /* ParenthesizedExpression */:
|
|
99730
99809
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
99731
|
-
case
|
|
99810
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
99732
99811
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
99733
99812
|
case 210 /* CallExpression */:
|
|
99734
99813
|
if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
|
|
@@ -101851,9 +101930,9 @@ ${lanes.join("\n")}
|
|
|
101851
101930
|
return visitCatchClause(node);
|
|
101852
101931
|
case 238 /* Block */:
|
|
101853
101932
|
return visitBlock(node);
|
|
101854
|
-
case
|
|
101933
|
+
case 358 /* MergeDeclarationMarker */:
|
|
101855
101934
|
return visitMergeDeclarationMarker(node);
|
|
101856
|
-
case
|
|
101935
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
101857
101936
|
return visitEndOfDeclarationMarker(node);
|
|
101858
101937
|
default:
|
|
101859
101938
|
return visitor(node);
|
|
@@ -102009,7 +102088,7 @@ ${lanes.join("\n")}
|
|
|
102009
102088
|
return visitExpressionStatement(node);
|
|
102010
102089
|
case 214 /* ParenthesizedExpression */:
|
|
102011
102090
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
102012
|
-
case
|
|
102091
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
102013
102092
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
102014
102093
|
case 223 /* BinaryExpression */:
|
|
102015
102094
|
if (isDestructuringAssignment(node)) {
|
|
@@ -104727,7 +104806,7 @@ ${lanes.join("\n")}
|
|
|
104727
104806
|
}
|
|
104728
104807
|
function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
104729
104808
|
var _a2, _b;
|
|
104730
|
-
const enabledSyntaxKindFeatures = new Array(
|
|
104809
|
+
const enabledSyntaxKindFeatures = new Array(361 /* Count */);
|
|
104731
104810
|
let lexicalEnvironmentVariableDeclarations;
|
|
104732
104811
|
let lexicalEnvironmentFunctionDeclarations;
|
|
104733
104812
|
let lexicalEnvironmentStatements;
|
|
@@ -106577,6 +106656,7 @@ ${lanes.join("\n")}
|
|
|
106577
106656
|
case 346 /* JSDocThisTag */:
|
|
106578
106657
|
case 347 /* JSDocTypeTag */:
|
|
106579
106658
|
case 352 /* JSDocThrowsTag */:
|
|
106659
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
106580
106660
|
return emitJSDocSimpleTypedTag(node);
|
|
106581
106661
|
case 348 /* JSDocTemplateTag */:
|
|
106582
106662
|
return emitJSDocTemplateTag(node);
|
|
@@ -106584,9 +106664,9 @@ ${lanes.join("\n")}
|
|
|
106584
106664
|
return emitJSDocTypedefTag(node);
|
|
106585
106665
|
case 350 /* JSDocSeeTag */:
|
|
106586
106666
|
return emitJSDocSeeTag(node);
|
|
106587
|
-
case
|
|
106588
|
-
case
|
|
106589
|
-
case
|
|
106667
|
+
case 355 /* NotEmittedStatement */:
|
|
106668
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
106669
|
+
case 358 /* MergeDeclarationMarker */:
|
|
106590
106670
|
return;
|
|
106591
106671
|
}
|
|
106592
106672
|
if (isExpression(node)) {
|
|
@@ -106685,18 +106765,18 @@ ${lanes.join("\n")}
|
|
|
106685
106765
|
return emitJsxSelfClosingElement(node);
|
|
106686
106766
|
case 285 /* JsxFragment */:
|
|
106687
106767
|
return emitJsxFragment(node);
|
|
106688
|
-
case
|
|
106768
|
+
case 354 /* SyntaxList */:
|
|
106689
106769
|
return Debug.fail("SyntaxList should not be printed");
|
|
106690
|
-
case
|
|
106770
|
+
case 355 /* NotEmittedStatement */:
|
|
106691
106771
|
return;
|
|
106692
|
-
case
|
|
106772
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
106693
106773
|
return emitPartiallyEmittedExpression(node);
|
|
106694
|
-
case
|
|
106774
|
+
case 357 /* CommaListExpression */:
|
|
106695
106775
|
return emitCommaList(node);
|
|
106696
|
-
case
|
|
106697
|
-
case
|
|
106776
|
+
case 358 /* MergeDeclarationMarker */:
|
|
106777
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
106698
106778
|
return;
|
|
106699
|
-
case
|
|
106779
|
+
case 360 /* SyntheticReferenceExpression */:
|
|
106700
106780
|
return Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
106701
106781
|
}
|
|
106702
106782
|
}
|
|
@@ -109944,7 +110024,7 @@ ${lanes.join("\n")}
|
|
|
109944
110024
|
emitLeadingComments(
|
|
109945
110025
|
pos,
|
|
109946
110026
|
/*isEmittedNode*/
|
|
109947
|
-
node.kind !==
|
|
110027
|
+
node.kind !== 355 /* NotEmittedStatement */
|
|
109948
110028
|
);
|
|
109949
110029
|
}
|
|
109950
110030
|
if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
|
|
@@ -109968,7 +110048,7 @@ ${lanes.join("\n")}
|
|
|
109968
110048
|
containerPos = savedContainerPos;
|
|
109969
110049
|
containerEnd = savedContainerEnd;
|
|
109970
110050
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
109971
|
-
if (!skipTrailingComments && node.kind !==
|
|
110051
|
+
if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
|
|
109972
110052
|
emitTrailingComments(end);
|
|
109973
110053
|
}
|
|
109974
110054
|
}
|
|
@@ -110240,7 +110320,7 @@ ${lanes.join("\n")}
|
|
|
110240
110320
|
}
|
|
110241
110321
|
} else {
|
|
110242
110322
|
const source = sourceMapRange.source || sourceMapSource;
|
|
110243
|
-
if (node.kind !==
|
|
110323
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
|
|
110244
110324
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
110245
110325
|
}
|
|
110246
110326
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
@@ -110255,7 +110335,7 @@ ${lanes.join("\n")}
|
|
|
110255
110335
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
110256
110336
|
sourceMapsDisabled = false;
|
|
110257
110337
|
}
|
|
110258
|
-
if (node.kind !==
|
|
110338
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
|
|
110259
110339
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
110260
110340
|
}
|
|
110261
110341
|
}
|
|
@@ -128367,7 +128447,7 @@ ${lanes.join("\n")}
|
|
|
128367
128447
|
}
|
|
128368
128448
|
}
|
|
128369
128449
|
function createSyntaxList(nodes, parent2) {
|
|
128370
|
-
const list = createNode(
|
|
128450
|
+
const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2);
|
|
128371
128451
|
list._children = [];
|
|
128372
128452
|
let pos = nodes.pos;
|
|
128373
128453
|
for (const node of nodes) {
|
|
@@ -129828,7 +129908,7 @@ ${lanes.join("\n")}
|
|
|
129828
129908
|
if (!children.length) {
|
|
129829
129909
|
return void 0;
|
|
129830
129910
|
}
|
|
129831
|
-
const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind >
|
|
129911
|
+
const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */);
|
|
129832
129912
|
return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
|
|
129833
129913
|
}
|
|
129834
129914
|
getLastToken(sourceFile) {
|
|
@@ -143217,6 +143297,7 @@ ${lanes.join("\n")}
|
|
|
143217
143297
|
void 0,
|
|
143218
143298
|
contextToken,
|
|
143219
143299
|
location,
|
|
143300
|
+
position,
|
|
143220
143301
|
sourceFile,
|
|
143221
143302
|
host,
|
|
143222
143303
|
program,
|
|
@@ -143330,10 +143411,10 @@ ${lanes.join("\n")}
|
|
|
143330
143411
|
} else if (!tracker.hasValue(type.value)) {
|
|
143331
143412
|
switch (typeof type.value) {
|
|
143332
143413
|
case "object":
|
|
143333
|
-
elements.push(factory.createBigIntLiteral(type.value));
|
|
143414
|
+
elements.push(type.value.negative ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value));
|
|
143334
143415
|
break;
|
|
143335
143416
|
case "number":
|
|
143336
|
-
elements.push(factory.createNumericLiteral(type.value));
|
|
143417
|
+
elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value));
|
|
143337
143418
|
break;
|
|
143338
143419
|
case "string":
|
|
143339
143420
|
elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */));
|
|
@@ -143542,7 +143623,7 @@ ${lanes.join("\n")}
|
|
|
143542
143623
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
143543
143624
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
143544
143625
|
}
|
|
143545
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143626
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143546
143627
|
let insertText;
|
|
143547
143628
|
let replacementSpan = getReplacementSpanForContextToken(replacementToken);
|
|
143548
143629
|
let data;
|
|
@@ -143600,7 +143681,7 @@ ${lanes.join("\n")}
|
|
|
143600
143681
|
}
|
|
143601
143682
|
if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
|
|
143602
143683
|
let importAdder;
|
|
143603
|
-
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
|
|
143684
|
+
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
|
|
143604
143685
|
sortText = SortText.ClassMemberSnippets;
|
|
143605
143686
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
143606
143687
|
hasAction = true;
|
|
@@ -143664,7 +143745,7 @@ ${lanes.join("\n")}
|
|
|
143664
143745
|
const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
|
|
143665
143746
|
return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
|
|
143666
143747
|
}
|
|
143667
|
-
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
|
|
143748
|
+
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
|
|
143668
143749
|
const classLikeDeclaration = findAncestor(location, isClassLike);
|
|
143669
143750
|
if (!classLikeDeclaration) {
|
|
143670
143751
|
return { insertText: name };
|
|
@@ -143700,7 +143781,7 @@ ${lanes.join("\n")}
|
|
|
143700
143781
|
);
|
|
143701
143782
|
}
|
|
143702
143783
|
let modifiers = 0 /* None */;
|
|
143703
|
-
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
|
|
143784
|
+
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
|
|
143704
143785
|
const isAbstract = !!(presentModifiers & 256 /* Abstract */);
|
|
143705
143786
|
const completionNodes = [];
|
|
143706
143787
|
ts_codefix_exports.addNewNodeForMemberSymbol(
|
|
@@ -143755,8 +143836,8 @@ ${lanes.join("\n")}
|
|
|
143755
143836
|
}
|
|
143756
143837
|
return { insertText, isSnippet, importAdder, replacementSpan };
|
|
143757
143838
|
}
|
|
143758
|
-
function getPresentModifiers(contextToken) {
|
|
143759
|
-
if (!contextToken) {
|
|
143839
|
+
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
143840
|
+
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
143760
143841
|
return { modifiers: 0 /* None */ };
|
|
143761
143842
|
}
|
|
143762
143843
|
let modifiers = 0 /* None */;
|
|
@@ -144122,7 +144203,7 @@ ${lanes.join("\n")}
|
|
|
144122
144203
|
return "TypeOnlyAlias/" /* TypeOnlyAlias */;
|
|
144123
144204
|
}
|
|
144124
144205
|
}
|
|
144125
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144206
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144126
144207
|
var _a2;
|
|
144127
144208
|
const start = timestamp();
|
|
144128
144209
|
const variableDeclaration = getVariableDeclaration(location);
|
|
@@ -144145,6 +144226,7 @@ ${lanes.join("\n")}
|
|
|
144145
144226
|
replacementToken,
|
|
144146
144227
|
contextToken,
|
|
144147
144228
|
location,
|
|
144229
|
+
position,
|
|
144148
144230
|
sourceFile,
|
|
144149
144231
|
host,
|
|
144150
144232
|
program,
|
|
@@ -144388,6 +144470,7 @@ ${lanes.join("\n")}
|
|
|
144388
144470
|
name,
|
|
144389
144471
|
symbol,
|
|
144390
144472
|
location,
|
|
144473
|
+
position,
|
|
144391
144474
|
contextToken,
|
|
144392
144475
|
formatContext
|
|
144393
144476
|
);
|
|
@@ -144751,6 +144834,7 @@ ${lanes.join("\n")}
|
|
|
144751
144834
|
case 347 /* JSDocTypeTag */:
|
|
144752
144835
|
case 349 /* JSDocTypedefTag */:
|
|
144753
144836
|
case 352 /* JSDocThrowsTag */:
|
|
144837
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
144754
144838
|
return true;
|
|
144755
144839
|
case 348 /* JSDocTemplateTag */:
|
|
144756
144840
|
return !!tag.constraint;
|
|
@@ -145998,7 +146082,7 @@ ${lanes.join("\n")}
|
|
|
145998
146082
|
function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
|
|
145999
146083
|
var _a2;
|
|
146000
146084
|
switch (location.kind) {
|
|
146001
|
-
case
|
|
146085
|
+
case 354 /* SyntaxList */:
|
|
146002
146086
|
return tryCast(location.parent, isObjectTypeDeclaration);
|
|
146003
146087
|
case 1 /* EndOfFileToken */:
|
|
146004
146088
|
const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
|
|
@@ -146416,10 +146500,10 @@ ${lanes.join("\n")}
|
|
|
146416
146500
|
if (!contextToken || !isStringLiteralLike(contextToken))
|
|
146417
146501
|
return void 0;
|
|
146418
146502
|
const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
|
|
146419
|
-
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
|
|
146503
|
+
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
|
|
146420
146504
|
}
|
|
146421
146505
|
}
|
|
146422
|
-
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
|
|
146506
|
+
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
|
|
146423
146507
|
if (completion === void 0) {
|
|
146424
146508
|
return void 0;
|
|
146425
146509
|
}
|
|
@@ -146435,6 +146519,7 @@ ${lanes.join("\n")}
|
|
|
146435
146519
|
contextToken,
|
|
146436
146520
|
contextToken,
|
|
146437
146521
|
sourceFile,
|
|
146522
|
+
position,
|
|
146438
146523
|
sourceFile,
|
|
146439
146524
|
host,
|
|
146440
146525
|
program,
|
|
@@ -147064,7 +147149,7 @@ ${lanes.join("\n")}
|
|
|
147064
147149
|
}
|
|
147065
147150
|
function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
|
|
147066
147151
|
const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
|
|
147067
|
-
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment));
|
|
147152
|
+
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
|
|
147068
147153
|
if (fragmentDirectory !== void 0) {
|
|
147069
147154
|
const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
|
|
147070
147155
|
return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
|
|
@@ -150599,6 +150684,7 @@ ${lanes.join("\n")}
|
|
|
150599
150684
|
}
|
|
150600
150685
|
return displayParts;
|
|
150601
150686
|
case 347 /* JSDocTypeTag */:
|
|
150687
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
150602
150688
|
return withNode(tag.typeExpression);
|
|
150603
150689
|
case 349 /* JSDocTypedefTag */:
|
|
150604
150690
|
case 341 /* JSDocCallbackTag */:
|
|
@@ -150888,6 +150974,7 @@ ${lanes.join("\n")}
|
|
|
150888
150974
|
"readonly",
|
|
150889
150975
|
"requires",
|
|
150890
150976
|
"returns",
|
|
150977
|
+
"satisfies",
|
|
150891
150978
|
"see",
|
|
150892
150979
|
"since",
|
|
150893
150980
|
"static",
|
|
@@ -176000,6 +176087,8 @@ ${e.message}`;
|
|
|
176000
176087
|
getJSDocReturnTag: () => getJSDocReturnTag,
|
|
176001
176088
|
getJSDocReturnType: () => getJSDocReturnType,
|
|
176002
176089
|
getJSDocRoot: () => getJSDocRoot,
|
|
176090
|
+
getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
|
|
176091
|
+
getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
|
|
176003
176092
|
getJSDocTags: () => getJSDocTags,
|
|
176004
176093
|
getJSDocTagsNoCache: () => getJSDocTagsNoCache,
|
|
176005
176094
|
getJSDocTemplateTag: () => getJSDocTemplateTag,
|
|
@@ -176626,6 +176715,8 @@ ${e.message}`;
|
|
|
176626
176715
|
isJSDocPublicTag: () => isJSDocPublicTag,
|
|
176627
176716
|
isJSDocReadonlyTag: () => isJSDocReadonlyTag,
|
|
176628
176717
|
isJSDocReturnTag: () => isJSDocReturnTag,
|
|
176718
|
+
isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
|
|
176719
|
+
isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
|
|
176629
176720
|
isJSDocSeeTag: () => isJSDocSeeTag,
|
|
176630
176721
|
isJSDocSignature: () => isJSDocSignature,
|
|
176631
176722
|
isJSDocTag: () => isJSDocTag,
|
|
@@ -176686,6 +176777,8 @@ ${e.message}`;
|
|
|
176686
176777
|
isLogicalOperator: () => isLogicalOperator,
|
|
176687
176778
|
isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
|
|
176688
176779
|
isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
|
|
176780
|
+
isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
|
|
176781
|
+
isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
|
|
176689
176782
|
isMappedTypeNode: () => isMappedTypeNode,
|
|
176690
176783
|
isMemberName: () => isMemberName,
|
|
176691
176784
|
isMergeDeclarationMarker: () => isMergeDeclarationMarker,
|
|
@@ -177371,6 +177464,7 @@ ${e.message}`;
|
|
|
177371
177464
|
tryGetDirectories: () => tryGetDirectories,
|
|
177372
177465
|
tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
|
|
177373
177466
|
tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
|
|
177467
|
+
tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
|
|
177374
177468
|
tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
|
|
177375
177469
|
tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
|
|
177376
177470
|
tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
|
|
@@ -178650,6 +178744,8 @@ ${e.message}`;
|
|
|
178650
178744
|
getJSDocReturnTag: () => getJSDocReturnTag,
|
|
178651
178745
|
getJSDocReturnType: () => getJSDocReturnType,
|
|
178652
178746
|
getJSDocRoot: () => getJSDocRoot,
|
|
178747
|
+
getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
|
|
178748
|
+
getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
|
|
178653
178749
|
getJSDocTags: () => getJSDocTags,
|
|
178654
178750
|
getJSDocTagsNoCache: () => getJSDocTagsNoCache,
|
|
178655
178751
|
getJSDocTemplateTag: () => getJSDocTemplateTag,
|
|
@@ -179276,6 +179372,8 @@ ${e.message}`;
|
|
|
179276
179372
|
isJSDocPublicTag: () => isJSDocPublicTag,
|
|
179277
179373
|
isJSDocReadonlyTag: () => isJSDocReadonlyTag,
|
|
179278
179374
|
isJSDocReturnTag: () => isJSDocReturnTag,
|
|
179375
|
+
isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
|
|
179376
|
+
isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
|
|
179279
179377
|
isJSDocSeeTag: () => isJSDocSeeTag,
|
|
179280
179378
|
isJSDocSignature: () => isJSDocSignature,
|
|
179281
179379
|
isJSDocTag: () => isJSDocTag,
|
|
@@ -179336,6 +179434,8 @@ ${e.message}`;
|
|
|
179336
179434
|
isLogicalOperator: () => isLogicalOperator,
|
|
179337
179435
|
isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
|
|
179338
179436
|
isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
|
|
179437
|
+
isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
|
|
179438
|
+
isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
|
|
179339
179439
|
isMappedTypeNode: () => isMappedTypeNode,
|
|
179340
179440
|
isMemberName: () => isMemberName,
|
|
179341
179441
|
isMergeDeclarationMarker: () => isMergeDeclarationMarker,
|
|
@@ -180021,6 +180121,7 @@ ${e.message}`;
|
|
|
180021
180121
|
tryGetDirectories: () => tryGetDirectories,
|
|
180022
180122
|
tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
|
|
180023
180123
|
tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
|
|
180124
|
+
tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
|
|
180024
180125
|
tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
|
|
180025
180126
|
tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
|
|
180026
180127
|
tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
|