Skip to content

Commit 3182371

Browse files
fix(rmdir): use right type
1 parent c0035c8 commit 3182371

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

recipes/rmdir/src/workflow.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getNodeImportStatements } from "@nodejs/codemod-utils/ast-grep/import-statement";
22
import { getNodeRequireCalls } from "@nodejs/codemod-utils/ast-grep/require-call";
3-
import type { SgRoot, Edit } from "@ast-grep/napi";
3+
import type { SgRoot, Edit } from "@codemod.com/jssg-types/main";
44

55
/**
66
* Transform function that converts deprecated fs.rmdir calls
@@ -141,6 +141,7 @@ export default function transform(root: SgRoot): string | null {
141141

142142
// Update imports/requires only if we have destructured calls that need new imports
143143
if (needsRmImport || needsRmSyncImport) {
144+
// @ts-ignore - ast-grep types are not fully compatible with JSSG types
144145
const importStatements = getNodeImportStatements(root, 'fs');
145146

146147
// Update import statements
@@ -176,6 +177,7 @@ export default function transform(root: SgRoot): string | null {
176177
}
177178
}
178179

180+
// @ts-ignore - ast-grep types are not fully compatible with JSSG types
179181
const requireStatements = getNodeRequireCalls(root, 'fs');
180182

181183
// Update require statements

0 commit comments

Comments
 (0)