refactor(cli): migrate migrate file to TS

This commit is contained in:
Gaëtan Maisse 2020-05-14 21:31:56 +02:00
parent ce1a49542c
commit d8e77a12e5
No known key found for this signature in database
GPG Key ID: D934C0EF3714A8A8
2 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,11 @@
import { listCodemods, runCodemod } from '@storybook/codemod';
export async function migrate(
migration,
{ configDir, glob, dryRun, list, rename, logger, parser }
migration: any,
{ configDir, glob, dryRun, list, rename, logger, parser }: any
) {
if (list) {
listCodemods().forEach((key) => logger.log(key));
listCodemods().forEach((key: any) => logger.log(key));
} else if (migration) {
await runCodemod(migration, { configDir, glob, dryRun, logger, rename, parser });
} else {

1
lib/cli/src/typings.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module '@storybook/codemod';