@typescript-eslint/typescript-estree 8.63.1-alpha.9 → 8.64.1-alpha.0
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/dist/check-syntax-errors.js +10 -0
- package/package.json +5 -5
|
@@ -167,6 +167,16 @@ function checkSyntaxError(tsNode, parent, allowPattern) {
|
|
|
167
167
|
if (isAbstract && node.initializer) {
|
|
168
168
|
throw (0, node_utils_1.createError)(node.initializer, `Abstract property cannot have an initializer.`);
|
|
169
169
|
}
|
|
170
|
+
const isDefinite = !!node.exclamationToken;
|
|
171
|
+
if (isDefinite && isAbstract) {
|
|
172
|
+
throw (0, node_utils_1.createError)(node.exclamationToken, `A definite assignment assertion '!' is not permitted in this context.`);
|
|
173
|
+
}
|
|
174
|
+
if (isDefinite && !node.type) {
|
|
175
|
+
throw (0, node_utils_1.createError)(node, `Declarations with definite assignment assertions must also have type annotations.`);
|
|
176
|
+
}
|
|
177
|
+
if (isDefinite && node.initializer) {
|
|
178
|
+
throw (0, node_utils_1.createError)(node, `Declarations with initializers cannot also have definite assignment assertions.`);
|
|
179
|
+
}
|
|
170
180
|
if (node.name.kind === SyntaxKind.StringLiteral &&
|
|
171
181
|
node.name.text === 'constructor') {
|
|
172
182
|
throw (0, node_utils_1.createError)(node.name, "Classes may not have a field named 'constructor'.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/typescript-estree",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.64.1-alpha.0",
|
|
4
4
|
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"semver": "^7.7.3",
|
|
48
48
|
"tinyglobby": "^0.2.15",
|
|
49
49
|
"ts-api-utils": "^2.5.0",
|
|
50
|
-
"@typescript-eslint/project-service": "8.
|
|
51
|
-
"@typescript-eslint/types": "8.
|
|
52
|
-
"@typescript-eslint/
|
|
53
|
-
"@typescript-eslint/
|
|
50
|
+
"@typescript-eslint/project-service": "8.64.1-alpha.0",
|
|
51
|
+
"@typescript-eslint/types": "8.64.1-alpha.0",
|
|
52
|
+
"@typescript-eslint/tsconfig-utils": "8.64.1-alpha.0",
|
|
53
|
+
"@typescript-eslint/visitor-keys": "8.64.1-alpha.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|