/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ext/node/polyfills/internal_binding/http2.ts
80 строк
2 KB
Nathan Whitaker
perf: lazy-load more modules in the snapshot (#34061)
19 май 2026, 02:37
Не верифицирован
19 май 2026, 02:37
eb4061f
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. (function () { const { core } = __bootstrap; const { op_http2_error_string } = core.ops; const constants = core.loadExtScript( "ext:deno_node/internal/http2/constants.ts", ); class Http2Stream { respond( this: { respond(headers: string, count: number, options: number): number; }, headers: string, count: number, options: number, ): number { // Tests replace this prototype method; otherwise `this` is the native // handle, so dispatch falls through to the handle's own `respond` op. return this.respond(headers, count, options); } pushPromise( this: { pushPromise(headers: string, count: number, options: number): number; }, headers: string, count: number, options: number, ): number { // Tests replace this prototype method; otherwise `this` is the native // handle, so dispatch falls through to the handle's own `pushPromise` op. return this.pushPromise(headers, count, options); } } class Http2Session { request( this: { request( headers: string, count: number, options: number, parent: number, weight: number, exclusive: boolean, ): unknown; }, headers: string, count: number, options: number, parent: number, weight: number, exclusive: boolean, ): unknown { // Tests replace this prototype method; otherwise `this` is the native // handle, so dispatch falls through to the handle's own `request` op. return this.request(headers, count, options, parent, weight, exclusive); } } function nghttp2ErrorString(integerCode: number) { return op_http2_error_string(integerCode); } const _defaultExport = { constants, Http2Session, Http2Stream, nghttp2ErrorString, }; return { constants, Http2Session, Http2Stream, nghttp2ErrorString, default: _defaultExport, }; })();