@eslint-react/ast 3.0.0-beta.40 → 3.0.0-beta.41
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 +5 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -191,7 +191,7 @@ declare function isDirectiveInFunction(node: TSESTreeFunction, name: string): bo
|
|
|
191
191
|
* where JS gives anonymous function expressions names. We roughly detect the
|
|
192
192
|
* same AST nodes with some exceptions to better fit our use case.
|
|
193
193
|
*/
|
|
194
|
-
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.
|
|
194
|
+
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.TemplateLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldExpression | TSESTree.PrivateIdentifier | undefined;
|
|
195
195
|
/**
|
|
196
196
|
* Type representing the return type of getFunctionId
|
|
197
197
|
*/
|
|
@@ -306,13 +306,13 @@ declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TS
|
|
|
306
306
|
* @param node The node to check
|
|
307
307
|
* @returns True if the node is a function type
|
|
308
308
|
*/
|
|
309
|
-
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.
|
|
309
|
+
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSDeclareFunctionNoDeclare | TSESTree.TSDeclareFunctionWithDeclare | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
|
|
310
310
|
/**
|
|
311
311
|
* Check if a node is a class declaration or expression
|
|
312
312
|
* @param node The node to check
|
|
313
313
|
* @returns True if the node is a class
|
|
314
314
|
*/
|
|
315
|
-
declare const isClass: (node: TSESTree.Node | null | undefined) => node is TSESTree.
|
|
315
|
+
declare const isClass: (node: TSESTree.Node | null | undefined) => node is TSESTree.ClassExpression | TSESTree.ClassDeclarationWithName | TSESTree.ClassDeclarationWithOptionalName;
|
|
316
316
|
/**
|
|
317
317
|
* Check if a node is a method or property definition
|
|
318
318
|
* @param node The node to check
|
|
@@ -348,7 +348,7 @@ declare const isJSXTagNameExpression: (node: TSESTree.Node | null | undefined) =
|
|
|
348
348
|
* @param node The node to check
|
|
349
349
|
* @returns True if the node is a JSX node
|
|
350
350
|
*/
|
|
351
|
-
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.
|
|
351
|
+
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.JSXAttribute | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXEmptyExpression | TSESTree.JSXExpressionContainer | TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXSpreadChild | TSESTree.JSXText;
|
|
352
352
|
/**
|
|
353
353
|
* Check if a node is a loop statement
|
|
354
354
|
* @param node The node to check
|
|
@@ -366,7 +366,7 @@ declare const isControlFlow: (data: TSESTree.Node | null | undefined) => data is
|
|
|
366
366
|
* @param node The node to check
|
|
367
367
|
* @returns True if the node is conditional
|
|
368
368
|
*/
|
|
369
|
-
declare const isConditional: (data: TSESTree.Node | null | undefined) => data is TSESTree.ConditionalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.
|
|
369
|
+
declare const isConditional: (data: TSESTree.Node | null | undefined) => data is TSESTree.ConditionalExpression | TSESTree.LogicalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.SwitchStatement | TSESTree.WhileStatement;
|
|
370
370
|
/**
|
|
371
371
|
* Check if a node is a TypeScript type expression
|
|
372
372
|
* @param node The node to check
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.41",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@typescript-eslint/typescript-estree": "canary",
|
|
35
35
|
"@typescript-eslint/utils": "canary",
|
|
36
36
|
"string-ts": "^2.3.1",
|
|
37
|
-
"@eslint-react/eff": "3.0.0-beta.
|
|
37
|
+
"@eslint-react/eff": "3.0.0-beta.41"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"tsdown": "^0.20.3",
|