From 237ba96a2c4adc267438c51f0a0f659876c8811d Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sat, 15 May 2021 15:38:49 +0800 Subject: [PATCH] chore: Update babel standalone types. #94 --- package.json | 1 + src/babel.d.ts | 6 ------ src/index.tsx | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 0e638ad0..4aa900fa 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "@kkt/less-modules": "6.9.0", "@kkt/raw-modules": "6.9.0", "@kkt/scope-plugin-options": "6.9.0", + "@types/babel__standalone": "7.1.3", "@types/codemirror": "5.60.0", "@types/react": "17.0.5", "@types/react-dom": "17.0.5", diff --git a/src/babel.d.ts b/src/babel.d.ts index 70c7483c..2d462c2f 100644 --- a/src/babel.d.ts +++ b/src/babel.d.ts @@ -5,9 +5,3 @@ declare module '@babel/plugin-transform-classes' { export default function _default(url: any, options: any): any; } - -declare module '@babel/standalone' { - export default function _default(url: any, options: any): any; - export type Transform = (code: string, options: { [key: string]: any }) => any; - export const transform: Transform; -} diff --git a/src/index.tsx b/src/index.tsx index 29a8db1e..e2671e6f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -141,7 +141,7 @@ export default class CodePreview extends React.PureComponent