microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/typings/script.d.ts
15lines · modeblame
ea8a5f88digeff10 years ago | 1 | declare 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 | } |