Skip to main content
ClientHttp2Session.prependListener - node__http2.d.ts - Node documentation
method ClientHttp2Session.prependListener

Usage in Deno

```typescript import { type ClientHttp2Session } from "node:node__http2.d.ts"; ```
ClientHttp2Session.prependListener(
event: "altsvc",
listener: (
alt: string,
origin: string,
stream: number,
) => void
,
): this

Parameters

event: "altsvc"
listener: (
alt: string,
origin: string,
stream: number,
) => void

Return Type

this
ClientHttp2Session.prependListener(
event: "origin",
listener: (origins: string[]) => void,
): this

Parameters

event: "origin"
listener: (origins: string[]) => void

Return Type

this
ClientHttp2Session.prependListener(
event: "connect",
listener: (
socket: net.Socket | tls.TLSSocket,
) => void
,
): this

Parameters

event: "connect"
listener: (
socket: net.Socket | tls.TLSSocket,
) => void

Return Type

this
ClientHttp2Session.prependListener(
event: "stream",
listener: () => void,
): this

Parameters

event: "stream"
listener: () => void

Return Type

this
ClientHttp2Session.prependListener(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters

event: string | symbol
listener: (...args: any[]) => void

Return Type

this