diff --git a/types/node/index.d.ts b/types/node/index.d.ts index dc98dcb05e3a59..e917b54655493b 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for non-npm package Node.js 14.0 +// Type definitions for non-npm package Node.js 14.6 // Project: http://nodejs.org/ // Definitions by: Microsoft TypeScript // DefinitelyTyped diff --git a/types/node/test/vm.ts b/types/node/test/vm.ts index cf2c12e60388d4..3a4a0e94256cd1 100644 --- a/types/node/test/vm.ts +++ b/types/node/test/vm.ts @@ -67,3 +67,11 @@ import { inspect } from 'util'; context: createContext(), }).then((data: MemoryMeasurement) => { }); } + +{ + runInNewContext( + 'blah', + { }, + { timeout: 5, microtaskMode: 'afterEvaluate' } + ); +} diff --git a/types/node/test/worker_threads.ts b/types/node/test/worker_threads.ts index cd97b4a00fea77..66cf68b887b389 100644 --- a/types/node/test/worker_threads.ts +++ b/types/node/test/worker_threads.ts @@ -76,4 +76,8 @@ import { Readable } from "stream"; const wwww = new workerThreads.Worker(__filename, { env: { doot: 'woot' } }); + + const wwwww = new workerThreads.Worker(__filename, { + trackUnmanagedFds: true + }); } diff --git a/types/node/tls.d.ts b/types/node/tls.d.ts index df21ea226d5592..6d28a37f00262d 100644 --- a/types/node/tls.d.ts +++ b/types/node/tls.d.ts @@ -706,6 +706,15 @@ declare module "tls" { * shared between applications. Unused by clients. */ sessionIdContext?: string; + /** + * 48 bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer; + /** + * The number of seconds after which a TLS session created by the server + * will no longer be resumable. + */ + sessionTimeout?: number; } interface SecureContext { diff --git a/types/node/vm.d.ts b/types/node/vm.d.ts index 822bd151db04ae..bfa81d9702407c 100644 --- a/types/node/vm.d.ts +++ b/types/node/vm.d.ts @@ -41,6 +41,10 @@ declare module "vm" { * Default: `false`. */ breakOnSigint?: boolean; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: 'afterEvaluate'; } interface CompileFunctionOptions extends BaseOptions { /** diff --git a/types/node/worker_threads.d.ts b/types/node/worker_threads.d.ts index 7eb4c241662ce0..1aea5d48fd4359 100644 --- a/types/node/worker_threads.d.ts +++ b/types/node/worker_threads.d.ts @@ -75,6 +75,7 @@ declare module "worker_threads" { * Additional data to send in the first worker message. */ transferList?: Array; + trackUnmanagedFds?: boolean; } interface ResourceLimits {