@typescript-deploys/pr-build 5.5.0-pr-58007-11 → 5.6.0-pr-57196-3
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 +111 -91
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +192 -117
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -17,8 +17,8 @@ and limitations under the License.
|
|
|
17
17
|
"use strict";
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
|
-
var versionMajorMinor = "5.
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
20
|
+
var versionMajorMinor = "5.6";
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240603`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -6132,18 +6132,6 @@ var Diagnostics = {
|
|
|
6132
6132
|
This_character_cannot_be_escaped_in_a_regular_expression: diag(1535, 1 /* Error */, "This_character_cannot_be_escaped_in_a_regular_expression_1535", "This character cannot be escaped in a regular expression."),
|
|
6133
6133
|
Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: diag(1536, 1 /* Error */, "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),
|
|
6134
6134
|
Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: diag(1537, 1 /* Error */, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."),
|
|
6135
|
-
A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(
|
|
6136
|
-
1538,
|
|
6137
|
-
2 /* Suggestion */,
|
|
6138
|
-
"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1538",
|
|
6139
|
-
"A namespace declaration should not be declared using the module keyword. Please use the namespace keyword instead.",
|
|
6140
|
-
/*reportsUnnecessary*/
|
|
6141
|
-
void 0,
|
|
6142
|
-
/*elidedInCompatabilityPyramid*/
|
|
6143
|
-
void 0,
|
|
6144
|
-
/*reportsDeprecated*/
|
|
6145
|
-
true
|
|
6146
|
-
),
|
|
6147
6135
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
6148
6136
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
6149
6137
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -9807,7 +9795,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9807
9795
|
pos++;
|
|
9808
9796
|
let regExpFlags = 0 /* None */;
|
|
9809
9797
|
while (true) {
|
|
9810
|
-
const ch =
|
|
9798
|
+
const ch = charCodeChecked(pos);
|
|
9811
9799
|
if (ch === -1 /* EOF */ || !isIdentifierPart(ch, languageVersion)) {
|
|
9812
9800
|
break;
|
|
9813
9801
|
}
|
|
@@ -11058,10 +11046,10 @@ var binaryUnicodeProperties = /* @__PURE__ */ new Set(["ASCII", "ASCII_Hex_Digit
|
|
|
11058
11046
|
var binaryUnicodePropertiesOfStrings = /* @__PURE__ */ new Set(["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"]);
|
|
11059
11047
|
var valuesOfNonBinaryUnicodeProperties = {
|
|
11060
11048
|
General_Category: /* @__PURE__ */ new Set(["C", "Other", "Cc", "Control", "cntrl", "Cf", "Format", "Cn", "Unassigned", "Co", "Private_Use", "Cs", "Surrogate", "L", "Letter", "LC", "Cased_Letter", "Ll", "Lowercase_Letter", "Lm", "Modifier_Letter", "Lo", "Other_Letter", "Lt", "Titlecase_Letter", "Lu", "Uppercase_Letter", "M", "Mark", "Combining_Mark", "Mc", "Spacing_Mark", "Me", "Enclosing_Mark", "Mn", "Nonspacing_Mark", "N", "Number", "Nd", "Decimal_Number", "digit", "Nl", "Letter_Number", "No", "Other_Number", "P", "Punctuation", "punct", "Pc", "Connector_Punctuation", "Pd", "Dash_Punctuation", "Pe", "Close_Punctuation", "Pf", "Final_Punctuation", "Pi", "Initial_Punctuation", "Po", "Other_Punctuation", "Ps", "Open_Punctuation", "S", "Symbol", "Sc", "Currency_Symbol", "Sk", "Modifier_Symbol", "Sm", "Math_Symbol", "So", "Other_Symbol", "Z", "Separator", "Zl", "Line_Separator", "Zp", "Paragraph_Separator", "Zs", "Space_Separator"]),
|
|
11061
|
-
Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "
|
|
11062
|
-
Script_Extensions:
|
|
11063
|
-
// Currently empty
|
|
11049
|
+
Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "Arab", "Arabic", "Armi", "Imperial_Aramaic", "Armn", "Armenian", "Avst", "Avestan", "Bali", "Balinese", "Bamu", "Bamum", "Bass", "Bassa_Vah", "Batk", "Batak", "Beng", "Bengali", "Bhks", "Bhaiksuki", "Bopo", "Bopomofo", "Brah", "Brahmi", "Brai", "Braille", "Bugi", "Buginese", "Buhd", "Buhid", "Cakm", "Chakma", "Cans", "Canadian_Aboriginal", "Cari", "Carian", "Cham", "Cher", "Cherokee", "Chrs", "Chorasmian", "Copt", "Coptic", "Qaac", "Cpmn", "Cypro_Minoan", "Cprt", "Cypriot", "Cyrl", "Cyrillic", "Deva", "Devanagari", "Diak", "Dives_Akuru", "Dogr", "Dogra", "Dsrt", "Deseret", "Dupl", "Duployan", "Egyp", "Egyptian_Hieroglyphs", "Elba", "Elbasan", "Elym", "Elymaic", "Ethi", "Ethiopic", "Geor", "Georgian", "Glag", "Glagolitic", "Gong", "Gunjala_Gondi", "Gonm", "Masaram_Gondi", "Goth", "Gothic", "Gran", "Grantha", "Grek", "Greek", "Gujr", "Gujarati", "Guru", "Gurmukhi", "Hang", "Hangul", "Hani", "Han", "Hano", "Hanunoo", "Hatr", "Hatran", "Hebr", "Hebrew", "Hira", "Hiragana", "Hluw", "Anatolian_Hieroglyphs", "Hmng", "Pahawh_Hmong", "Hmnp", "Nyiakeng_Puachue_Hmong", "Hrkt", "Katakana_Or_Hiragana", "Hung", "Old_Hungarian", "Ital", "Old_Italic", "Java", "Javanese", "Kali", "Kayah_Li", "Kana", "Katakana", "Kawi", "Khar", "Kharoshthi", "Khmr", "Khmer", "Khoj", "Khojki", "Kits", "Khitan_Small_Script", "Knda", "Kannada", "Kthi", "Kaithi", "Lana", "Tai_Tham", "Laoo", "Lao", "Latn", "Latin", "Lepc", "Lepcha", "Limb", "Limbu", "Lina", "Linear_A", "Linb", "Linear_B", "Lisu", "Lyci", "Lycian", "Lydi", "Lydian", "Mahj", "Mahajani", "Maka", "Makasar", "Mand", "Mandaic", "Mani", "Manichaean", "Marc", "Marchen", "Medf", "Medefaidrin", "Mend", "Mende_Kikakui", "Merc", "Meroitic_Cursive", "Mero", "Meroitic_Hieroglyphs", "Mlym", "Malayalam", "Modi", "Mong", "Mongolian", "Mroo", "Mro", "Mtei", "Meetei_Mayek", "Mult", "Multani", "Mymr", "Myanmar", "Nagm", "Nag_Mundari", "Nand", "Nandinagari", "Narb", "Old_North_Arabian", "Nbat", "Nabataean", "Newa", "Nkoo", "Nko", "Nshu", "Nushu", "Ogam", "Ogham", "Olck", "Ol_Chiki", "Orkh", "Old_Turkic", "Orya", "Oriya", "Osge", "Osage", "Osma", "Osmanya", "Ougr", "Old_Uyghur", "Palm", "Palmyrene", "Pauc", "Pau_Cin_Hau", "Perm", "Old_Permic", "Phag", "Phags_Pa", "Phli", "Inscriptional_Pahlavi", "Phlp", "Psalter_Pahlavi", "Phnx", "Phoenician", "Plrd", "Miao", "Prti", "Inscriptional_Parthian", "Rjng", "Rejang", "Rohg", "Hanifi_Rohingya", "Runr", "Runic", "Samr", "Samaritan", "Sarb", "Old_South_Arabian", "Saur", "Saurashtra", "Sgnw", "SignWriting", "Shaw", "Shavian", "Shrd", "Sharada", "Sidd", "Siddham", "Sind", "Khudawadi", "Sinh", "Sinhala", "Sogd", "Sogdian", "Sogo", "Old_Sogdian", "Sora", "Sora_Sompeng", "Soyo", "Soyombo", "Sund", "Sundanese", "Sylo", "Syloti_Nagri", "Syrc", "Syriac", "Tagb", "Tagbanwa", "Takr", "Takri", "Tale", "Tai_Le", "Talu", "New_Tai_Lue", "Taml", "Tamil", "Tang", "Tangut", "Tavt", "Tai_Viet", "Telu", "Telugu", "Tfng", "Tifinagh", "Tglg", "Tagalog", "Thaa", "Thaana", "Thai", "Tibt", "Tibetan", "Tirh", "Tirhuta", "Tnsa", "Tangsa", "Toto", "Ugar", "Ugaritic", "Vaii", "Vai", "Vith", "Vithkuqi", "Wara", "Warang_Citi", "Wcho", "Wancho", "Xpeo", "Old_Persian", "Xsux", "Cuneiform", "Yezi", "Yezidi", "Yiii", "Yi", "Zanb", "Zanabazar_Square", "Zinh", "Inherited", "Qaai", "Zyyy", "Common", "Zzzz", "Unknown"]),
|
|
11050
|
+
Script_Extensions: void 0
|
|
11064
11051
|
};
|
|
11052
|
+
valuesOfNonBinaryUnicodeProperties.Script_Extensions = valuesOfNonBinaryUnicodeProperties.Script;
|
|
11065
11053
|
|
|
11066
11054
|
// src/compiler/utilitiesPublic.ts
|
|
11067
11055
|
function isExternalModuleNameRelative(moduleName) {
|
|
@@ -12782,13 +12770,6 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
12782
12770
|
isInJSDoc(node)
|
|
12783
12771
|
);
|
|
12784
12772
|
}
|
|
12785
|
-
function getNonModifierTokenPosOfNode(node, sourceFile) {
|
|
12786
|
-
const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;
|
|
12787
|
-
if (!lastModifier) {
|
|
12788
|
-
return getTokenPosOfNode(node, sourceFile);
|
|
12789
|
-
}
|
|
12790
|
-
return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);
|
|
12791
|
-
}
|
|
12792
12773
|
function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {
|
|
12793
12774
|
return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);
|
|
12794
12775
|
}
|
|
@@ -13658,6 +13639,26 @@ function getErrorSpanForNode(sourceFile, node) {
|
|
|
13658
13639
|
const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
|
|
13659
13640
|
return getSpanOfTokenAtPosition(sourceFile, pos2);
|
|
13660
13641
|
}
|
|
13642
|
+
case 176 /* Constructor */: {
|
|
13643
|
+
const constructorDeclaration = node;
|
|
13644
|
+
const start = skipTrivia(sourceFile.text, constructorDeclaration.pos);
|
|
13645
|
+
const scanner = createScanner(
|
|
13646
|
+
sourceFile.languageVersion,
|
|
13647
|
+
/*skipTrivia*/
|
|
13648
|
+
true,
|
|
13649
|
+
sourceFile.languageVariant,
|
|
13650
|
+
sourceFile.text,
|
|
13651
|
+
/*onError*/
|
|
13652
|
+
void 0,
|
|
13653
|
+
start
|
|
13654
|
+
);
|
|
13655
|
+
let token = scanner.scan();
|
|
13656
|
+
while (token !== 137 /* ConstructorKeyword */ && token !== 1 /* EndOfFileToken */) {
|
|
13657
|
+
token = scanner.scan();
|
|
13658
|
+
}
|
|
13659
|
+
const end = scanner.getTokenEnd();
|
|
13660
|
+
return createTextSpanFromBounds(start, end);
|
|
13661
|
+
}
|
|
13661
13662
|
}
|
|
13662
13663
|
if (errorNode === void 0) {
|
|
13663
13664
|
return getSpanOfTokenAtPosition(sourceFile, node.pos);
|
|
@@ -18317,7 +18318,15 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
|
|
|
18317
18318
|
return { pos, end };
|
|
18318
18319
|
}
|
|
18319
18320
|
function skipTypeChecking(sourceFile, options, host) {
|
|
18320
|
-
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
|
|
18321
|
+
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnsotics(sourceFile, options);
|
|
18322
|
+
}
|
|
18323
|
+
function canIncludeBindAndCheckDiagnsotics(sourceFile, options) {
|
|
18324
|
+
if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
|
|
18325
|
+
if (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */) return true;
|
|
18326
|
+
const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;
|
|
18327
|
+
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
|
|
18328
|
+
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
|
|
18329
|
+
return isPlainJs || isCheckJs || sourceFile.scriptKind === 7 /* Deferred */;
|
|
18321
18330
|
}
|
|
18322
18331
|
function isJsonEqual(a, b) {
|
|
18323
18332
|
return a === b || typeof a === "object" && a !== null && typeof b === "object" && b !== null && equalOwnProperties(a, b, isJsonEqual);
|
|
@@ -49275,7 +49284,7 @@ function createTypeChecker(host) {
|
|
|
49275
49284
|
return noMappedTypes && mappedType !== type ? void 0 : mappedType;
|
|
49276
49285
|
}
|
|
49277
49286
|
function setTextRange2(context, range, location) {
|
|
49278
|
-
if (!nodeIsSynthesized(range)
|
|
49287
|
+
if (!nodeIsSynthesized(range) || !(range.flags & 16 /* Synthesized */) || !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(range))) {
|
|
49279
49288
|
range = factory.cloneNode(range);
|
|
49280
49289
|
}
|
|
49281
49290
|
if (range === location) return range;
|
|
@@ -50214,7 +50223,8 @@ function createTypeChecker(host) {
|
|
|
50214
50223
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
50215
50224
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
50216
50225
|
typeElements.push(
|
|
50217
|
-
|
|
50226
|
+
setCommentRange2(
|
|
50227
|
+
context,
|
|
50218
50228
|
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
50219
50229
|
getterDeclaration
|
|
50220
50230
|
)
|
|
@@ -50222,7 +50232,8 @@ function createTypeChecker(host) {
|
|
|
50222
50232
|
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
50223
50233
|
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
50224
50234
|
typeElements.push(
|
|
50225
|
-
|
|
50235
|
+
setCommentRange2(
|
|
50236
|
+
context,
|
|
50226
50237
|
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
50227
50238
|
setterDeclaration
|
|
50228
50239
|
)
|
|
@@ -50280,11 +50291,17 @@ function createTypeChecker(host) {
|
|
|
50280
50291
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
50281
50292
|
}
|
|
50282
50293
|
} else if (propertySymbol.valueDeclaration) {
|
|
50283
|
-
|
|
50294
|
+
setCommentRange2(context, node, propertySymbol.valueDeclaration);
|
|
50284
50295
|
}
|
|
50285
50296
|
return node;
|
|
50286
50297
|
}
|
|
50287
50298
|
}
|
|
50299
|
+
function setCommentRange2(context, node, range) {
|
|
50300
|
+
if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(range)) {
|
|
50301
|
+
return setCommentRange(node, range);
|
|
50302
|
+
}
|
|
50303
|
+
return node;
|
|
50304
|
+
}
|
|
50288
50305
|
function mapToTypeNodes(types, context, isBareList) {
|
|
50289
50306
|
if (some(types)) {
|
|
50290
50307
|
if (checkTruncationLength(context)) {
|
|
@@ -51060,7 +51077,7 @@ function createTypeChecker(host) {
|
|
|
51060
51077
|
return false;
|
|
51061
51078
|
}
|
|
51062
51079
|
function typeParameterToName(type, context) {
|
|
51063
|
-
var _a, _b;
|
|
51080
|
+
var _a, _b, _c, _d;
|
|
51064
51081
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) {
|
|
51065
51082
|
const cached = context.typeParameterNames.get(getTypeId(type));
|
|
51066
51083
|
if (cached) {
|
|
@@ -51077,11 +51094,15 @@ function createTypeChecker(host) {
|
|
|
51077
51094
|
if (!(result.kind & 80 /* Identifier */)) {
|
|
51078
51095
|
return factory.createIdentifier("(Missing type parameter)");
|
|
51079
51096
|
}
|
|
51097
|
+
const decl = (_b = (_a = type.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0];
|
|
51098
|
+
if (decl && isTypeParameterDeclaration(decl)) {
|
|
51099
|
+
result = setTextRange2(context, result, decl.name);
|
|
51100
|
+
}
|
|
51080
51101
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51081
51102
|
const rawtext = result.escapedText;
|
|
51082
|
-
let i = ((
|
|
51103
|
+
let i = ((_c = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _c.get(rawtext)) || 0;
|
|
51083
51104
|
let text = rawtext;
|
|
51084
|
-
while (((
|
|
51105
|
+
while (((_d = context.typeParameterNamesByText) == null ? void 0 : _d.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
51085
51106
|
i++;
|
|
51086
51107
|
text = `${rawtext}_${i}`;
|
|
51087
51108
|
}
|
|
@@ -51520,13 +51541,14 @@ function createTypeChecker(host) {
|
|
|
51520
51541
|
}
|
|
51521
51542
|
return node;
|
|
51522
51543
|
}
|
|
51523
|
-
return result
|
|
51544
|
+
return result ? setTextRange2(context, result, node) : void 0;
|
|
51524
51545
|
}
|
|
51525
51546
|
function createRecoveryBoundary() {
|
|
51547
|
+
let trackedSymbols;
|
|
51526
51548
|
let unreportedErrors;
|
|
51527
51549
|
const oldTracker = context.tracker;
|
|
51528
51550
|
const oldTrackedSymbols = context.trackedSymbols;
|
|
51529
|
-
context.trackedSymbols =
|
|
51551
|
+
context.trackedSymbols = void 0;
|
|
51530
51552
|
const oldEncounteredError = context.encounteredError;
|
|
51531
51553
|
context.tracker = new SymbolTrackerImpl(context, {
|
|
51532
51554
|
...oldTracker.inner,
|
|
@@ -51546,17 +51568,7 @@ function createTypeChecker(host) {
|
|
|
51546
51568
|
markError(() => oldTracker.reportNonSerializableProperty(name));
|
|
51547
51569
|
},
|
|
51548
51570
|
trackSymbol(sym, decl, meaning) {
|
|
51549
|
-
|
|
51550
|
-
sym,
|
|
51551
|
-
decl,
|
|
51552
|
-
meaning,
|
|
51553
|
-
/*shouldComputeAliasesToMakeVisible*/
|
|
51554
|
-
false
|
|
51555
|
-
);
|
|
51556
|
-
if (accessibility.accessibility !== 0 /* Accessible */) {
|
|
51557
|
-
(context.trackedSymbols ?? (context.trackedSymbols = [])).push([sym, decl, meaning]);
|
|
51558
|
-
return true;
|
|
51559
|
-
}
|
|
51571
|
+
(trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]);
|
|
51560
51572
|
return false;
|
|
51561
51573
|
},
|
|
51562
51574
|
moduleResolverHost: context.tracker.moduleResolverHost
|
|
@@ -51570,13 +51582,12 @@ function createTypeChecker(host) {
|
|
|
51570
51582
|
(unreportedErrors ?? (unreportedErrors = [])).push(unreportedError);
|
|
51571
51583
|
}
|
|
51572
51584
|
function startRecoveryScope2() {
|
|
51573
|
-
|
|
51574
|
-
const initialTrackedSymbolsTop = ((_a = context.trackedSymbols) == null ? void 0 : _a.length) ?? 0;
|
|
51585
|
+
const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0;
|
|
51575
51586
|
const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0;
|
|
51576
51587
|
return () => {
|
|
51577
51588
|
hadError = false;
|
|
51578
|
-
if (
|
|
51579
|
-
|
|
51589
|
+
if (trackedSymbols) {
|
|
51590
|
+
trackedSymbols.length = trackedSymbolsTop;
|
|
51580
51591
|
}
|
|
51581
51592
|
if (unreportedErrors) {
|
|
51582
51593
|
unreportedErrors.length = unreportedErrorsTop;
|
|
@@ -51585,14 +51596,13 @@ function createTypeChecker(host) {
|
|
|
51585
51596
|
}
|
|
51586
51597
|
function finalizeBoundary2() {
|
|
51587
51598
|
context.tracker = oldTracker;
|
|
51588
|
-
const newTrackedSymbols = context.trackedSymbols;
|
|
51589
51599
|
context.trackedSymbols = oldTrackedSymbols;
|
|
51590
51600
|
context.encounteredError = oldEncounteredError;
|
|
51591
51601
|
unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn());
|
|
51592
51602
|
if (hadError) {
|
|
51593
51603
|
return false;
|
|
51594
51604
|
}
|
|
51595
|
-
|
|
51605
|
+
trackedSymbols == null ? void 0 : trackedSymbols.forEach(
|
|
51596
51606
|
([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
|
|
51597
51607
|
symbol,
|
|
51598
51608
|
enclosingDeclaration,
|
|
@@ -51776,12 +51786,7 @@ function createTypeChecker(host) {
|
|
|
51776
51786
|
}
|
|
51777
51787
|
}
|
|
51778
51788
|
if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) {
|
|
51779
|
-
let visited =
|
|
51780
|
-
node,
|
|
51781
|
-
visitExistingNodeTreeSymbols,
|
|
51782
|
-
/*context*/
|
|
51783
|
-
void 0
|
|
51784
|
-
);
|
|
51789
|
+
let visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
51785
51790
|
if (visited === node) {
|
|
51786
51791
|
visited = setTextRange2(context, factory.cloneNode(node), node);
|
|
51787
51792
|
}
|
|
@@ -51842,12 +51847,7 @@ function createTypeChecker(host) {
|
|
|
51842
51847
|
return factory.updateTypePredicateNode(node, node.assertsModifier, parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
51843
51848
|
}
|
|
51844
51849
|
if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) {
|
|
51845
|
-
const visited =
|
|
51846
|
-
node,
|
|
51847
|
-
visitExistingNodeTreeSymbols,
|
|
51848
|
-
/*context*/
|
|
51849
|
-
void 0
|
|
51850
|
-
);
|
|
51850
|
+
const visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
51851
51851
|
const clone = setTextRange2(context, visited === node ? factory.cloneNode(node) : visited, node);
|
|
51852
51852
|
const flags = getEmitFlags(clone);
|
|
51853
51853
|
setEmitFlags(clone, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */));
|
|
@@ -51890,12 +51890,29 @@ function createTypeChecker(host) {
|
|
|
51890
51890
|
}
|
|
51891
51891
|
}
|
|
51892
51892
|
}
|
|
51893
|
-
return
|
|
51894
|
-
|
|
51895
|
-
|
|
51896
|
-
|
|
51897
|
-
|
|
51898
|
-
|
|
51893
|
+
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
51894
|
+
function visitEachChild2(node2, visitor) {
|
|
51895
|
+
const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2);
|
|
51896
|
+
return visitEachChild(
|
|
51897
|
+
node2,
|
|
51898
|
+
visitor,
|
|
51899
|
+
/*context*/
|
|
51900
|
+
void 0,
|
|
51901
|
+
nonlocalNode ? visitNodesWithoutCopyingPositions : void 0
|
|
51902
|
+
);
|
|
51903
|
+
}
|
|
51904
|
+
function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) {
|
|
51905
|
+
let result = visitNodes2(nodes, visitor, test, start, count);
|
|
51906
|
+
if (result) {
|
|
51907
|
+
if (result.pos !== -1 || result.end !== -1) {
|
|
51908
|
+
if (result === nodes) {
|
|
51909
|
+
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
|
51910
|
+
}
|
|
51911
|
+
setTextRangePosEnd(result, -1, -1);
|
|
51912
|
+
}
|
|
51913
|
+
}
|
|
51914
|
+
return result;
|
|
51915
|
+
}
|
|
51899
51916
|
function getEffectiveDotDotDotForParameter(p) {
|
|
51900
51917
|
return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0);
|
|
51901
51918
|
}
|
|
@@ -56961,7 +56978,16 @@ function createTypeChecker(host) {
|
|
|
56961
56978
|
}
|
|
56962
56979
|
}
|
|
56963
56980
|
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
|
56964
|
-
|
|
56981
|
+
if (type === thisArgument) {
|
|
56982
|
+
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
56983
|
+
type,
|
|
56984
|
+
thisArgument,
|
|
56985
|
+
/*needApparentType*/
|
|
56986
|
+
true
|
|
56987
|
+
));
|
|
56988
|
+
}
|
|
56989
|
+
const key = `I${getTypeId(type)},${getTypeId(thisArgument)}`;
|
|
56990
|
+
return getCachedType(key) ?? setCachedType(key, getTypeWithThisArgument(
|
|
56965
56991
|
type,
|
|
56966
56992
|
thisArgument,
|
|
56967
56993
|
/*needApparentType*/
|
|
@@ -83003,14 +83029,6 @@ function createTypeChecker(host) {
|
|
|
83003
83029
|
}
|
|
83004
83030
|
if (isIdentifier(node.name)) {
|
|
83005
83031
|
checkCollisionsForDeclarationName(node, node.name);
|
|
83006
|
-
if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {
|
|
83007
|
-
const sourceFile = getSourceFileOfNode(node);
|
|
83008
|
-
const pos = getNonModifierTokenPosOfNode(node);
|
|
83009
|
-
const span = getSpanOfTokenAtPosition(sourceFile, pos);
|
|
83010
|
-
suggestionDiagnostics.add(
|
|
83011
|
-
createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)
|
|
83012
|
-
);
|
|
83013
|
-
}
|
|
83014
83032
|
}
|
|
83015
83033
|
checkExportsOnMergedDeclarations(node);
|
|
83016
83034
|
const symbol = getSymbolOfDeclaration(node);
|
|
@@ -85048,7 +85066,7 @@ function createTypeChecker(host) {
|
|
|
85048
85066
|
return !!(getNodeCheckFlags(node) & flag);
|
|
85049
85067
|
}
|
|
85050
85068
|
function calculateNodeCheckFlagWorker(node, flag) {
|
|
85051
|
-
if (!compilerOptions.noCheck) {
|
|
85069
|
+
if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnsotics(getSourceFileOfNode(node), compilerOptions)) {
|
|
85052
85070
|
return;
|
|
85053
85071
|
}
|
|
85054
85072
|
const links = getNodeLinks(node);
|
|
@@ -113012,9 +113030,11 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
113012
113030
|
emitSkipped = true;
|
|
113013
113031
|
return;
|
|
113014
113032
|
}
|
|
113015
|
-
|
|
113016
|
-
(
|
|
113017
|
-
|
|
113033
|
+
(isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(
|
|
113034
|
+
(sourceFile) => {
|
|
113035
|
+
if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
|
|
113036
|
+
}
|
|
113037
|
+
);
|
|
113018
113038
|
const transform = transformNodes(
|
|
113019
113039
|
resolver,
|
|
113020
113040
|
host,
|
|
@@ -113064,9 +113084,11 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
113064
113084
|
const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
|
|
113065
113085
|
const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
|
|
113066
113086
|
const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
|
|
113067
|
-
|
|
113068
|
-
|
|
113069
|
-
|
|
113087
|
+
filesForEmit.forEach((sourceFile) => {
|
|
113088
|
+
if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) {
|
|
113089
|
+
collectLinkedAliases(sourceFile);
|
|
113090
|
+
}
|
|
113091
|
+
});
|
|
113070
113092
|
const declarationTransform = transformNodes(
|
|
113071
113093
|
resolver,
|
|
113072
113094
|
host,
|
|
@@ -120118,15 +120140,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
120118
120140
|
const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;
|
|
120119
120141
|
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
|
|
120120
120142
|
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
|
|
120121
|
-
|
|
120122
|
-
|
|
120123
|
-
let bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
|
|
120124
|
-
let checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker2.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
|
|
120143
|
+
let bindDiagnostics = sourceFile.bindDiagnostics;
|
|
120144
|
+
let checkDiagnostics = typeChecker2.getDiagnostics(sourceFile, cancellationToken);
|
|
120125
120145
|
if (isPlainJs) {
|
|
120126
120146
|
bindDiagnostics = filter(bindDiagnostics, (d) => plainJSErrors.has(d.code));
|
|
120127
120147
|
checkDiagnostics = filter(checkDiagnostics, (d) => plainJSErrors.has(d.code));
|
|
120128
120148
|
}
|
|
120129
|
-
return getMergedBindAndCheckDiagnostics(sourceFile,
|
|
120149
|
+
return getMergedBindAndCheckDiagnostics(sourceFile, !isPlainJs, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : void 0);
|
|
120130
120150
|
});
|
|
120131
120151
|
}
|
|
120132
120152
|
function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, ...allDiagnostics) {
|
package/lib/typescript.d.ts
CHANGED
|
@@ -3616,7 +3616,7 @@ declare namespace ts {
|
|
|
3616
3616
|
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
|
|
3617
3617
|
}
|
|
3618
3618
|
}
|
|
3619
|
-
const versionMajorMinor = "5.
|
|
3619
|
+
const versionMajorMinor = "5.6";
|
|
3620
3620
|
/** The version of the TypeScript compiler release */
|
|
3621
3621
|
const version: string;
|
|
3622
3622
|
/**
|
package/lib/typescript.js
CHANGED
|
@@ -260,6 +260,7 @@ __export(typescript_exports, {
|
|
|
260
260
|
canHaveModifiers: () => canHaveModifiers,
|
|
261
261
|
canHaveModuleSpecifier: () => canHaveModuleSpecifier,
|
|
262
262
|
canHaveSymbol: () => canHaveSymbol,
|
|
263
|
+
canIncludeBindAndCheckDiagnsotics: () => canIncludeBindAndCheckDiagnsotics,
|
|
263
264
|
canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
|
|
264
265
|
canProduceDiagnostics: () => canProduceDiagnostics,
|
|
265
266
|
canUsePropertyAccess: () => canUsePropertyAccess,
|
|
@@ -942,7 +943,6 @@ __export(typescript_exports, {
|
|
|
942
943
|
getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment,
|
|
943
944
|
getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,
|
|
944
945
|
getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,
|
|
945
|
-
getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,
|
|
946
946
|
getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,
|
|
947
947
|
getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,
|
|
948
948
|
getNormalizedPathComponents: () => getNormalizedPathComponents,
|
|
@@ -2370,8 +2370,8 @@ __export(typescript_exports, {
|
|
|
2370
2370
|
module.exports = __toCommonJS(typescript_exports);
|
|
2371
2371
|
|
|
2372
2372
|
// src/compiler/corePublic.ts
|
|
2373
|
-
var versionMajorMinor = "5.
|
|
2374
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2373
|
+
var versionMajorMinor = "5.6";
|
|
2374
|
+
var version = `${versionMajorMinor}.0-insiders.20240603`;
|
|
2375
2375
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2376
2376
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2377
2377
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9715,18 +9715,6 @@ var Diagnostics = {
|
|
|
9715
9715
|
This_character_cannot_be_escaped_in_a_regular_expression: diag(1535, 1 /* Error */, "This_character_cannot_be_escaped_in_a_regular_expression_1535", "This character cannot be escaped in a regular expression."),
|
|
9716
9716
|
Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: diag(1536, 1 /* Error */, "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),
|
|
9717
9717
|
Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: diag(1537, 1 /* Error */, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."),
|
|
9718
|
-
A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag(
|
|
9719
|
-
1538,
|
|
9720
|
-
2 /* Suggestion */,
|
|
9721
|
-
"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1538",
|
|
9722
|
-
"A namespace declaration should not be declared using the module keyword. Please use the namespace keyword instead.",
|
|
9723
|
-
/*reportsUnnecessary*/
|
|
9724
|
-
void 0,
|
|
9725
|
-
/*elidedInCompatabilityPyramid*/
|
|
9726
|
-
void 0,
|
|
9727
|
-
/*reportsDeprecated*/
|
|
9728
|
-
true
|
|
9729
|
-
),
|
|
9730
9718
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
9731
9719
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
9732
9720
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -13414,7 +13402,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13414
13402
|
pos++;
|
|
13415
13403
|
let regExpFlags = 0 /* None */;
|
|
13416
13404
|
while (true) {
|
|
13417
|
-
const ch =
|
|
13405
|
+
const ch = charCodeChecked(pos);
|
|
13418
13406
|
if (ch === -1 /* EOF */ || !isIdentifierPart(ch, languageVersion)) {
|
|
13419
13407
|
break;
|
|
13420
13408
|
}
|
|
@@ -14665,10 +14653,10 @@ var binaryUnicodeProperties = /* @__PURE__ */ new Set(["ASCII", "ASCII_Hex_Digit
|
|
|
14665
14653
|
var binaryUnicodePropertiesOfStrings = /* @__PURE__ */ new Set(["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"]);
|
|
14666
14654
|
var valuesOfNonBinaryUnicodeProperties = {
|
|
14667
14655
|
General_Category: /* @__PURE__ */ new Set(["C", "Other", "Cc", "Control", "cntrl", "Cf", "Format", "Cn", "Unassigned", "Co", "Private_Use", "Cs", "Surrogate", "L", "Letter", "LC", "Cased_Letter", "Ll", "Lowercase_Letter", "Lm", "Modifier_Letter", "Lo", "Other_Letter", "Lt", "Titlecase_Letter", "Lu", "Uppercase_Letter", "M", "Mark", "Combining_Mark", "Mc", "Spacing_Mark", "Me", "Enclosing_Mark", "Mn", "Nonspacing_Mark", "N", "Number", "Nd", "Decimal_Number", "digit", "Nl", "Letter_Number", "No", "Other_Number", "P", "Punctuation", "punct", "Pc", "Connector_Punctuation", "Pd", "Dash_Punctuation", "Pe", "Close_Punctuation", "Pf", "Final_Punctuation", "Pi", "Initial_Punctuation", "Po", "Other_Punctuation", "Ps", "Open_Punctuation", "S", "Symbol", "Sc", "Currency_Symbol", "Sk", "Modifier_Symbol", "Sm", "Math_Symbol", "So", "Other_Symbol", "Z", "Separator", "Zl", "Line_Separator", "Zp", "Paragraph_Separator", "Zs", "Space_Separator"]),
|
|
14668
|
-
Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "
|
|
14669
|
-
Script_Extensions:
|
|
14670
|
-
// Currently empty
|
|
14656
|
+
Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "Arab", "Arabic", "Armi", "Imperial_Aramaic", "Armn", "Armenian", "Avst", "Avestan", "Bali", "Balinese", "Bamu", "Bamum", "Bass", "Bassa_Vah", "Batk", "Batak", "Beng", "Bengali", "Bhks", "Bhaiksuki", "Bopo", "Bopomofo", "Brah", "Brahmi", "Brai", "Braille", "Bugi", "Buginese", "Buhd", "Buhid", "Cakm", "Chakma", "Cans", "Canadian_Aboriginal", "Cari", "Carian", "Cham", "Cher", "Cherokee", "Chrs", "Chorasmian", "Copt", "Coptic", "Qaac", "Cpmn", "Cypro_Minoan", "Cprt", "Cypriot", "Cyrl", "Cyrillic", "Deva", "Devanagari", "Diak", "Dives_Akuru", "Dogr", "Dogra", "Dsrt", "Deseret", "Dupl", "Duployan", "Egyp", "Egyptian_Hieroglyphs", "Elba", "Elbasan", "Elym", "Elymaic", "Ethi", "Ethiopic", "Geor", "Georgian", "Glag", "Glagolitic", "Gong", "Gunjala_Gondi", "Gonm", "Masaram_Gondi", "Goth", "Gothic", "Gran", "Grantha", "Grek", "Greek", "Gujr", "Gujarati", "Guru", "Gurmukhi", "Hang", "Hangul", "Hani", "Han", "Hano", "Hanunoo", "Hatr", "Hatran", "Hebr", "Hebrew", "Hira", "Hiragana", "Hluw", "Anatolian_Hieroglyphs", "Hmng", "Pahawh_Hmong", "Hmnp", "Nyiakeng_Puachue_Hmong", "Hrkt", "Katakana_Or_Hiragana", "Hung", "Old_Hungarian", "Ital", "Old_Italic", "Java", "Javanese", "Kali", "Kayah_Li", "Kana", "Katakana", "Kawi", "Khar", "Kharoshthi", "Khmr", "Khmer", "Khoj", "Khojki", "Kits", "Khitan_Small_Script", "Knda", "Kannada", "Kthi", "Kaithi", "Lana", "Tai_Tham", "Laoo", "Lao", "Latn", "Latin", "Lepc", "Lepcha", "Limb", "Limbu", "Lina", "Linear_A", "Linb", "Linear_B", "Lisu", "Lyci", "Lycian", "Lydi", "Lydian", "Mahj", "Mahajani", "Maka", "Makasar", "Mand", "Mandaic", "Mani", "Manichaean", "Marc", "Marchen", "Medf", "Medefaidrin", "Mend", "Mende_Kikakui", "Merc", "Meroitic_Cursive", "Mero", "Meroitic_Hieroglyphs", "Mlym", "Malayalam", "Modi", "Mong", "Mongolian", "Mroo", "Mro", "Mtei", "Meetei_Mayek", "Mult", "Multani", "Mymr", "Myanmar", "Nagm", "Nag_Mundari", "Nand", "Nandinagari", "Narb", "Old_North_Arabian", "Nbat", "Nabataean", "Newa", "Nkoo", "Nko", "Nshu", "Nushu", "Ogam", "Ogham", "Olck", "Ol_Chiki", "Orkh", "Old_Turkic", "Orya", "Oriya", "Osge", "Osage", "Osma", "Osmanya", "Ougr", "Old_Uyghur", "Palm", "Palmyrene", "Pauc", "Pau_Cin_Hau", "Perm", "Old_Permic", "Phag", "Phags_Pa", "Phli", "Inscriptional_Pahlavi", "Phlp", "Psalter_Pahlavi", "Phnx", "Phoenician", "Plrd", "Miao", "Prti", "Inscriptional_Parthian", "Rjng", "Rejang", "Rohg", "Hanifi_Rohingya", "Runr", "Runic", "Samr", "Samaritan", "Sarb", "Old_South_Arabian", "Saur", "Saurashtra", "Sgnw", "SignWriting", "Shaw", "Shavian", "Shrd", "Sharada", "Sidd", "Siddham", "Sind", "Khudawadi", "Sinh", "Sinhala", "Sogd", "Sogdian", "Sogo", "Old_Sogdian", "Sora", "Sora_Sompeng", "Soyo", "Soyombo", "Sund", "Sundanese", "Sylo", "Syloti_Nagri", "Syrc", "Syriac", "Tagb", "Tagbanwa", "Takr", "Takri", "Tale", "Tai_Le", "Talu", "New_Tai_Lue", "Taml", "Tamil", "Tang", "Tangut", "Tavt", "Tai_Viet", "Telu", "Telugu", "Tfng", "Tifinagh", "Tglg", "Tagalog", "Thaa", "Thaana", "Thai", "Tibt", "Tibetan", "Tirh", "Tirhuta", "Tnsa", "Tangsa", "Toto", "Ugar", "Ugaritic", "Vaii", "Vai", "Vith", "Vithkuqi", "Wara", "Warang_Citi", "Wcho", "Wancho", "Xpeo", "Old_Persian", "Xsux", "Cuneiform", "Yezi", "Yezidi", "Yiii", "Yi", "Zanb", "Zanabazar_Square", "Zinh", "Inherited", "Qaai", "Zyyy", "Common", "Zzzz", "Unknown"]),
|
|
14657
|
+
Script_Extensions: void 0
|
|
14671
14658
|
};
|
|
14659
|
+
valuesOfNonBinaryUnicodeProperties.Script_Extensions = valuesOfNonBinaryUnicodeProperties.Script;
|
|
14672
14660
|
|
|
14673
14661
|
// src/compiler/utilitiesPublic.ts
|
|
14674
14662
|
function isExternalModuleNameRelative(moduleName) {
|
|
@@ -16601,13 +16589,6 @@ function getNonDecoratorTokenPosOfNode(node, sourceFile) {
|
|
|
16601
16589
|
}
|
|
16602
16590
|
return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end);
|
|
16603
16591
|
}
|
|
16604
|
-
function getNonModifierTokenPosOfNode(node, sourceFile) {
|
|
16605
|
-
const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0;
|
|
16606
|
-
if (!lastModifier) {
|
|
16607
|
-
return getTokenPosOfNode(node, sourceFile);
|
|
16608
|
-
}
|
|
16609
|
-
return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end);
|
|
16610
|
-
}
|
|
16611
16592
|
function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) {
|
|
16612
16593
|
return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia);
|
|
16613
16594
|
}
|
|
@@ -17534,6 +17515,26 @@ function getErrorSpanForNode(sourceFile, node) {
|
|
|
17534
17515
|
const pos2 = skipTrivia(sourceFile.text, node.tagName.pos);
|
|
17535
17516
|
return getSpanOfTokenAtPosition(sourceFile, pos2);
|
|
17536
17517
|
}
|
|
17518
|
+
case 176 /* Constructor */: {
|
|
17519
|
+
const constructorDeclaration = node;
|
|
17520
|
+
const start = skipTrivia(sourceFile.text, constructorDeclaration.pos);
|
|
17521
|
+
const scanner2 = createScanner(
|
|
17522
|
+
sourceFile.languageVersion,
|
|
17523
|
+
/*skipTrivia*/
|
|
17524
|
+
true,
|
|
17525
|
+
sourceFile.languageVariant,
|
|
17526
|
+
sourceFile.text,
|
|
17527
|
+
/*onError*/
|
|
17528
|
+
void 0,
|
|
17529
|
+
start
|
|
17530
|
+
);
|
|
17531
|
+
let token = scanner2.scan();
|
|
17532
|
+
while (token !== 137 /* ConstructorKeyword */ && token !== 1 /* EndOfFileToken */) {
|
|
17533
|
+
token = scanner2.scan();
|
|
17534
|
+
}
|
|
17535
|
+
const end = scanner2.getTokenEnd();
|
|
17536
|
+
return createTextSpanFromBounds(start, end);
|
|
17537
|
+
}
|
|
17537
17538
|
}
|
|
17538
17539
|
if (errorNode === void 0) {
|
|
17539
17540
|
return getSpanOfTokenAtPosition(sourceFile, node.pos);
|
|
@@ -22531,7 +22532,15 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
|
|
|
22531
22532
|
return { pos, end };
|
|
22532
22533
|
}
|
|
22533
22534
|
function skipTypeChecking(sourceFile, options, host) {
|
|
22534
|
-
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
|
|
22535
|
+
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnsotics(sourceFile, options);
|
|
22536
|
+
}
|
|
22537
|
+
function canIncludeBindAndCheckDiagnsotics(sourceFile, options) {
|
|
22538
|
+
if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
|
|
22539
|
+
if (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */) return true;
|
|
22540
|
+
const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;
|
|
22541
|
+
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
|
|
22542
|
+
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
|
|
22543
|
+
return isPlainJs || isCheckJs || sourceFile.scriptKind === 7 /* Deferred */;
|
|
22535
22544
|
}
|
|
22536
22545
|
function isJsonEqual(a, b) {
|
|
22537
22546
|
return a === b || typeof a === "object" && a !== null && typeof b === "object" && b !== null && equalOwnProperties(a, b, isJsonEqual);
|
|
@@ -54044,7 +54053,7 @@ function createTypeChecker(host) {
|
|
|
54044
54053
|
return noMappedTypes && mappedType !== type ? void 0 : mappedType;
|
|
54045
54054
|
}
|
|
54046
54055
|
function setTextRange2(context, range, location) {
|
|
54047
|
-
if (!nodeIsSynthesized(range)
|
|
54056
|
+
if (!nodeIsSynthesized(range) || !(range.flags & 16 /* Synthesized */) || !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(range))) {
|
|
54048
54057
|
range = factory.cloneNode(range);
|
|
54049
54058
|
}
|
|
54050
54059
|
if (range === location) return range;
|
|
@@ -54983,7 +54992,8 @@ function createTypeChecker(host) {
|
|
|
54983
54992
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
54984
54993
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
54985
54994
|
typeElements.push(
|
|
54986
|
-
|
|
54995
|
+
setCommentRange2(
|
|
54996
|
+
context,
|
|
54987
54997
|
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
54988
54998
|
getterDeclaration
|
|
54989
54999
|
)
|
|
@@ -54991,7 +55001,8 @@ function createTypeChecker(host) {
|
|
|
54991
55001
|
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
54992
55002
|
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
54993
55003
|
typeElements.push(
|
|
54994
|
-
|
|
55004
|
+
setCommentRange2(
|
|
55005
|
+
context,
|
|
54995
55006
|
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
54996
55007
|
setterDeclaration
|
|
54997
55008
|
)
|
|
@@ -55049,11 +55060,17 @@ function createTypeChecker(host) {
|
|
|
55049
55060
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
55050
55061
|
}
|
|
55051
55062
|
} else if (propertySymbol.valueDeclaration) {
|
|
55052
|
-
|
|
55063
|
+
setCommentRange2(context, node, propertySymbol.valueDeclaration);
|
|
55053
55064
|
}
|
|
55054
55065
|
return node;
|
|
55055
55066
|
}
|
|
55056
55067
|
}
|
|
55068
|
+
function setCommentRange2(context, node, range) {
|
|
55069
|
+
if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(range)) {
|
|
55070
|
+
return setCommentRange(node, range);
|
|
55071
|
+
}
|
|
55072
|
+
return node;
|
|
55073
|
+
}
|
|
55057
55074
|
function mapToTypeNodes(types, context, isBareList) {
|
|
55058
55075
|
if (some(types)) {
|
|
55059
55076
|
if (checkTruncationLength(context)) {
|
|
@@ -55829,7 +55846,7 @@ function createTypeChecker(host) {
|
|
|
55829
55846
|
return false;
|
|
55830
55847
|
}
|
|
55831
55848
|
function typeParameterToName(type, context) {
|
|
55832
|
-
var _a, _b;
|
|
55849
|
+
var _a, _b, _c, _d;
|
|
55833
55850
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) {
|
|
55834
55851
|
const cached = context.typeParameterNames.get(getTypeId(type));
|
|
55835
55852
|
if (cached) {
|
|
@@ -55846,11 +55863,15 @@ function createTypeChecker(host) {
|
|
|
55846
55863
|
if (!(result.kind & 80 /* Identifier */)) {
|
|
55847
55864
|
return factory.createIdentifier("(Missing type parameter)");
|
|
55848
55865
|
}
|
|
55866
|
+
const decl = (_b = (_a = type.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0];
|
|
55867
|
+
if (decl && isTypeParameterDeclaration(decl)) {
|
|
55868
|
+
result = setTextRange2(context, result, decl.name);
|
|
55869
|
+
}
|
|
55849
55870
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
55850
55871
|
const rawtext = result.escapedText;
|
|
55851
|
-
let i = ((
|
|
55872
|
+
let i = ((_c = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _c.get(rawtext)) || 0;
|
|
55852
55873
|
let text = rawtext;
|
|
55853
|
-
while (((
|
|
55874
|
+
while (((_d = context.typeParameterNamesByText) == null ? void 0 : _d.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
55854
55875
|
i++;
|
|
55855
55876
|
text = `${rawtext}_${i}`;
|
|
55856
55877
|
}
|
|
@@ -56289,13 +56310,14 @@ function createTypeChecker(host) {
|
|
|
56289
56310
|
}
|
|
56290
56311
|
return node;
|
|
56291
56312
|
}
|
|
56292
|
-
return result
|
|
56313
|
+
return result ? setTextRange2(context, result, node) : void 0;
|
|
56293
56314
|
}
|
|
56294
56315
|
function createRecoveryBoundary() {
|
|
56316
|
+
let trackedSymbols;
|
|
56295
56317
|
let unreportedErrors;
|
|
56296
56318
|
const oldTracker = context.tracker;
|
|
56297
56319
|
const oldTrackedSymbols = context.trackedSymbols;
|
|
56298
|
-
context.trackedSymbols =
|
|
56320
|
+
context.trackedSymbols = void 0;
|
|
56299
56321
|
const oldEncounteredError = context.encounteredError;
|
|
56300
56322
|
context.tracker = new SymbolTrackerImpl(context, {
|
|
56301
56323
|
...oldTracker.inner,
|
|
@@ -56315,17 +56337,7 @@ function createTypeChecker(host) {
|
|
|
56315
56337
|
markError(() => oldTracker.reportNonSerializableProperty(name));
|
|
56316
56338
|
},
|
|
56317
56339
|
trackSymbol(sym, decl, meaning) {
|
|
56318
|
-
|
|
56319
|
-
sym,
|
|
56320
|
-
decl,
|
|
56321
|
-
meaning,
|
|
56322
|
-
/*shouldComputeAliasesToMakeVisible*/
|
|
56323
|
-
false
|
|
56324
|
-
);
|
|
56325
|
-
if (accessibility.accessibility !== 0 /* Accessible */) {
|
|
56326
|
-
(context.trackedSymbols ?? (context.trackedSymbols = [])).push([sym, decl, meaning]);
|
|
56327
|
-
return true;
|
|
56328
|
-
}
|
|
56340
|
+
(trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]);
|
|
56329
56341
|
return false;
|
|
56330
56342
|
},
|
|
56331
56343
|
moduleResolverHost: context.tracker.moduleResolverHost
|
|
@@ -56339,13 +56351,12 @@ function createTypeChecker(host) {
|
|
|
56339
56351
|
(unreportedErrors ?? (unreportedErrors = [])).push(unreportedError);
|
|
56340
56352
|
}
|
|
56341
56353
|
function startRecoveryScope2() {
|
|
56342
|
-
|
|
56343
|
-
const initialTrackedSymbolsTop = ((_a = context.trackedSymbols) == null ? void 0 : _a.length) ?? 0;
|
|
56354
|
+
const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0;
|
|
56344
56355
|
const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0;
|
|
56345
56356
|
return () => {
|
|
56346
56357
|
hadError = false;
|
|
56347
|
-
if (
|
|
56348
|
-
|
|
56358
|
+
if (trackedSymbols) {
|
|
56359
|
+
trackedSymbols.length = trackedSymbolsTop;
|
|
56349
56360
|
}
|
|
56350
56361
|
if (unreportedErrors) {
|
|
56351
56362
|
unreportedErrors.length = unreportedErrorsTop;
|
|
@@ -56354,14 +56365,13 @@ function createTypeChecker(host) {
|
|
|
56354
56365
|
}
|
|
56355
56366
|
function finalizeBoundary2() {
|
|
56356
56367
|
context.tracker = oldTracker;
|
|
56357
|
-
const newTrackedSymbols = context.trackedSymbols;
|
|
56358
56368
|
context.trackedSymbols = oldTrackedSymbols;
|
|
56359
56369
|
context.encounteredError = oldEncounteredError;
|
|
56360
56370
|
unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn());
|
|
56361
56371
|
if (hadError) {
|
|
56362
56372
|
return false;
|
|
56363
56373
|
}
|
|
56364
|
-
|
|
56374
|
+
trackedSymbols == null ? void 0 : trackedSymbols.forEach(
|
|
56365
56375
|
([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
|
|
56366
56376
|
symbol,
|
|
56367
56377
|
enclosingDeclaration,
|
|
@@ -56545,12 +56555,7 @@ function createTypeChecker(host) {
|
|
|
56545
56555
|
}
|
|
56546
56556
|
}
|
|
56547
56557
|
if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) {
|
|
56548
|
-
let visited =
|
|
56549
|
-
node,
|
|
56550
|
-
visitExistingNodeTreeSymbols,
|
|
56551
|
-
/*context*/
|
|
56552
|
-
void 0
|
|
56553
|
-
);
|
|
56558
|
+
let visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
56554
56559
|
if (visited === node) {
|
|
56555
56560
|
visited = setTextRange2(context, factory.cloneNode(node), node);
|
|
56556
56561
|
}
|
|
@@ -56611,12 +56616,7 @@ function createTypeChecker(host) {
|
|
|
56611
56616
|
return factory.updateTypePredicateNode(node, node.assertsModifier, parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
56612
56617
|
}
|
|
56613
56618
|
if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) {
|
|
56614
|
-
const visited =
|
|
56615
|
-
node,
|
|
56616
|
-
visitExistingNodeTreeSymbols,
|
|
56617
|
-
/*context*/
|
|
56618
|
-
void 0
|
|
56619
|
-
);
|
|
56619
|
+
const visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
56620
56620
|
const clone2 = setTextRange2(context, visited === node ? factory.cloneNode(node) : visited, node);
|
|
56621
56621
|
const flags = getEmitFlags(clone2);
|
|
56622
56622
|
setEmitFlags(clone2, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */));
|
|
@@ -56659,12 +56659,29 @@ function createTypeChecker(host) {
|
|
|
56659
56659
|
}
|
|
56660
56660
|
}
|
|
56661
56661
|
}
|
|
56662
|
-
return
|
|
56663
|
-
|
|
56664
|
-
|
|
56665
|
-
|
|
56666
|
-
|
|
56667
|
-
|
|
56662
|
+
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
56663
|
+
function visitEachChild2(node2, visitor) {
|
|
56664
|
+
const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2);
|
|
56665
|
+
return visitEachChild(
|
|
56666
|
+
node2,
|
|
56667
|
+
visitor,
|
|
56668
|
+
/*context*/
|
|
56669
|
+
void 0,
|
|
56670
|
+
nonlocalNode ? visitNodesWithoutCopyingPositions : void 0
|
|
56671
|
+
);
|
|
56672
|
+
}
|
|
56673
|
+
function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) {
|
|
56674
|
+
let result = visitNodes2(nodes, visitor, test, start, count);
|
|
56675
|
+
if (result) {
|
|
56676
|
+
if (result.pos !== -1 || result.end !== -1) {
|
|
56677
|
+
if (result === nodes) {
|
|
56678
|
+
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
|
56679
|
+
}
|
|
56680
|
+
setTextRangePosEnd(result, -1, -1);
|
|
56681
|
+
}
|
|
56682
|
+
}
|
|
56683
|
+
return result;
|
|
56684
|
+
}
|
|
56668
56685
|
function getEffectiveDotDotDotForParameter(p) {
|
|
56669
56686
|
return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0);
|
|
56670
56687
|
}
|
|
@@ -61730,7 +61747,16 @@ function createTypeChecker(host) {
|
|
|
61730
61747
|
}
|
|
61731
61748
|
}
|
|
61732
61749
|
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
|
61733
|
-
|
|
61750
|
+
if (type === thisArgument) {
|
|
61751
|
+
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
61752
|
+
type,
|
|
61753
|
+
thisArgument,
|
|
61754
|
+
/*needApparentType*/
|
|
61755
|
+
true
|
|
61756
|
+
));
|
|
61757
|
+
}
|
|
61758
|
+
const key = `I${getTypeId(type)},${getTypeId(thisArgument)}`;
|
|
61759
|
+
return getCachedType(key) ?? setCachedType(key, getTypeWithThisArgument(
|
|
61734
61760
|
type,
|
|
61735
61761
|
thisArgument,
|
|
61736
61762
|
/*needApparentType*/
|
|
@@ -87772,14 +87798,6 @@ function createTypeChecker(host) {
|
|
|
87772
87798
|
}
|
|
87773
87799
|
if (isIdentifier(node.name)) {
|
|
87774
87800
|
checkCollisionsForDeclarationName(node, node.name);
|
|
87775
|
-
if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) {
|
|
87776
|
-
const sourceFile = getSourceFileOfNode(node);
|
|
87777
|
-
const pos = getNonModifierTokenPosOfNode(node);
|
|
87778
|
-
const span = getSpanOfTokenAtPosition(sourceFile, pos);
|
|
87779
|
-
suggestionDiagnostics.add(
|
|
87780
|
-
createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead)
|
|
87781
|
-
);
|
|
87782
|
-
}
|
|
87783
87801
|
}
|
|
87784
87802
|
checkExportsOnMergedDeclarations(node);
|
|
87785
87803
|
const symbol = getSymbolOfDeclaration(node);
|
|
@@ -89817,7 +89835,7 @@ function createTypeChecker(host) {
|
|
|
89817
89835
|
return !!(getNodeCheckFlags(node) & flag);
|
|
89818
89836
|
}
|
|
89819
89837
|
function calculateNodeCheckFlagWorker(node, flag) {
|
|
89820
|
-
if (!compilerOptions.noCheck) {
|
|
89838
|
+
if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnsotics(getSourceFileOfNode(node), compilerOptions)) {
|
|
89821
89839
|
return;
|
|
89822
89840
|
}
|
|
89823
89841
|
const links = getNodeLinks(node);
|
|
@@ -117974,9 +117992,11 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
117974
117992
|
emitSkipped = true;
|
|
117975
117993
|
return;
|
|
117976
117994
|
}
|
|
117977
|
-
|
|
117978
|
-
(
|
|
117979
|
-
|
|
117995
|
+
(isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(
|
|
117996
|
+
(sourceFile) => {
|
|
117997
|
+
if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
|
|
117998
|
+
}
|
|
117999
|
+
);
|
|
117980
118000
|
const transform2 = transformNodes(
|
|
117981
118001
|
resolver,
|
|
117982
118002
|
host,
|
|
@@ -118026,9 +118046,11 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
118026
118046
|
const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
|
|
118027
118047
|
const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
|
|
118028
118048
|
const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
|
|
118029
|
-
|
|
118030
|
-
|
|
118031
|
-
|
|
118049
|
+
filesForEmit.forEach((sourceFile) => {
|
|
118050
|
+
if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) {
|
|
118051
|
+
collectLinkedAliases(sourceFile);
|
|
118052
|
+
}
|
|
118053
|
+
});
|
|
118032
118054
|
const declarationTransform = transformNodes(
|
|
118033
118055
|
resolver,
|
|
118034
118056
|
host,
|
|
@@ -125126,15 +125148,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
125126
125148
|
const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */;
|
|
125127
125149
|
const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options);
|
|
125128
125150
|
const isPlainJs = isPlainJsFile(sourceFile, options.checkJs);
|
|
125129
|
-
|
|
125130
|
-
|
|
125131
|
-
let bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
|
|
125132
|
-
let checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker2.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
|
|
125151
|
+
let bindDiagnostics = sourceFile.bindDiagnostics;
|
|
125152
|
+
let checkDiagnostics = typeChecker2.getDiagnostics(sourceFile, cancellationToken);
|
|
125133
125153
|
if (isPlainJs) {
|
|
125134
125154
|
bindDiagnostics = filter(bindDiagnostics, (d) => plainJSErrors.has(d.code));
|
|
125135
125155
|
checkDiagnostics = filter(checkDiagnostics, (d) => plainJSErrors.has(d.code));
|
|
125136
125156
|
}
|
|
125137
|
-
return getMergedBindAndCheckDiagnostics(sourceFile,
|
|
125157
|
+
return getMergedBindAndCheckDiagnostics(sourceFile, !isPlainJs, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : void 0);
|
|
125138
125158
|
});
|
|
125139
125159
|
}
|
|
125140
125160
|
function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, ...allDiagnostics) {
|
|
@@ -158656,6 +158676,7 @@ function withContext(context, typePrintMode, cb) {
|
|
|
158656
158676
|
textChanges: changeTracker.getChanges()
|
|
158657
158677
|
};
|
|
158658
158678
|
function addTypeAnnotation(span) {
|
|
158679
|
+
context.cancellationToken.throwIfCancellationRequested();
|
|
158659
158680
|
const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);
|
|
158660
158681
|
const expandoFunction = findExpandoFunction(nodeWithDiag);
|
|
158661
158682
|
if (expandoFunction) {
|
|
@@ -158727,6 +158748,7 @@ function withContext(context, typePrintMode, cb) {
|
|
|
158727
158748
|
return factory.createAsExpression(factory.createSatisfiesExpression(node, getSynthesizedDeepClone(type)), type);
|
|
158728
158749
|
}
|
|
158729
158750
|
function addInlineAssertion(span) {
|
|
158751
|
+
context.cancellationToken.throwIfCancellationRequested();
|
|
158730
158752
|
const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);
|
|
158731
158753
|
const expandoFunction = findExpandoFunction(nodeWithDiag);
|
|
158732
158754
|
if (expandoFunction) return;
|
|
@@ -158784,6 +158806,7 @@ function withContext(context, typePrintMode, cb) {
|
|
|
158784
158806
|
return [Diagnostics.Add_satisfies_and_an_inline_type_assertion_with_0, typeToStringForDiag(typeNode)];
|
|
158785
158807
|
}
|
|
158786
158808
|
function extractAsVariable(span) {
|
|
158809
|
+
context.cancellationToken.throwIfCancellationRequested();
|
|
158787
158810
|
const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);
|
|
158788
158811
|
const targetNode = findBestFittingNode(nodeWithDiag, span);
|
|
158789
158812
|
if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return;
|
|
@@ -160694,7 +160717,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con
|
|
|
160694
160717
|
switch (kind) {
|
|
160695
160718
|
case 171 /* PropertySignature */:
|
|
160696
160719
|
case 172 /* PropertyDeclaration */:
|
|
160697
|
-
|
|
160720
|
+
let flags = 1 /* NoTruncation */;
|
|
160721
|
+
flags |= quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0;
|
|
160698
160722
|
let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context));
|
|
160699
160723
|
if (importAdder) {
|
|
160700
160724
|
const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
|
|
@@ -178421,6 +178445,7 @@ __export(ts_exports2, {
|
|
|
178421
178445
|
canHaveModifiers: () => canHaveModifiers,
|
|
178422
178446
|
canHaveModuleSpecifier: () => canHaveModuleSpecifier,
|
|
178423
178447
|
canHaveSymbol: () => canHaveSymbol,
|
|
178448
|
+
canIncludeBindAndCheckDiagnsotics: () => canIncludeBindAndCheckDiagnsotics,
|
|
178424
178449
|
canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
|
|
178425
178450
|
canProduceDiagnostics: () => canProduceDiagnostics,
|
|
178426
178451
|
canUsePropertyAccess: () => canUsePropertyAccess,
|
|
@@ -179103,7 +179128,6 @@ __export(ts_exports2, {
|
|
|
179103
179128
|
getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment,
|
|
179104
179129
|
getNonAugmentationDeclaration: () => getNonAugmentationDeclaration,
|
|
179105
179130
|
getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode,
|
|
179106
|
-
getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode,
|
|
179107
179131
|
getNormalizedAbsolutePath: () => getNormalizedAbsolutePath,
|
|
179108
179132
|
getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot,
|
|
179109
179133
|
getNormalizedPathComponents: () => getNormalizedPathComponents,
|
|
@@ -184657,8 +184681,23 @@ function findProjectByName(projectName, projects) {
|
|
|
184657
184681
|
}
|
|
184658
184682
|
var noopConfigFileWatcher = { close: noop };
|
|
184659
184683
|
function getConfigFileNameFromCache(info, cache) {
|
|
184660
|
-
if (!cache
|
|
184661
|
-
|
|
184684
|
+
if (!cache) return void 0;
|
|
184685
|
+
const configFileForOpenFile = cache.get(info.path);
|
|
184686
|
+
if (configFileForOpenFile === void 0) return void 0;
|
|
184687
|
+
if (!isAncestorConfigFileInfo(info)) {
|
|
184688
|
+
return isString(configFileForOpenFile) || !configFileForOpenFile ? configFileForOpenFile : (
|
|
184689
|
+
// direct result
|
|
184690
|
+
configFileForOpenFile.get(
|
|
184691
|
+
/*key*/
|
|
184692
|
+
false
|
|
184693
|
+
)
|
|
184694
|
+
);
|
|
184695
|
+
} else {
|
|
184696
|
+
return configFileForOpenFile && !isString(configFileForOpenFile) ? (
|
|
184697
|
+
// Map with fileName as key
|
|
184698
|
+
configFileForOpenFile.get(info.fileName)
|
|
184699
|
+
) : void 0;
|
|
184700
|
+
}
|
|
184662
184701
|
}
|
|
184663
184702
|
function isOpenScriptInfo(infoOrFileNameOrConfig) {
|
|
184664
184703
|
return !!infoOrFileNameOrConfig.containingProjects;
|
|
@@ -184672,13 +184711,15 @@ var ConfiguredProjectLoadKind = /* @__PURE__ */ ((ConfiguredProjectLoadKind2) =>
|
|
|
184672
184711
|
ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Reload"] = 2] = "Reload";
|
|
184673
184712
|
return ConfiguredProjectLoadKind2;
|
|
184674
184713
|
})(ConfiguredProjectLoadKind || {});
|
|
184675
|
-
function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, delayReloadedConfiguredProjects) {
|
|
184714
|
+
function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, searchOnlyPotentialSolution, delayReloadedConfiguredProjects) {
|
|
184676
184715
|
while (true) {
|
|
184677
|
-
if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project
|
|
184716
|
+
if (!project.isInitialLoadPending() && (searchOnlyPotentialSolution && !project.getCompilerOptions().composite || // TODO: Should this flag be shared between trying to load solution for find all references vs trying to find default project
|
|
184717
|
+
project.getCompilerOptions().disableSolutionSearching)) return;
|
|
184678
184718
|
const configFileName = project.projectService.getConfigFileNameForFile({
|
|
184679
184719
|
fileName: project.getConfigFilePath(),
|
|
184680
184720
|
path: info.path,
|
|
184681
|
-
configFileInfo: true
|
|
184721
|
+
configFileInfo: true,
|
|
184722
|
+
isForDefaultProject: !searchOnlyPotentialSolution
|
|
184682
184723
|
}, kind === 0 /* Find */);
|
|
184683
184724
|
if (!configFileName) return;
|
|
184684
184725
|
const ancestor = project.projectService.findCreateOrReloadConfiguredProject(
|
|
@@ -184686,11 +184727,11 @@ function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredCl
|
|
|
184686
184727
|
kind,
|
|
184687
184728
|
reason,
|
|
184688
184729
|
allowDeferredClosed,
|
|
184689
|
-
|
|
184690
|
-
|
|
184730
|
+
!searchOnlyPotentialSolution ? info.fileName : void 0,
|
|
184731
|
+
// Config Diag event for project if its for default project
|
|
184691
184732
|
reloadedProjects,
|
|
184692
|
-
|
|
184693
|
-
|
|
184733
|
+
searchOnlyPotentialSolution,
|
|
184734
|
+
// Delay load if we are searching for solution
|
|
184694
184735
|
delayReloadedConfiguredProjects
|
|
184695
184736
|
);
|
|
184696
184737
|
if (!ancestor) return;
|
|
@@ -185791,7 +185832,7 @@ var _ProjectService = class _ProjectService {
|
|
|
185791
185832
|
configFileExists(configFileName, canonicalConfigFilePath, info) {
|
|
185792
185833
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
185793
185834
|
let openFilesImpactedByConfigFile;
|
|
185794
|
-
if (this.openFiles.has(info.path) && !isAncestorConfigFileInfo(info)) {
|
|
185835
|
+
if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) {
|
|
185795
185836
|
if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);
|
|
185796
185837
|
else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path);
|
|
185797
185838
|
}
|
|
@@ -185919,24 +185960,31 @@ var _ProjectService = class _ProjectService {
|
|
|
185919
185960
|
let searchPath = asNormalizedPath(getDirectoryPath(info.fileName));
|
|
185920
185961
|
const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames);
|
|
185921
185962
|
const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot();
|
|
185922
|
-
let
|
|
185963
|
+
let searchTsconfig = true;
|
|
185964
|
+
let searchJsconfig = true;
|
|
185965
|
+
if (isAncestorConfigFileInfo(info)) {
|
|
185966
|
+
if (endsWith(info.fileName, "tsconfig.json")) searchTsconfig = false;
|
|
185967
|
+
else searchTsconfig = searchJsconfig = false;
|
|
185968
|
+
}
|
|
185923
185969
|
do {
|
|
185924
|
-
|
|
185925
|
-
|
|
185970
|
+
const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName);
|
|
185971
|
+
if (searchTsconfig) {
|
|
185926
185972
|
const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json"));
|
|
185927
|
-
|
|
185973
|
+
const result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName);
|
|
185928
185974
|
if (result) return tsconfigFileName;
|
|
185975
|
+
}
|
|
185976
|
+
if (searchJsconfig) {
|
|
185929
185977
|
const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json"));
|
|
185930
|
-
result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
|
|
185978
|
+
const result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
|
|
185931
185979
|
if (result) return jsconfigFileName;
|
|
185932
|
-
|
|
185933
|
-
|
|
185934
|
-
|
|
185980
|
+
}
|
|
185981
|
+
if (isNodeModulesDirectory(canonicalSearchPath)) {
|
|
185982
|
+
break;
|
|
185935
185983
|
}
|
|
185936
185984
|
const parentPath = asNormalizedPath(getDirectoryPath(searchPath));
|
|
185937
185985
|
if (parentPath === searchPath) break;
|
|
185938
185986
|
searchPath = parentPath;
|
|
185939
|
-
|
|
185987
|
+
searchTsconfig = searchJsconfig = true;
|
|
185940
185988
|
} while (anySearchPathOk || isSearchPathInProjectRoot());
|
|
185941
185989
|
return void 0;
|
|
185942
185990
|
}
|
|
@@ -185959,8 +186007,19 @@ var _ProjectService = class _ProjectService {
|
|
|
185959
186007
|
/** Caches the configFilename for script info or ancestor of open script info */
|
|
185960
186008
|
setConfigFileNameForFileInCache(info, configFileName) {
|
|
185961
186009
|
if (!this.openFiles.has(info.path)) return;
|
|
185962
|
-
|
|
185963
|
-
|
|
186010
|
+
const config = configFileName || false;
|
|
186011
|
+
if (!isAncestorConfigFileInfo(info)) {
|
|
186012
|
+
this.configFileForOpenFiles.set(info.path, config);
|
|
186013
|
+
} else {
|
|
186014
|
+
let configFileForOpenFile = this.configFileForOpenFiles.get(info.path);
|
|
186015
|
+
if (!configFileForOpenFile || isString(configFileForOpenFile)) {
|
|
186016
|
+
this.configFileForOpenFiles.set(
|
|
186017
|
+
info.path,
|
|
186018
|
+
configFileForOpenFile = (/* @__PURE__ */ new Map()).set(false, configFileForOpenFile)
|
|
186019
|
+
);
|
|
186020
|
+
}
|
|
186021
|
+
configFileForOpenFile.set(info.fileName, config);
|
|
186022
|
+
}
|
|
185964
186023
|
}
|
|
185965
186024
|
/**
|
|
185966
186025
|
* This function tries to search for a tsconfig.json for the given file.
|
|
@@ -187337,7 +187396,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187337
187396
|
seenProjects
|
|
187338
187397
|
};
|
|
187339
187398
|
function tryFindDefaultConfiguredProject(project) {
|
|
187340
|
-
return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project);
|
|
187399
|
+
return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project) ?? tryFindDefaultConfiguredProjectFromAncestor(project);
|
|
187341
187400
|
}
|
|
187342
187401
|
function isDefaultProject(project) {
|
|
187343
187402
|
if (!tryAddToSet(seenProjects, project)) return;
|
|
@@ -187360,6 +187419,20 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187360
187419
|
reloadedProjects
|
|
187361
187420
|
);
|
|
187362
187421
|
}
|
|
187422
|
+
function tryFindDefaultConfiguredProjectFromAncestor(project) {
|
|
187423
|
+
return forEachAncestorProject(
|
|
187424
|
+
// If not in referenced projects, try ancestors and its references
|
|
187425
|
+
info,
|
|
187426
|
+
project,
|
|
187427
|
+
tryFindDefaultConfiguredProject,
|
|
187428
|
+
kind,
|
|
187429
|
+
`Creating possible configured project for ${info.fileName} to open`,
|
|
187430
|
+
allowDeferredClosed,
|
|
187431
|
+
reloadedProjects,
|
|
187432
|
+
/*searchOnlyPotentialSolution*/
|
|
187433
|
+
false
|
|
187434
|
+
);
|
|
187435
|
+
}
|
|
187363
187436
|
}
|
|
187364
187437
|
tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, kind, reloadedProjects, delayReloadedConfiguredProjects) {
|
|
187365
187438
|
const allowDeferredClosed = kind === 0 /* Find */;
|
|
@@ -187382,6 +187455,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187382
187455
|
`Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`,
|
|
187383
187456
|
allowDeferredClosed,
|
|
187384
187457
|
reloadedProjects,
|
|
187458
|
+
/*searchOnlyPotentialSolution*/
|
|
187459
|
+
true,
|
|
187385
187460
|
delayReloadedConfiguredProjects
|
|
187386
187461
|
);
|
|
187387
187462
|
}
|
|
@@ -192853,6 +192928,7 @@ if (typeof console !== "undefined") {
|
|
|
192853
192928
|
canHaveModifiers,
|
|
192854
192929
|
canHaveModuleSpecifier,
|
|
192855
192930
|
canHaveSymbol,
|
|
192931
|
+
canIncludeBindAndCheckDiagnsotics,
|
|
192856
192932
|
canJsonReportNoInputFiles,
|
|
192857
192933
|
canProduceDiagnostics,
|
|
192858
192934
|
canUsePropertyAccess,
|
|
@@ -193535,7 +193611,6 @@ if (typeof console !== "undefined") {
|
|
|
193535
193611
|
getNonAssignmentOperatorForCompoundAssignment,
|
|
193536
193612
|
getNonAugmentationDeclaration,
|
|
193537
193613
|
getNonDecoratorTokenPosOfNode,
|
|
193538
|
-
getNonModifierTokenPosOfNode,
|
|
193539
193614
|
getNormalizedAbsolutePath,
|
|
193540
193615
|
getNormalizedAbsolutePathWithoutRoot,
|
|
193541
193616
|
getNormalizedPathComponents,
|
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.
|
|
5
|
+
"version": "5.6.0-pr-57196-3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|