@typescript-eslint/typescript-estree 8.48.1-alpha.8 → 8.48.1-alpha.9
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/convert.js +4 -5
- package/dist/node-utils.d.ts +1 -0
- package/dist/node-utils.js +1 -5
- package/package.json +5 -5
package/dist/convert.js
CHANGED
|
@@ -710,17 +710,16 @@ class Converter {
|
|
|
710
710
|
}
|
|
711
711
|
case SyntaxKind.VariableDeclaration: {
|
|
712
712
|
const definite = !!node.exclamationToken;
|
|
713
|
-
const init = this.convertChild(node.initializer);
|
|
714
|
-
const id = this.convertBindingNameWithTypeAnnotation(node.name, node.type, node);
|
|
715
713
|
if (definite) {
|
|
716
|
-
if (
|
|
714
|
+
if (node.initializer) {
|
|
717
715
|
this.#throwError(node, 'Declarations with initializers cannot also have definite assignment assertions.');
|
|
718
716
|
}
|
|
719
|
-
else if (
|
|
720
|
-
!id.typeAnnotation) {
|
|
717
|
+
else if (node.name.kind !== SyntaxKind.Identifier || !node.type) {
|
|
721
718
|
this.#throwError(node, 'Declarations with definite assignment assertions must also have type annotations.');
|
|
722
719
|
}
|
|
723
720
|
}
|
|
721
|
+
const init = this.convertChild(node.initializer);
|
|
722
|
+
const id = this.convertBindingNameWithTypeAnnotation(node.name, node.type, node);
|
|
724
723
|
return this.createNode(node, {
|
|
725
724
|
type: ts_estree_1.AST_NODE_TYPES.VariableDeclarator,
|
|
726
725
|
definite,
|
package/dist/node-utils.d.ts
CHANGED
package/dist/node-utils.js
CHANGED
|
@@ -533,15 +533,11 @@ function convertTokens(ast) {
|
|
|
533
533
|
class TSError extends Error {
|
|
534
534
|
fileName;
|
|
535
535
|
location;
|
|
536
|
+
name = 'TSError';
|
|
536
537
|
constructor(message, fileName, location) {
|
|
537
538
|
super(message);
|
|
538
539
|
this.fileName = fileName;
|
|
539
540
|
this.location = location;
|
|
540
|
-
Object.defineProperty(this, 'name', {
|
|
541
|
-
configurable: true,
|
|
542
|
-
enumerable: false,
|
|
543
|
-
value: new.target.name,
|
|
544
|
-
});
|
|
545
541
|
}
|
|
546
542
|
// For old version of ESLint https://github.com/typescript-eslint/typescript-eslint/pull/6556#discussion_r1123237311
|
|
547
543
|
get index() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/typescript-estree",
|
|
3
|
-
"version": "8.48.1-alpha.
|
|
3
|
+
"version": "8.48.1-alpha.9",
|
|
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.48.1-alpha.
|
|
56
|
-
"@typescript-eslint/tsconfig-utils": "8.48.1-alpha.
|
|
57
|
-
"@typescript-eslint/types": "8.48.1-alpha.
|
|
58
|
-
"@typescript-eslint/visitor-keys": "8.48.1-alpha.
|
|
55
|
+
"@typescript-eslint/project-service": "8.48.1-alpha.9",
|
|
56
|
+
"@typescript-eslint/tsconfig-utils": "8.48.1-alpha.9",
|
|
57
|
+
"@typescript-eslint/types": "8.48.1-alpha.9",
|
|
58
|
+
"@typescript-eslint/visitor-keys": "8.48.1-alpha.9",
|
|
59
59
|
"debug": "^4.3.4",
|
|
60
60
|
"minimatch": "^9.0.4",
|
|
61
61
|
"semver": "^7.6.0",
|