UNPKG

@nodesecure/js-x-ray

Version:
21 lines 776 B
import type { ESTree } from "meriyah"; import type { ProbeContext, ProbeMainContext } from "../ProbeRunner.ts"; /** * @description Detect unsafe statement * @example * eval("this"); * Function("return this")(); */ declare function validateNode(node: ESTree.Node, ctx: ProbeContext): [boolean, any?]; declare function main(node: ESTree.CallExpression, ctx: ProbeMainContext): symbol; export declare function isUnsafeCallee(node: ESTree.CallExpression | ESTree.Node, ctx: ProbeContext): [boolean, "eval" | "Function" | null]; declare const _default: { name: string; nodeTypes: string[]; validateNode: typeof validateNode; main: typeof main; breakOnMatch: boolean; context: {}; }; export default _default; //# sourceMappingURL=isUnsafeCallee.d.ts.map