This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

50
node_modules/eval/eval.d.ts generated vendored Normal file
View File

@@ -0,0 +1,50 @@
/// <reference types="node" />
import { Script } from "vm";
/**
* A simple way to evaluate a module content in the same way as require() but
* without loading it from a file. Effectively, it mimicks the javascript evil
* `eval` function but leverages Node's VM module instead.
*/
declare const nodeEval: {
(
/** The content to be evaluated. */
content: string | Buffer | Script,
): unknown;
(
/** The content to be evaluated. */
content: string | Buffer | Script,
/**
* Optional flag to allow/disallow global variables (and require) to be
* supplied to the content (default=false).
*/
includeGlobals?: boolean,
): unknown;
(
/** The content to be evaluated. */
content: string | Buffer | Script,
/** Optional scope properties are provided as variables to the content. */
scope?: Record<string, unknown>,
/**
* Optional flag to allow/disallow global variables (and require) to be
* supplied to the content (default=false).
*/
includeGlobals?: boolean,
): unknown;
(
/** The content to be evaluated. */
content: string | Buffer | Script,
/** Optional dummy name to be given (used in stacktraces). */
filename?: string,
/** Optional scope properties are provided as variables to the content. */
scope?: Record<string, unknown>,
/**
* Optional flag to allow/disallow global variables (and require) to be
* supplied to the content (default=false).
*/
includeGlobals?: boolean,
): unknown;
};
export = nodeEval;