Socket
Socket
Sign inDemoInstall

@types/node

Package Overview
Dependencies
0
Maintainers
1
Versions
1817
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 18.16.0 to 18.16.3

2

node/globals.d.ts

@@ -162,3 +162,3 @@ // Declare "static" methods in Error

*/
getFileName(): string | null;
getFileName(): string | undefined;

@@ -165,0 +165,0 @@ /**

{
"name": "@types/node",
"version": "18.16.0",
"version": "18.16.3",
"description": "TypeScript definitions for Node.js",

@@ -235,4 +235,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

"dependencies": {},
"typesPublisherContentHash": "a33ada7d817296d3a0955f57b75fdf38201a158b99b66db3bb81316dfddd470b",
"typesPublisherContentHash": "69f2a06d3dd7a1f50c66f61c4e0df5c3791ce3dd65fc61ad18e536db6528487d",
"typeScriptVersion": "4.3"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Sun, 23 Apr 2023 05:02:41 GMT
* Last updated: Sat, 29 Apr 2023 06:32:49 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`

@@ -1096,2 +1096,9 @@ /**

/**
* The default value of the ciphers option of tls.createSecureContext().
* It can be assigned any of the supported OpenSSL ciphers.
* Defaults to the content of crypto.constants.defaultCoreCipherList, unless
* changed using CLI options using --tls-default-ciphers.
*/
let DEFAULT_CIPHERS: string;
/**
* An immutable array of strings representing the root certificates (in PEM

@@ -1098,0 +1105,0 @@ * format) used for verifying peer certificates. This is the default value

@@ -1096,2 +1096,9 @@ /**

/**
* The default value of the ciphers option of tls.createSecureContext().
* It can be assigned any of the supported OpenSSL ciphers.
* Defaults to the content of crypto.constants.defaultCoreCipherList, unless
* changed using CLI options using --tls-default-ciphers.
*/
let DEFAULT_CIPHERS: string;
/**
* An immutable array of strings representing the root certificates (in PEM

@@ -1098,0 +1105,0 @@ * format) used for verifying peer certificates. This is the default value

@@ -444,2 +444,96 @@ /**

}
/**
* Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
* happen if a promise is created without ever getting a continuation.
* @since v17.1.0, v16.14.0
* @param promise The promise being created.
* @param parent The promise continued from, if applicable.
*/
interface Init {
(promise: Promise<unknown>, parent: Promise<unknown>): void;
}
/**
* Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
*
* The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
* The before callback may be called many times in the case where many continuations have been made from the same promise.
* @since v17.1.0, v16.14.0
*/
interface Before {
(promise: Promise<unknown>): void;
}
/**
* Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
* @since v17.1.0, v16.14.0
*/
interface After {
(promise: Promise<unknown>): void;
}
/**
* Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
* {@link Promise.reject()}.
* @since v17.1.0, v16.14.0
*/
interface Settled {
(promise: Promise<unknown>): void;
}
/**
* Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
* around an await, and when the promise resolves or rejects.
*
* Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
* `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
* @since v17.1.0, v16.14.0
*/
interface HookCallbacks {
init?: Init;
before?: Before;
after?: After;
settled?: Settled;
}
interface PromiseHooks {
/**
* The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param init The {@link Init | `init` callback} to call when a promise is created.
* @return Call to stop the hook.
*/
onInit: (init: Init) => Function;
/**
* The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param settled The {@link Settled | `settled` callback} to call when a promise is created.
* @return Call to stop the hook.
*/
onSettled: (settled: Settled) => Function;
/**
* The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param before The {@link Before | `before` callback} to call before a promise continuation executes.
* @return Call to stop the hook.
*/
onBefore: (before: Before) => Function;
/**
* The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param after The {@link After | `after` callback} to call after a promise continuation executes.
* @return Call to stop the hook.
*/
onAfter: (after: After) => Function;
/**
* Registers functions to be called for different lifetime events of each promise.
* The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
* All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
* The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
* @return Used for disabling hooks
*/
createHook: (callbacks: HookCallbacks) => Function;
}
/**
* The `promiseHooks` interface can be used to track promise lifecycle events.
* @since v17.1.0, v16.14.0
*/
const promiseHooks: PromiseHooks;
}

@@ -446,0 +540,0 @@ declare module 'node:v8' {

@@ -444,2 +444,96 @@ /**

}
/**
* Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
* happen if a promise is created without ever getting a continuation.
* @since v17.1.0, v16.14.0
* @param promise The promise being created.
* @param parent The promise continued from, if applicable.
*/
interface Init {
(promise: Promise<unknown>, parent: Promise<unknown>): void;
}
/**
* Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
*
* The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
* The before callback may be called many times in the case where many continuations have been made from the same promise.
* @since v17.1.0, v16.14.0
*/
interface Before {
(promise: Promise<unknown>): void;
}
/**
* Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
* @since v17.1.0, v16.14.0
*/
interface After {
(promise: Promise<unknown>): void;
}
/**
* Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
* {@link Promise.reject()}.
* @since v17.1.0, v16.14.0
*/
interface Settled {
(promise: Promise<unknown>): void;
}
/**
* Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
* around an await, and when the promise resolves or rejects.
*
* Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
* `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
* @since v17.1.0, v16.14.0
*/
interface HookCallbacks {
init?: Init;
before?: Before;
after?: After;
settled?: Settled;
}
interface PromiseHooks {
/**
* The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param init The {@link Init | `init` callback} to call when a promise is created.
* @return Call to stop the hook.
*/
onInit: (init: Init) => Function;
/**
* The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param settled The {@link Settled | `settled` callback} to call when a promise is created.
* @return Call to stop the hook.
*/
onSettled: (settled: Settled) => Function;
/**
* The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param before The {@link Before | `before` callback} to call before a promise continuation executes.
* @return Call to stop the hook.
*/
onBefore: (before: Before) => Function;
/**
* The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param after The {@link After | `after` callback} to call after a promise continuation executes.
* @return Call to stop the hook.
*/
onAfter: (after: After) => Function;
/**
* Registers functions to be called for different lifetime events of each promise.
* The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
* All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
* The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
* @since v17.1.0, v16.14.0
* @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
* @return Used for disabling hooks
*/
createHook: (callbacks: HookCallbacks) => Function;
}
/**
* The `promiseHooks` interface can be used to track promise lifecycle events.
* @since v17.1.0, v16.14.0
*/
const promiseHooks: PromiseHooks;
}

@@ -446,0 +540,0 @@ declare module 'node:v8' {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc