@typescript-eslint/typescript-estree 8.47.1-alpha.10 → 8.47.1-alpha.12
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-modifiers.js +8 -0
- package/dist/convert.js +5 -3
- package/package.json +5 -5
package/dist/check-modifiers.js
CHANGED
|
@@ -257,6 +257,14 @@ function checkModifiers(node) {
|
|
|
257
257
|
if (!(func?.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) {
|
|
258
258
|
throwError(modifier, 'A parameter property is only allowed in a constructor implementation.');
|
|
259
259
|
}
|
|
260
|
+
const param = node;
|
|
261
|
+
if (param.dotDotDotToken) {
|
|
262
|
+
throwError(modifier, 'A parameter property cannot be a rest parameter.');
|
|
263
|
+
}
|
|
264
|
+
if (param.name.kind === SyntaxKind.ArrayBindingPattern ||
|
|
265
|
+
param.name.kind === SyntaxKind.ObjectBindingPattern) {
|
|
266
|
+
throwError(modifier, 'A parameter property may not be declared using a binding pattern.');
|
|
267
|
+
}
|
|
260
268
|
}
|
|
261
269
|
// There are more cases in `checkGrammarObjectLiteralExpression` in TypeScript.
|
|
262
270
|
// We may add more validations for them here in the future.
|
package/dist/convert.js
CHANGED
|
@@ -2225,16 +2225,18 @@ class Converter {
|
|
|
2225
2225
|
],
|
|
2226
2226
|
});
|
|
2227
2227
|
}
|
|
2228
|
-
const
|
|
2228
|
+
const argument = this.convertChild(node.argument);
|
|
2229
|
+
const source = argument.literal;
|
|
2230
|
+
const result = this.createNode(node, this.#withDeprecatedGetter({
|
|
2229
2231
|
type: ts_estree_1.AST_NODE_TYPES.TSImportType,
|
|
2230
2232
|
range,
|
|
2231
|
-
argument: this.convertChild(node.argument),
|
|
2232
2233
|
options,
|
|
2233
2234
|
qualifier: this.convertChild(node.qualifier),
|
|
2235
|
+
source,
|
|
2234
2236
|
typeArguments: node.typeArguments
|
|
2235
2237
|
? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node)
|
|
2236
2238
|
: null,
|
|
2237
|
-
});
|
|
2239
|
+
}, 'argument', 'source', argument));
|
|
2238
2240
|
if (node.isTypeOf) {
|
|
2239
2241
|
return this.createNode(node, {
|
|
2240
2242
|
type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/typescript-estree",
|
|
3
|
-
"version": "8.47.1-alpha.
|
|
3
|
+
"version": "8.47.1-alpha.12",
|
|
4
4
|
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"typecheck": "yarn run -BT nx typecheck"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@typescript-eslint/project-service": "8.47.1-alpha.
|
|
56
|
-
"@typescript-eslint/tsconfig-utils": "8.47.1-alpha.
|
|
57
|
-
"@typescript-eslint/types": "8.47.1-alpha.
|
|
58
|
-
"@typescript-eslint/visitor-keys": "8.47.1-alpha.
|
|
55
|
+
"@typescript-eslint/project-service": "8.47.1-alpha.12",
|
|
56
|
+
"@typescript-eslint/tsconfig-utils": "8.47.1-alpha.12",
|
|
57
|
+
"@typescript-eslint/types": "8.47.1-alpha.12",
|
|
58
|
+
"@typescript-eslint/visitor-keys": "8.47.1-alpha.12",
|
|
59
59
|
"debug": "^4.3.4",
|
|
60
60
|
"minimatch": "^9.0.4",
|
|
61
61
|
"semver": "^7.6.0",
|