Skip to content

Commit a34288c

Browse files
Merge pull request #1270 from paoloricciuti/ts-parser-codemod
fix: use the ts parser in website codemod playground
2 parents 4363c2f + d22cb75 commit a34288c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

website/src/routes/guides/(migration)/migrate-from-zod/CodemodEditor.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ export const CodemodEditor = component$(() => {
4949
// Get current code from editor model
5050
const currentCode = model.value!.getValue();
5151

52+
const tsParser = jscodeshift.withParser('ts');
53+
5254
// Execute codemod with current code
5355
const transformedCode = await transform(
5456
{ path: 'index.ts', source: currentCode },
5557
{
56-
j: jscodeshift.withParser('ts'),
57-
jscodeshift,
58+
j: tsParser,
59+
jscodeshift: tsParser,
5860
stats: () => {},
5961
report: () => {},
6062
},

0 commit comments

Comments
 (0)