1 | import Types from '@babel/types';
|
2 | import { NodePath } from '@babel/traverse';
|
3 | export interface Options {
|
4 | webpack?: boolean;
|
5 | packages?: {
|
6 | [key: string]: string[];
|
7 | };
|
8 | }
|
9 | interface State {
|
10 | processPackages?: Map<string, string[]>;
|
11 | opts?: Options;
|
12 | }
|
13 | export default function asyncBabelPlugin({ types: t }: {
|
14 | types: typeof Types;
|
15 | }): {
|
16 | visitor: {
|
17 | Program(_path: NodePath<Types.Program>, state: State): void;
|
18 | ImportDeclaration(path: NodePath<Types.ImportDeclaration>, state: State): void;
|
19 | };
|
20 | };
|
21 | export {};
|