@types/on-headers

  • Version 1.0.0
  • Published
  • 1 dependency
  • MIT license

Install

npm i @types/on-headers
yarn add @types/on-headers
pnpm add @types/on-headers

Overview

TypeScript definitions for on-headers

Index

Functions

Functions

function onHeaders

onHeaders: (res: any, listener: (this: any) => 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.

    Parameter res

    HTTP server response object

    Parameter listener

    Function to call prior to headers being emitted, the response object is passed as this context.

Package Files (1)

Dependencies (1)

Dev Dependencies (0)

No dev dependencies.

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/on-headers.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/on-headers)
  • 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>