UNPKG

babel-plugin-debug-macros

Version:
26 lines (25 loc) 1 kB
import type * as Babel from '@babel/core'; import type { types as t } from '@babel/core'; import type { NormalizedOptions } from './normalize-options'; import type { NodePath } from '@babel/core'; import type { ImportUtil } from 'babel-import-util'; export default class Macros { private debugHelpers; private localDebugBindings; private builder; constructor(babel: typeof Babel, options: NormalizedOptions, util: ImportUtil); /** * Injects the either the env-flags module with the debug binding or * adds the debug binding if missing from the env-flags module. */ expand(): void; /** * Collects the import bindings for the debug tools. */ collectDebugToolsSpecifiers(specifiers: NodePath<t.ImportSpecifier | t.ImportDefaultSpecifier | t.ImportNamespaceSpecifier>[]): void; /** * Builds the expressions that the CallExpression will expand into. */ build(path: NodePath<t.ExpressionStatement>): void; _cleanImports(): void; }