import { parse } from '@babel/parser'; import template from '@babel/template'; import traverse, { type Visitor } from '@babel/traverse'; import * as t from '@babel/types'; import * as m from '@codemod/matchers'; export type Stage = 'afterParse' | 'afterPrepare' | 'afterDeobfuscate' | 'afterUnminify' | 'afterUnpack'; export type PluginState = { opts: Record; }; export interface PluginObject { name?: string; pre?: (this: PluginState, state: PluginState) => Promise | void; post?: (this: PluginState, state: PluginState) => Promise | void; visitor?: Visitor; } export interface PluginAPI { parse: typeof parse; types: typeof t; traverse: typeof traverse; template: typeof template; matchers: typeof m; } export type Plugin = (api: PluginAPI) => PluginObject; export declare function runPlugins(ast: t.File, plugins: Plugin[], state: PluginState): Promise; //# sourceMappingURL=plugin.d.ts.map