typescript 5.9.0-dev.20250625 → 5.9.0-dev.20250627
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 +3 -3
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +16 -13
- package/package.json +2 -2
package/lib/_tsc.js
CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
18
18
|
|
19
19
|
// src/compiler/corePublic.ts
|
20
20
|
var versionMajorMinor = "5.9";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20250627`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -89859,7 +89859,7 @@ function createTypeChecker(host) {
|
|
89859
89859
|
if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) {
|
89860
89860
|
return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
|
89861
89861
|
}
|
89862
|
-
if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node)) {
|
89862
|
+
if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) {
|
89863
89863
|
return grammarErrorOnNode(node.name, Diagnostics.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);
|
89864
89864
|
}
|
89865
89865
|
if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) {
|
@@ -89944,7 +89944,7 @@ function createTypeChecker(host) {
|
|
89944
89944
|
function checkGrammarBigIntLiteral(node) {
|
89945
89945
|
const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression(node.parent) && isLiteralTypeNode(node.parent.parent);
|
89946
89946
|
if (!literalType) {
|
89947
|
-
if (languageVersion < 7 /* ES2020 */) {
|
89947
|
+
if (!(node.flags & 33554432 /* Ambient */) && languageVersion < 7 /* ES2020 */) {
|
89948
89948
|
if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) {
|
89949
89949
|
return true;
|
89950
89950
|
}
|
package/lib/typescript.d.ts
CHANGED
package/lib/typescript.js
CHANGED
@@ -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 = `${versionMajorMinor}.0-dev.
|
2288
|
+
var version = `${versionMajorMinor}.0-dev.20250627`;
|
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__ */ ((
|
6794
|
-
|
6795
|
-
|
6796
|
-
return
|
6793
|
+
var LanguageVariant = /* @__PURE__ */ ((LanguageVariant3) => {
|
6794
|
+
LanguageVariant3[LanguageVariant3["Standard"] = 0] = "Standard";
|
6795
|
+
LanguageVariant3[LanguageVariant3["JSX"] = 1] = "JSX";
|
6796
|
+
return LanguageVariant3;
|
6797
6797
|
})(LanguageVariant || {});
|
6798
6798
|
var WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {
|
6799
6799
|
WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None";
|
@@ -94470,7 +94470,7 @@ function createTypeChecker(host) {
|
|
94470
94470
|
if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) {
|
94471
94471
|
return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
|
94472
94472
|
}
|
94473
|
-
if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node)) {
|
94473
|
+
if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) {
|
94474
94474
|
return grammarErrorOnNode(node.name, Diagnostics.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);
|
94475
94475
|
}
|
94476
94476
|
if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) {
|
@@ -94555,7 +94555,7 @@ function createTypeChecker(host) {
|
|
94555
94555
|
function checkGrammarBigIntLiteral(node) {
|
94556
94556
|
const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression(node.parent) && isLiteralTypeNode(node.parent.parent);
|
94557
94557
|
if (!literalType) {
|
94558
|
-
if (languageVersion < 7 /* ES2020 */) {
|
94558
|
+
if (!(node.flags & 33554432 /* Ambient */) && languageVersion < 7 /* ES2020 */) {
|
94559
94559
|
if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) {
|
94560
94560
|
return true;
|
94561
94561
|
}
|
@@ -140293,7 +140293,7 @@ function isInsideJsxElementOrAttribute(sourceFile, position) {
|
|
140293
140293
|
if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 295 /* JsxExpression */) {
|
140294
140294
|
return true;
|
140295
140295
|
}
|
140296
|
-
if (token.kind ===
|
140296
|
+
if (token.kind === 31 /* LessThanSlashToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
|
140297
140297
|
return true;
|
140298
140298
|
}
|
140299
140299
|
return false;
|
@@ -140321,7 +140321,7 @@ function isInJSXText(sourceFile, position) {
|
|
140321
140321
|
function isInsideJsxElement(sourceFile, position) {
|
140322
140322
|
function isInsideJsxElementTraversal(node) {
|
140323
140323
|
while (node) {
|
140324
|
-
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 */) {
|
140324
|
+
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 */) {
|
140325
140325
|
node = node.parent;
|
140326
140326
|
} else if (node.kind === 285 /* JsxElement */) {
|
140327
140327
|
if (position > node.getStart(sourceFile)) return true;
|
@@ -151763,7 +151763,9 @@ function createChildren(node, sourceFile) {
|
|
151763
151763
|
});
|
151764
151764
|
return children;
|
151765
151765
|
}
|
151766
|
+
const languageVariant = (sourceFile == null ? void 0 : sourceFile.languageVariant) ?? 0 /* Standard */;
|
151766
151767
|
scanner.setText((sourceFile || node.getSourceFile()).text);
|
151768
|
+
scanner.setLanguageVariant(languageVariant);
|
151767
151769
|
let pos = node.pos;
|
151768
151770
|
const processNode = (child) => {
|
151769
151771
|
addSyntheticNodes(children, pos, child.pos, node);
|
@@ -151780,6 +151782,7 @@ function createChildren(node, sourceFile) {
|
|
151780
151782
|
node.forEachChild(processNode, processNodes);
|
151781
151783
|
addSyntheticNodes(children, pos, node.end, node);
|
151782
151784
|
scanner.setText(void 0);
|
151785
|
+
scanner.setLanguageVariant(0 /* Standard */);
|
151783
151786
|
return children;
|
151784
151787
|
}
|
151785
151788
|
function addSyntheticNodes(nodes, pos, end, parent2) {
|
@@ -167487,7 +167490,7 @@ function getJsxClosingTagCompletion(location, sourceFile) {
|
|
167487
167490
|
switch (node.kind) {
|
167488
167491
|
case 288 /* JsxClosingElement */:
|
167489
167492
|
return true;
|
167490
|
-
case
|
167493
|
+
case 31 /* LessThanSlashToken */:
|
167491
167494
|
case 32 /* GreaterThanToken */:
|
167492
167495
|
case 80 /* Identifier */:
|
167493
167496
|
case 212 /* PropertyAccessExpression */:
|
@@ -168823,7 +168826,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
168823
168826
|
location = currentToken;
|
168824
168827
|
}
|
168825
168828
|
break;
|
168826
|
-
case
|
168829
|
+
case 31 /* LessThanSlashToken */:
|
168827
168830
|
if (currentToken.parent.kind === 286 /* JsxSelfClosingElement */) {
|
168828
168831
|
location = currentToken;
|
168829
168832
|
}
|
@@ -168832,7 +168835,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
168832
168835
|
}
|
168833
168836
|
switch (parent2.kind) {
|
168834
168837
|
case 288 /* JsxClosingElement */:
|
168835
|
-
if (contextToken.kind ===
|
168838
|
+
if (contextToken.kind === 31 /* LessThanSlashToken */) {
|
168836
168839
|
isStartingCloseTag = true;
|
168837
168840
|
location = contextToken;
|
168838
168841
|
}
|
@@ -170452,7 +170455,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) {
|
|
170452
170455
|
case "<":
|
170453
170456
|
return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));
|
170454
170457
|
case "/":
|
170455
|
-
return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind ===
|
170458
|
+
return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 31 /* LessThanSlashToken */ && isJsxClosingElement(contextToken.parent));
|
170456
170459
|
case " ":
|
170457
170460
|
return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */;
|
170458
170461
|
default:
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "typescript",
|
3
3
|
"author": "Microsoft Corp.",
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
5
|
-
"version": "5.9.0-dev.
|
5
|
+
"version": "5.9.0-dev.20250627",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -116,5 +116,5 @@
|
|
116
116
|
"node": "20.1.0",
|
117
117
|
"npm": "8.19.4"
|
118
118
|
},
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "02672d281c26e561708127da1d8d1a6cae45fee2"
|
120
120
|
}
|