import * as BabelTypes from "@babel/types"; import { Visitor, NodePath } from "@babel/traverse"; import { QueryManager, BabelGQLWebpackPlugin } from "./query-manager"; export { QueryManager, BabelGQLWebpackPlugin }; export interface Babel { types: typeof BabelTypes; } export interface BabelGQLOptions { ownModuleName?: string; export?: boolean; removeQuery?: boolean; target?: string; } interface BabelFile { opts: { generatorOpts: any; }; code: string; path: NodePath; } /** * Babel visitor state * * XXX find existing type for this */ interface VisitorState { opts?: Options; file: BabelFile; } /** * Babel plugin type. * * XXX find existing type for this */ interface BabelPlugin { visitor: Visitor>; pre?(state: VisitorState): void; post?(state: VisitorState): void; } export declare class TransformGQLTags { qm: QueryManager; babel: Babel; fileState: { /** * Local name of the css import from babel-gql if any */ ourName: string | null; externalTags: Set; /** * Graphql tags to be injected */ inject: any[]; }; constructor(options: { qm: QueryManager; babel: Babel; }); resetFileState(): void; asBabelPlugin(): BabelPlugin; } export default function babelGQLPlugin(babel: Babel): BabelPlugin;