@eslint-react/ast
Advanced tools
Comparing version 1.5.11-beta.3 to 1.5.11-beta.8
@@ -839,4 +839,4 @@ import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/types'; | ||
declare const traverseUp: { | ||
(node: TSESTree.Node, predicate: (node: TSESTree.Node) => boolean): Option.Option<TSESTree.Node>; | ||
(predicate: (node: TSESTree.Node) => boolean): (node: TSESTree.Node) => Option.Option<TSESTree.Node>; | ||
(node: TSESTree.Node, predicate: (node: TSESTree.Node) => boolean): Option.Option<TSESTree.Node>; | ||
}; | ||
@@ -851,4 +851,4 @@ /** | ||
declare const traverseUpGuard: { | ||
<T extends TSESTree.Node>(node: TSESTree.Node, predicate: (node: TSESTree.Node) => node is T): Option.Option<T>; | ||
<T extends TSESTree.Node>(predicate: (node: TSESTree.Node) => node is T): (node: TSESTree.Node) => Option.Option<T>; | ||
<T extends TSESTree.Node>(node: TSESTree.Node, predicate: (node: TSESTree.Node) => node is T): Option.Option<T>; | ||
}; | ||
@@ -877,2 +877,6 @@ | ||
}; | ||
CallExpression: { | ||
node: TSESTree.CallExpression; | ||
usage: Option.Option<TSESTree.Node>; | ||
}; | ||
ClassExpression: { | ||
@@ -898,6 +902,2 @@ node: TSESTree.ClassExpression; | ||
}; | ||
CallExpression: { | ||
node: TSESTree.CallExpression; | ||
usage: Option.Option<TSESTree.Node>; | ||
}; | ||
NewExpression: { | ||
@@ -935,2 +935,7 @@ node: TSESTree.NewExpression; | ||
}, "_tag">; | ||
readonly CallExpression: Data.Case.Constructor<{ | ||
readonly _tag: "CallExpression"; | ||
readonly node: TSESTree.CallExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, "_tag">; | ||
readonly ClassExpression: Data.Case.Constructor<{ | ||
@@ -961,7 +966,2 @@ readonly _tag: "ClassExpression"; | ||
}, "_tag">; | ||
readonly CallExpression: Data.Case.Constructor<{ | ||
readonly _tag: "CallExpression"; | ||
readonly node: TSESTree.CallExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, "_tag">; | ||
readonly NewExpression: Data.Case.Constructor<{ | ||
@@ -982,2 +982,194 @@ readonly _tag: "NewExpression"; | ||
}, "_tag">; | ||
readonly $is: <Tag extends "None" | "Array" | "AssignmentExpression" | "AssignmentPattern" | "CallExpression" | "ClassExpression" | "FunctionDeclaration" | "FunctionExpression" | "JSXElement" | "JSXFragment" | "NewExpression" | "ObjectExpression" | "RegExpLiteral">(tag: Tag) => (u: unknown) => u is Extract<{ | ||
readonly _tag: "None"; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "Array"; | ||
readonly node: TSESTree.ArrayExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "AssignmentExpression"; | ||
readonly node: TSESTree.Node; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "AssignmentPattern"; | ||
readonly node: TSESTree.Node; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "CallExpression"; | ||
readonly node: TSESTree.CallExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "ClassExpression"; | ||
readonly node: TSESTree.ClassExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "FunctionDeclaration"; | ||
readonly node: TSESTree.FunctionDeclaration; | ||
readonly usage: Option.Option<TSESTree.Expression | TSESTree.Identifier>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "FunctionExpression"; | ||
readonly node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "JSXElement"; | ||
readonly node: TSESTree.JSXElement; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "JSXFragment"; | ||
readonly node: TSESTree.JSXFragment; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "NewExpression"; | ||
readonly node: TSESTree.NewExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "ObjectExpression"; | ||
readonly node: TSESTree.ObjectExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}> | Extract<{ | ||
readonly _tag: "RegExpLiteral"; | ||
readonly node: TSESTree.Literal; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}, { | ||
readonly _tag: Tag; | ||
}>; | ||
readonly $match: <Cases extends { | ||
readonly None: (args: { | ||
readonly _tag: "None"; | ||
}) => any; | ||
readonly Array: (args: { | ||
readonly _tag: "Array"; | ||
readonly node: TSESTree.ArrayExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly AssignmentExpression: (args: { | ||
readonly _tag: "AssignmentExpression"; | ||
readonly node: TSESTree.Node; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly AssignmentPattern: (args: { | ||
readonly _tag: "AssignmentPattern"; | ||
readonly node: TSESTree.Node; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly CallExpression: (args: { | ||
readonly _tag: "CallExpression"; | ||
readonly node: TSESTree.CallExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly ClassExpression: (args: { | ||
readonly _tag: "ClassExpression"; | ||
readonly node: TSESTree.ClassExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly FunctionDeclaration: (args: { | ||
readonly _tag: "FunctionDeclaration"; | ||
readonly node: TSESTree.FunctionDeclaration; | ||
readonly usage: Option.Option<TSESTree.Expression | TSESTree.Identifier>; | ||
}) => any; | ||
readonly FunctionExpression: (args: { | ||
readonly _tag: "FunctionExpression"; | ||
readonly node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly JSXElement: (args: { | ||
readonly _tag: "JSXElement"; | ||
readonly node: TSESTree.JSXElement; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly JSXFragment: (args: { | ||
readonly _tag: "JSXFragment"; | ||
readonly node: TSESTree.JSXFragment; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly NewExpression: (args: { | ||
readonly _tag: "NewExpression"; | ||
readonly node: TSESTree.NewExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly ObjectExpression: (args: { | ||
readonly _tag: "ObjectExpression"; | ||
readonly node: TSESTree.ObjectExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
readonly RegExpLiteral: (args: { | ||
readonly _tag: "RegExpLiteral"; | ||
readonly node: TSESTree.Literal; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => any; | ||
}>(cases: Cases) => (value: { | ||
readonly _tag: "None"; | ||
} | { | ||
readonly _tag: "Array"; | ||
readonly node: TSESTree.ArrayExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "AssignmentExpression"; | ||
readonly node: TSESTree.Node; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "AssignmentPattern"; | ||
readonly node: TSESTree.Node; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "CallExpression"; | ||
readonly node: TSESTree.CallExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "ClassExpression"; | ||
readonly node: TSESTree.ClassExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "FunctionDeclaration"; | ||
readonly node: TSESTree.FunctionDeclaration; | ||
readonly usage: Option.Option<TSESTree.Expression | TSESTree.Identifier>; | ||
} | { | ||
readonly _tag: "FunctionExpression"; | ||
readonly node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "JSXElement"; | ||
readonly node: TSESTree.JSXElement; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "JSXFragment"; | ||
readonly node: TSESTree.JSXFragment; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "NewExpression"; | ||
readonly node: TSESTree.NewExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "ObjectExpression"; | ||
readonly node: TSESTree.ObjectExpression; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
} | { | ||
readonly _tag: "RegExpLiteral"; | ||
readonly node: TSESTree.Literal; | ||
readonly usage: Option.Option<TSESTree.Node>; | ||
}) => ReturnType<Cases["None" | "Array" | "AssignmentExpression" | "AssignmentPattern" | "CallExpression" | "ClassExpression" | "FunctionDeclaration" | "FunctionExpression" | "JSXElement" | "JSXFragment" | "NewExpression" | "ObjectExpression" | "RegExpLiteral"]>; | ||
}; | ||
@@ -1064,4 +1256,4 @@ | ||
const isParenthesized: { | ||
(times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; | ||
(node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; | ||
(times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean; | ||
}; | ||
@@ -1068,0 +1260,0 @@ } |
{ | ||
"name": "@eslint-react/ast", | ||
"version": "1.5.11-beta.3", | ||
"version": "1.5.11-beta.8", | ||
"description": "ESLint React's TSESTree AST primitive utility module.", | ||
@@ -43,7 +43,7 @@ "homepage": "https://github.com/rel1cx/eslint-react", | ||
"string-ts": "2.1.1", | ||
"@eslint-react/tools": "1.5.11-beta.3", | ||
"@eslint-react/types": "1.5.11-beta.3" | ||
"@eslint-react/tools": "1.5.11-beta.8", | ||
"@eslint-react/types": "1.5.11-beta.8" | ||
}, | ||
"devDependencies": { | ||
"effect": "3.0.7" | ||
"effect": "3.1.2" | ||
}, | ||
@@ -50,0 +50,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
365586
9175
+ Added@eslint-react/tools@1.5.11-beta.8(transitive)
+ Added@eslint-react/types@1.5.11-beta.8(transitive)
- Removed@eslint-react/tools@1.5.11-beta.3(transitive)
- Removed@eslint-react/types@1.5.11-beta.3(transitive)