- Version 1.0.0
- 1 dependency
- MIT license
npm i @types/on-headers
yarn add @types/on-headers
pnpm add @types/on-headers
TypeScript definitions for on-headers
onHeaders: (res: ServerResponse,listener: (this: ServerResponse) => void) => void;
This will add the listener to fire when headers are emitted for res. The listener is passed the response object as its context (this). Headers are considered emitted only once, right before they are sent to the client.
When this is called multiple times on the same res, the listeners are fired in the reverse order they were added.
HTTP server response object
Function to call prior to headers being emitted, the response object is passed as this context.
Package Files (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to
- HTML<a href="https://www.jsdocs.io/package/@types/on-headers"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2697 ms.
- Missing or incorrect documentation? Open an issue for this package.