@eslint-react/ast 4.2.3 → 4.2.4-beta.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/index.d.ts +27 -28
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,75 +1,74 @@
|
|
|
1
1
|
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/types";
|
|
2
|
-
import { TSESTree as TSESTree$1 } from "@typescript-eslint/utils";
|
|
3
2
|
|
|
4
3
|
//#region src/node-types.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Represents function expressions and declarations in TSESTree
|
|
7
6
|
*/
|
|
8
|
-
type TSESTreeFunction = TSESTree
|
|
7
|
+
type TSESTreeFunction = TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;
|
|
9
8
|
/**
|
|
10
9
|
* Represents all function-related types including TypeScript function types
|
|
11
10
|
*/
|
|
12
|
-
type TSESTreeFunctionType = TSESTree
|
|
11
|
+
type TSESTreeFunctionType = TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignature | TSESTreeFunction;
|
|
13
12
|
/**
|
|
14
13
|
* Represents class declarations and expressions in TSESTree
|
|
15
14
|
*/
|
|
16
|
-
type TSESTreeClass = TSESTree
|
|
15
|
+
type TSESTreeClass = TSESTree.ClassDeclaration | TSESTree.ClassExpression;
|
|
17
16
|
/**
|
|
18
17
|
* Represents method definitions and property definitions in classes
|
|
19
18
|
*/
|
|
20
|
-
type TSESTreeMethodOrProperty = TSESTree
|
|
19
|
+
type TSESTreeMethodOrProperty = TSESTree.PropertyDefinition | TSESTree.MethodDefinition;
|
|
21
20
|
/**
|
|
22
21
|
* Represents loop statements in TSESTree
|
|
23
22
|
*/
|
|
24
|
-
type TSESTreeLoop = TSESTree
|
|
23
|
+
type TSESTreeLoop = TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement;
|
|
25
24
|
/**
|
|
26
25
|
* Represents TypeScript array and tuple types
|
|
27
26
|
*/
|
|
28
|
-
type TSESTreeArrayTupleType = TSESTree
|
|
27
|
+
type TSESTreeArrayTupleType = TSESTree.TSArrayType | TSESTree.TSTupleType;
|
|
29
28
|
/**
|
|
30
29
|
* Represents property-like nodes in TSESTree
|
|
31
30
|
*/
|
|
32
|
-
type TSESTreeProperty = TSESTree
|
|
31
|
+
type TSESTreeProperty = TSESTree.PropertyDefinition | TSESTree.TSIndexSignature | TSESTree.TSParameterProperty | TSESTree.TSPropertySignature;
|
|
33
32
|
/**
|
|
34
33
|
* Represents all JSX-related nodes in TSESTree
|
|
35
34
|
* Note: This type is for type-level operations. The isJSX() runtime guard in node-is.ts
|
|
36
35
|
* has a slightly different set of nodes as it includes JSXExpressionContainer which is
|
|
37
36
|
* commonly needed for runtime checks but not included in this type union.
|
|
38
37
|
*/
|
|
39
|
-
type TSESTreeJSX = TSESTree
|
|
40
|
-
type TSESTreeJSXElementLike = TSESTree
|
|
38
|
+
type TSESTreeJSX = TSESTree.JSXAttribute | TSESTree.JSXChild | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXEmptyExpression | TSESTree.JSXIdentifierToken | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXTagNameExpression | TSESTree.JSXTextToken;
|
|
39
|
+
type TSESTreeJSXElementLike = TSESTree.JSXElement | TSESTree.JSXFragment;
|
|
41
40
|
/**
|
|
42
41
|
* Represents JSX attribute-like nodes (attributes and spread attributes)
|
|
43
42
|
*/
|
|
44
|
-
type TSESTreeJSXAttributeLike = TSESTree
|
|
43
|
+
type TSESTreeJSXAttributeLike = TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute;
|
|
45
44
|
/**
|
|
46
45
|
* Represents destructuring patterns in variable declarations
|
|
47
46
|
*/
|
|
48
|
-
type TSESTreeDestructuringPattern = TSESTree
|
|
47
|
+
type TSESTreeDestructuringPattern = TSESTree.ArrayPattern | TSESTree.AssignmentPattern | TSESTree.ObjectPattern | TSESTree.RestElement;
|
|
49
48
|
/**
|
|
50
49
|
* Represents TypeScript type declaration nodes
|
|
51
50
|
*/
|
|
52
|
-
type TSESTreeTypeDeclaration = TSESTree
|
|
51
|
+
type TSESTreeTypeDeclaration = TSESTree.TSInterfaceDeclaration | TSESTree.TSTypeAliasDeclaration;
|
|
53
52
|
/**
|
|
54
53
|
* Represents TypeScript type expression nodes (type assertions, non-null expressions, etc.)
|
|
55
54
|
*/
|
|
56
|
-
type TSESTreeTypeExpression = TSESTree
|
|
55
|
+
type TSESTreeTypeExpression = TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.TSInstantiationExpression;
|
|
57
56
|
/**
|
|
58
57
|
* Represents TypeScript type assertion expressions (excluding instantiation expressions)
|
|
59
58
|
*/
|
|
60
|
-
type TSESTreeTypeAssertionExpression = TSESTree
|
|
59
|
+
type TSESTreeTypeAssertionExpression = TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion;
|
|
61
60
|
/**
|
|
62
61
|
* Represents a directive expression statement in TSESTree (ex: "use strict";)
|
|
63
62
|
*/
|
|
64
|
-
type TSESTreeDirective = TSESTree
|
|
63
|
+
type TSESTreeDirective = TSESTree.ExpressionStatement & {
|
|
65
64
|
directive: string;
|
|
66
|
-
expression: TSESTree
|
|
65
|
+
expression: TSESTree.StringLiteral;
|
|
67
66
|
};
|
|
68
67
|
/**
|
|
69
68
|
* Represents a directive-like expression statement in TSESTree
|
|
70
69
|
*/
|
|
71
|
-
type TSESTreeDirectiveLike = TSESTree
|
|
72
|
-
expression: TSESTree
|
|
70
|
+
type TSESTreeDirectiveLike = TSESTree.ExpressionStatement & {
|
|
71
|
+
expression: TSESTree.StringLiteral;
|
|
73
72
|
};
|
|
74
73
|
//#endregion
|
|
75
74
|
//#region src/class-id.d.ts
|
|
@@ -421,28 +420,28 @@ declare function getFullyQualifiedName(node: TSESTree.Node, getText: (node: TSES
|
|
|
421
420
|
/**
|
|
422
421
|
* Represents an arrow function expression with an implicit return
|
|
423
422
|
*/
|
|
424
|
-
type ImplicitReturnArrowFunctionExpression = TSESTree
|
|
425
|
-
body: TSESTree
|
|
423
|
+
type ImplicitReturnArrowFunctionExpression = TSESTree.ArrowFunctionExpression & {
|
|
424
|
+
body: TSESTree.Expression;
|
|
426
425
|
};
|
|
427
426
|
/**
|
|
428
427
|
* Represents a variable declarator with object destructuring and an identifier initializer
|
|
429
428
|
*/
|
|
430
|
-
type ObjectDestructuringVariableDeclarator = TSESTree
|
|
431
|
-
id: TSESTree
|
|
432
|
-
init: TSESTree
|
|
429
|
+
type ObjectDestructuringVariableDeclarator = TSESTree.VariableDeclarator & {
|
|
430
|
+
id: TSESTree.ObjectPattern;
|
|
431
|
+
init: TSESTree.Identifier;
|
|
433
432
|
};
|
|
434
433
|
/**
|
|
435
434
|
* Represents an assignment expression that assigns to a displayName property
|
|
436
435
|
*/
|
|
437
|
-
type DisplayNameAssignmentExpression = TSESTree
|
|
436
|
+
type DisplayNameAssignmentExpression = TSESTree.AssignmentExpression & {
|
|
438
437
|
type: "AssignmentExpression";
|
|
439
|
-
left: TSESTree
|
|
440
|
-
property: TSESTree
|
|
438
|
+
left: TSESTree.MemberExpression & {
|
|
439
|
+
property: TSESTree.Identifier & {
|
|
441
440
|
name: "displayName";
|
|
442
441
|
};
|
|
443
442
|
};
|
|
444
443
|
operator: "=";
|
|
445
|
-
right: TSESTree
|
|
444
|
+
right: TSESTree.Literal;
|
|
446
445
|
};
|
|
447
446
|
/**
|
|
448
447
|
* Selector for arrow function expressions with implicit return
|