UNPKG

@nodesecure/js-x-ray

Version:
26 lines 987 B
import type { ESTree } from "meriyah"; export interface SplitResult { /** * A virtual variable name that replaces the target */ virtualIdentifier: string; /** * Virtual variable declaration: * require: const __virtual_require_0__ = require("xxx") * new: const __virtual_new_0__ = new Foo("xxx") * Can be walked with standard ESTree walkers. */ virtualDeclaration: ESTree.VariableDeclaration; /** * The rebuilt expression with require() replaced by the virtual identifier. * For `require("x").spawn("y")`, this would be `__virtual_require_0__.spawn("y")` * For `(new Foo()).bar()`, this would be `__virtual_new_0__.bar()` * Can be walked with standard ESTree walkers. */ rebuildExpression: ESTree.Node | null; } export declare class Inlined { #private; static buildSplitResult(node: ESTree.Node, target: ESTree.Expression, identifier: string): SplitResult; } //# sourceMappingURL=Inlined.d.ts.map