| | |
| | | * const http2 = require('http2'); |
| | | * ``` |
| | | * @since v8.4.0 |
| | | * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http2.js) |
| | | * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/http2.js) |
| | | */ |
| | | declare module 'http2' { |
| | | import EventEmitter = require('node:events'); |
| | |
| | | parent?: number | undefined; |
| | | weight?: number | undefined; |
| | | waitForTrailers?: boolean | undefined; |
| | | signal?: AbortSignal | undefined; |
| | | } |
| | | export interface SessionState { |
| | | effectiveLocalWindowSize?: number | undefined; |
| | |
| | | * session.setLocalWindowSize(expectedWindowSize); |
| | | * }); |
| | | * ``` |
| | | * @since v15.3.0 |
| | | * @since v15.3.0, v14.18.0 |
| | | */ |
| | | setLocalWindowSize(windowSize: number): void; |
| | | /** |
| | |
| | | * ``` |
| | | * @since v8.4.0 |
| | | */ |
| | | readonly url: string; |
| | | url: string; |
| | | /** |
| | | * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is |
| | | * provided, then it is added as a listener on the `'timeout'` event on |
| | |
| | | * is finished. |
| | | * @since v8.4.0 |
| | | */ |
| | | end(callback?: () => void): void; |
| | | end(data: string | Uint8Array, callback?: () => void): void; |
| | | end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void; |
| | | end(callback?: () => void): this; |
| | | end(data: string | Uint8Array, callback?: () => void): this; |
| | | end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; |
| | | /** |
| | | * Reads out a header that has already been queued but not sent to the client. |
| | | * The name is case-insensitive. |