diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 221dd5baad..66c319c895 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -2501,7 +2501,7 @@ declare module "readline" { } declare module "vm" { - interface Context { + interface Context { [key: string]: any; } interface BaseOptions { diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 0ae3866a8a..7e3c491802 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -3676,11 +3676,11 @@ import * as p from "process"; 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 = {}; + _server.context['key0'] = 1; + _server.context['key1'] = ""; + _server.context['key2'] = true; + _server.context['key3'] = []; + _server.context['key4'] = {}; } } diff --git a/types/node/v9/index.d.ts b/types/node/v9/index.d.ts index b620ac9ce1..3660d87725 100644 --- a/types/node/v9/index.d.ts +++ b/types/node/v9/index.d.ts @@ -2390,7 +2390,7 @@ declare module "readline" { } declare module "vm" { - export interface Context { + export interface Context { [key: string]: any; } export interface ScriptOptions {