mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
[node]: add props to repl.Context
This commit is contained in:
4
types/node/index.d.ts
vendored
4
types/node/index.d.ts
vendored
@@ -2501,7 +2501,9 @@ declare module "readline" {
|
||||
}
|
||||
|
||||
declare module "vm" {
|
||||
interface Context { }
|
||||
interface Context {
|
||||
[key: string]: any;
|
||||
}
|
||||
interface BaseOptions {
|
||||
/**
|
||||
* Specifies the filename used in stack traces produced by this script.
|
||||
|
||||
@@ -3675,6 +3675,12 @@ import * as p from "process";
|
||||
function test() {
|
||||
throw new repl.Recoverable(new Error("test"));
|
||||
}
|
||||
|
||||
_server.context.key0 = 1;
|
||||
_server.context.key1 = "string";
|
||||
_server.context.key2 = true;
|
||||
_server.context.key3 = [];
|
||||
_server.context.key4 = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
types/node/v9/index.d.ts
vendored
4
types/node/v9/index.d.ts
vendored
@@ -2390,7 +2390,9 @@ declare module "readline" {
|
||||
}
|
||||
|
||||
declare module "vm" {
|
||||
export interface Context { }
|
||||
export interface Context {
|
||||
[key: string]: any;
|
||||
}
|
||||
export interface ScriptOptions {
|
||||
filename?: string;
|
||||
lineOffset?: number;
|
||||
|
||||
Reference in New Issue
Block a user