microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
193485647cd6dc1cb6b641e8948946ef51ca534e

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/typings/script.d.ts

15lines · modecode

1declare module "vm" {
2 // See https://nodejs.org/api/vm.html#vm_class_script
3 interface IRunningScriptOptions {
4 filename: string; // Allows you to control the filename that shows up in any stack traces produced from this script.
5 lineOffset: number; // Allows you to add an offset to the line number that is displayed in stack traces
6 columnOffset: number; // Allows you to add an offset to the column number that is displayed in stack traces
7 displayErrors: boolean; // Whether or not to print any errors to stderr, with the line of code that caused them highlighted, before throwing an exception. Applies only to syntax errors compiling the code; errors while running the code are controlled by the options to the script's methods.
8 timeout: number; // A number of milliseconds to execute code before terminating execution. If execution is terminated, an Error will be thrown.
9 }
10
11 class Script {
12 constructor(code: string, options?: IRunningScriptOptions);
13 runInContext(contextifiedSandbox: Context, options?: IRunningScriptOptions): any;
14 }
15}