@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
2285
2285
2286
2286
// src/compiler/corePublic.ts
2287
2287
var versionMajorMinor = "5.9";
2288
- var version = "5.9.2 ";
2288
+ var version = "5.9.3 ";
2289
2289
var Comparison = /* @__PURE__ */ ((Comparison3) => {
2290
2290
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2291
2291
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6790,10 +6790,10 @@ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {
6790
6790
ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest";
6791
6791
return ScriptTarget12;
6792
6792
})(ScriptTarget || {});
6793
- var LanguageVariant = /* @__PURE__ */ ((LanguageVariant3 ) => {
6794
- LanguageVariant3[LanguageVariant3 ["Standard"] = 0] = "Standard";
6795
- LanguageVariant3[LanguageVariant3 ["JSX"] = 1] = "JSX";
6796
- return LanguageVariant3 ;
6793
+ var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4 ) => {
6794
+ LanguageVariant4[LanguageVariant4 ["Standard"] = 0] = "Standard";
6795
+ LanguageVariant4[LanguageVariant4 ["JSX"] = 1] = "JSX";
6796
+ return LanguageVariant4 ;
6797
6797
})(LanguageVariant || {});
6798
6798
var WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {
6799
6799
WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None";
@@ -24351,10 +24351,22 @@ function createParenthesizerRules(factory2) {
24351
24351
}
24352
24352
return parenthesizerRule;
24353
24353
}
24354
+ function mixingBinaryOperatorsRequiresParentheses(a, b) {
24355
+ if (a === 61 /* QuestionQuestionToken */) {
24356
+ return b === 56 /* AmpersandAmpersandToken */ || b === 57 /* BarBarToken */;
24357
+ }
24358
+ if (b === 61 /* QuestionQuestionToken */) {
24359
+ return a === 56 /* AmpersandAmpersandToken */ || a === 57 /* BarBarToken */;
24360
+ }
24361
+ return false;
24362
+ }
24354
24363
function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
24364
+ const emittedOperand = skipPartiallyEmittedExpressions(operand);
24365
+ if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) {
24366
+ return true;
24367
+ }
24355
24368
const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator);
24356
24369
const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator);
24357
- const emittedOperand = skipPartiallyEmittedExpressions(operand);
24358
24370
if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) {
24359
24371
return true;
24360
24372
}
@@ -57907,7 +57919,22 @@ function createTypeChecker(host) {
57907
57919
function getPropertyNameNodeForSymbol(symbol, context) {
57908
57920
const hashPrivateName = getClonedHashPrivateName(symbol);
57909
57921
if (hashPrivateName) {
57910
- return hashPrivateName;
57922
+ const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */;
57923
+ if (!shouldEmitErroneousFieldName) {
57924
+ return hashPrivateName;
57925
+ } else {
57926
+ let rawName2 = unescapeLeadingUnderscores(symbol.escapedName);
57927
+ rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#");
57928
+ return createPropertyNameNodeForIdentifierOrLiteral(
57929
+ rawName2,
57930
+ getEmitScriptTarget(compilerOptions),
57931
+ /*singleQuote*/
57932
+ false,
57933
+ /*stringNamed*/
57934
+ true,
57935
+ !!(symbol.flags & 8192 /* Method */)
57936
+ );
57937
+ }
57911
57938
}
57912
57939
const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
57913
57940
const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
@@ -129038,10 +129065,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129038
129065
}
129039
129066
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
129040
129067
commandLine.fileNames.forEach((fileName) => {
129041
- if (isDeclarationFileName(fileName)) return;
129042
129068
const path = toPath3(fileName);
129043
129069
let outputDts;
129044
- if (!fileExtensionIs(fileName, ".json" /* Json */)) {
129070
+ if (!isDeclarationFileName(fileName) && ! fileExtensionIs(fileName, ".json" /* Json */)) {
129045
129071
if (!commandLine.options.outFile) {
129046
129072
outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
129047
129073
mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
@@ -140403,7 +140429,7 @@ function isInsideJsxElementOrAttribute(sourceFile, position) {
140403
140429
if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 295 /* JsxExpression */) {
140404
140430
return true;
140405
140431
}
140406
- if (token.kind === 31 /* LessThanSlashToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
140432
+ if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
140407
140433
return true;
140408
140434
}
140409
140435
return false;
@@ -140431,7 +140457,7 @@ function isInJSXText(sourceFile, position) {
140431
140457
function isInsideJsxElement(sourceFile, position) {
140432
140458
function isInsideJsxElementTraversal(node) {
140433
140459
while (node) {
140434
- if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */ || node.kind === 31 /* LessThanSlashToken */ ) {
140460
+ if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) {
140435
140461
node = node.parent;
140436
140462
} else if (node.kind === 285 /* JsxElement */) {
140437
140463
if (position > node.getStart(sourceFile)) return true;
@@ -151873,9 +151899,7 @@ function createChildren(node, sourceFile) {
151873
151899
});
151874
151900
return children;
151875
151901
}
151876
- const languageVariant = (sourceFile == null ? void 0 : sourceFile.languageVariant) ?? 0 /* Standard */;
151877
151902
scanner.setText((sourceFile || node.getSourceFile()).text);
151878
- scanner.setLanguageVariant(languageVariant);
151879
151903
let pos = node.pos;
151880
151904
const processNode = (child) => {
151881
151905
addSyntheticNodes(children, pos, child.pos, node);
@@ -151892,7 +151916,6 @@ function createChildren(node, sourceFile) {
151892
151916
node.forEachChild(processNode, processNodes);
151893
151917
addSyntheticNodes(children, pos, node.end, node);
151894
151918
scanner.setText(void 0);
151895
- scanner.setLanguageVariant(0 /* Standard */);
151896
151919
return children;
151897
151920
}
151898
151921
function addSyntheticNodes(nodes, pos, end, parent2) {
@@ -167606,7 +167629,7 @@ function getJsxClosingTagCompletion(location, sourceFile) {
167606
167629
switch (node.kind) {
167607
167630
case 288 /* JsxClosingElement */:
167608
167631
return true;
167609
- case 31 /* LessThanSlashToken */:
167632
+ case 44 /* SlashToken */:
167610
167633
case 32 /* GreaterThanToken */:
167611
167634
case 80 /* Identifier */:
167612
167635
case 212 /* PropertyAccessExpression */:
@@ -168942,7 +168965,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
168942
168965
location = currentToken;
168943
168966
}
168944
168967
break;
168945
- case 31 /* LessThanSlashToken */:
168968
+ case 44 /* SlashToken */:
168946
168969
if (currentToken.parent.kind === 286 /* JsxSelfClosingElement */) {
168947
168970
location = currentToken;
168948
168971
}
@@ -168951,7 +168974,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
168951
168974
}
168952
168975
switch (parent2.kind) {
168953
168976
case 288 /* JsxClosingElement */:
168954
- if (contextToken.kind === 31 /* LessThanSlashToken */) {
168977
+ if (contextToken.kind === 44 /* SlashToken */) {
168955
168978
isStartingCloseTag = true;
168956
168979
location = contextToken;
168957
168980
}
@@ -170572,7 +170595,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) {
170572
170595
case "<":
170573
170596
return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));
170574
170597
case "/":
170575
- return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 31 /* LessThanSlashToken */ && isJsxClosingElement(contextToken.parent));
170598
+ return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent));
170576
170599
case " ":
170577
170600
return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */;
170578
170601
default:
0 commit comments