We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85d1413 commit 65cfe4fCopy full SHA for 65cfe4f
.changeset/gorgeous-cycles-hide.md
@@ -0,0 +1,5 @@
1
+---
2
+'@codeshift/utils': patch
3
4
+
5
+Minor type update to isDecendantOfNode
packages/utils/src/nodes.ts
@@ -24,9 +24,9 @@ export const isNodeOfType = <Expected extends ASTNode>(
24
* const isDecendantOfImportSpecifier = isDecendantOfType(node, j.ImportSpecifier);
25
* ```
26
*/
27
-export const isDecendantOfType = (
+export const isDecendantOfType = <Node extends ASTNode>(
28
j: core.JSCodeshift,
29
- source: ASTPath<any>,
+ source: ASTPath<Node>,
30
type: any,
31
): boolean => {
32
const closestNodes = j(source).closest(type);
0 commit comments