Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#46244 [node] Update with changes from v14.…
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored and danielrearden committed Sep 22, 2020
1 parent dca6a36 commit 8e33f53
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion types/node/index.d.ts
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/Microsoft>
// DefinitelyTyped <https://github.com/DefinitelyTyped>
Expand Down
8 changes: 8 additions & 0 deletions types/node/test/vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,11 @@ import { inspect } from 'util';
context: createContext(),
}).then((data: MemoryMeasurement) => { });
}

{
runInNewContext(
'blah',
{ },
{ timeout: 5, microtaskMode: 'afterEvaluate' }
);
}
4 changes: 4 additions & 0 deletions types/node/test/worker_threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
}
9 changes: 9 additions & 0 deletions types/node/tls.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions types/node/vm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down
1 change: 1 addition & 0 deletions types/node/worker_threads.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ declare module "worker_threads" {
* Additional data to send in the first worker message.
*/
transferList?: Array<ArrayBuffer | MessagePort>;
trackUnmanagedFds?: boolean;
}

interface ResourceLimits {
Expand Down

0 comments on commit 8e33f53

Please sign in to comment.