UNPKG

553 BTypeScriptView Raw
1import Types from '@babel/types';
2import { NodePath } from '@babel/traverse';
3export interface Options {
4 webpack?: boolean;
5 packages?: {
6 [key: string]: string[];
7 };
8}
9interface State {
10 processPackages?: Map<string, string[]>;
11 opts?: Options;
12}
13export 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};
21export {};