GeezerVison is showing github.com — typings: improve internal binding types · nodejs/node@6dbda6c
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: typings/globals.d.ts +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +import { AsyncContextFrameBinding } from './internalBinding/async_context_frame'; | 1 | 2 | import { AsyncWrapBinding } from './internalBinding/async_wrap'; | 2 | 3 | import { BlobBinding } from './internalBinding/blob'; | 3 | 4 | import { ConfigBinding } from './internalBinding/config'; | @@ -7,10 +8,12 @@ import { HttpParserBinding } from './internalBinding/http_parser'; | 7 | 8 | import { InspectorBinding } from './internalBinding/inspector'; | 8 | 9 | import { FsBinding } from './internalBinding/fs'; | 9 | 10 | import { FsDirBinding } from './internalBinding/fs_dir'; | | 11 | +import { ICUBinding } from './internalBinding/icu'; | 10 | 12 | import { MessagingBinding } from './internalBinding/messaging'; | 11 | 13 | import { OptionsBinding } from './internalBinding/options'; | 12 | 14 | import { OSBinding } from './internalBinding/os'; | 13 | 15 | import { ProcessBinding } from './internalBinding/process'; | | 16 | +import { SeaBinding } from './internalBinding/sea'; | 14 | 17 | import { SerdesBinding } from './internalBinding/serdes'; | 15 | 18 | import { SymbolsBinding } from './internalBinding/symbols'; | 16 | 19 | import { TimersBinding } from './internalBinding/timers'; | @@ -23,6 +26,7 @@ import { ModulesBinding } from './internalBinding/modules'; | 23 | 26 | import { ZlibBinding } from './internalBinding/zlib'; | 24 | 27 |
| 25 | 28 | interface InternalBindingMap { | | 29 | + async_context_frame: AsyncContextFrameBinding; | 26 | 30 | async_wrap: AsyncWrapBinding; | 27 | 31 | blob: BlobBinding; | 28 | 32 | config: ConfigBinding; | @@ -31,12 +35,14 @@ interface InternalBindingMap { | 31 | 35 | fs: FsBinding; | 32 | 36 | fs_dir: FsDirBinding; | 33 | 37 | http_parser: HttpParserBinding; | | 38 | + icu: ICUBinding; | 34 | 39 | inspector: InspectorBinding; | 35 | 40 | messaging: MessagingBinding; | 36 | 41 | modules: ModulesBinding; | 37 | 42 | options: OptionsBinding; | 38 | 43 | os: OSBinding; | 39 | 44 | process: ProcessBinding; | | 45 | + sea: SeaBinding; | 40 | 46 | serdes: SerdesBinding; | 41 | 47 | symbols: SymbolsBinding; | 42 | 48 | timers: TimersBinding; | @@ -61,6 +67,7 @@ declare global { | 61 | 67 | | Int8Array | 62 | 68 | | Int16Array | 63 | 69 | | Int32Array | | 70 | + | Float16Array | 64 | 71 | | Float32Array | 65 | 72 | | Float64Array | 66 | 73 | | BigUint64Array | |
Collapse file Copy file name to clipboard +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +export interface AsyncContextFrameBinding { | | 2 | + getContinuationPreservedEmbedderData(): unknown, | | 3 | + setContinuationPreservedEmbedderData(frame: unknown): void, | | 4 | +} |
Collapse file Copy file name to clipboardExpand all lines: typings/internalBinding/constants.d.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -287,6 +287,9 @@ export interface ConstantsBinding { | 287 | 287 | BROTLI_ENCODE: 9; | 288 | 288 | ZSTD_COMPRESS: 10; | 289 | 289 | ZSTD_DECOMPRESS: 11; | | 290 | + ZSTD_e_continue: 0; | | 291 | + ZSTD_e_flush: 1; | | 292 | + ZSTD_e_end: 2; | 290 | 293 | Z_MIN_WINDOWBITS: 8; | 291 | 294 | Z_MAX_WINDOWBITS: 15; | 292 | 295 | Z_DEFAULT_WINDOWBITS: 15; | |
Collapse file Copy file name to clipboardExpand all lines: typings/internalBinding/http_parser.d.ts +12-1Lines changed: 12 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,6 +2,15 @@ declare namespace InternalHttpParserBinding { | 2 | 2 | type Buffer = Uint8Array; | 3 | 3 | type Stream = object; | 4 | 4 |
| | 5 | + class ConnectionsList { | | 6 | + constructor(); | | 7 | + | | 8 | + all(): HTTPParser[]; | | 9 | + idle(): HTTPParser[]; | | 10 | + active(): HTTPParser[]; | | 11 | + expired(): HTTPParser[]; | | 12 | + } | | 13 | + | 5 | 14 | class HTTPParser { | 6 | 15 | static REQUEST: 1; | 7 | 16 | static RESPONSE: 2; | @@ -40,6 +49,8 @@ declare namespace InternalHttpParserBinding { | 40 | 49 | } | 41 | 50 |
| 42 | 51 | export interface HttpParserBinding { | 43 | | - methods: string[]; | | 52 | + ConnectionsList: typeof InternalHttpParserBinding.ConnectionsList; | 44 | 53 | HTTPParser: typeof InternalHttpParserBinding.HTTPParser; | | 54 | + allMethods: string[]; | | 55 | + methods: string[]; | 45 | 56 | } |
Collapse file Copy file name to clipboard +18Lines changed: 18 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +export interface ICUBinding { | | 2 | + Converter: object; | | 3 | + decode( | | 4 | + converter: object, | | 5 | + input: ArrayBufferView | ArrayBuffer | SharedArrayBuffer, | | 6 | + flags: number, | | 7 | + fromEncoding: string, | | 8 | + ): string; | | 9 | + getConverter(label: string, flags: number): object | undefined; | | 10 | + getStringWidth(value: string, ambiguousAsFullWidth?: boolean, expandEmojiSequence?: boolean): number; | | 11 | + hasConverter(label: string): boolean; | | 12 | + icuErrName(status: number): string; | | 13 | + transcode( | | 14 | + input: ArrayBufferView | ArrayBuffer | SharedArrayBuffer, | | 15 | + fromEncoding: string, | | 16 | + toEncoding: string, | | 17 | + ): Buffer | number; | | 18 | +} |
Collapse file Copy file name to clipboard +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +export interface SeaBinding { | | 2 | + getAsset(key: string): ArrayBuffer | undefined; | | 3 | + isExperimentalSeaWarningNeeded(): boolean; | | 4 | + isSea(): boolean; | | 5 | +} |
Collapse file Copy file name to clipboardExpand all lines: typings/internalBinding/symbols.d.ts +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | export const async_id_symbol: unique symbol; | 2 | 2 | export const handle_onclose_symbol: unique symbol; | | 3 | +export const imported_cjs_symbol: unique symbol; | 3 | 4 | export const no_message_symbol: unique symbol; | 4 | 5 | export const messaging_deserialize_symbol: unique symbol; | 5 | 6 | export const messaging_transfer_symbol: unique symbol; | @@ -13,6 +14,7 @@ export const trigger_async_id_symbol: unique symbol; | 13 | 14 | export interface SymbolsBinding { | 14 | 15 | async_id_symbol: typeof async_id_symbol; | 15 | 16 | handle_onclose_symbol: typeof handle_onclose_symbol; | | 17 | + imported_cjs_symbol: typeof imported_cjs_symbol; | 16 | 18 | no_message_symbol: typeof no_message_symbol; | 17 | 19 | messaging_deserialize_symbol: typeof messaging_deserialize_symbol; | 18 | 20 | messaging_transfer_symbol: typeof messaging_transfer_symbol; | |
Collapse file Copy file name to clipboardExpand all lines: typings/internalBinding/util.d.ts +19Lines changed: 19 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,4 +45,23 @@ export interface UtilBinding { | 45 | 45 | guessHandleType(fd: number): 'TCP' | 'TTY' | 'UDP' | 'FILE' | 'PIPE' | 'UNKNOWN'; | 46 | 46 | parseEnv(content: string): Record<string, string>; | 47 | 47 | styleText(format: Array<string> | string, text: string): string; | | 48 | + isInsideNodeModules(frameLimit: number, defaultValue: unknown): boolean; | | 49 | + | | 50 | + constants: { | | 51 | + kPending: 0; | | 52 | + kFulfilled: 1; | | 53 | + kRejected: 2; | | 54 | + kExiting: 0; | | 55 | + kExitCode: 1; | | 56 | + kHasExitCode: 2; | | 57 | + ALL_PROPERTIES: 0; | | 58 | + ONLY_WRITABLE: 1; | | 59 | + ONLY_ENUMERABLE: 2; | | 60 | + ONLY_CONFIGURABLE: 4; | | 61 | + SKIP_STRINGS: 8; | | 62 | + SKIP_SYMBOLS: 16; | | 63 | + kDisallowCloneAndTransfer: 0; | | 64 | + kTransferable: 1; | | 65 | + kCloneable: 2; | | 66 | + }; | 48 | 67 | } |
Collapse file Copy file name to clipboardExpand all lines: typings/primordials.d.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -279,6 +279,7 @@ declare namespace primordials { | 279 | 279 | export const FunctionPrototypeApply: UncurryThis<typeof Function.prototype.apply> | 280 | 280 | export const FunctionPrototypeBind: UncurryThis<typeof Function.prototype.bind> | 281 | 281 | export const FunctionPrototypeCall: UncurryThis<typeof Function.prototype.call> | | 282 | + export const FunctionPrototypeSymbolHasInstance: UncurryMethod<typeof Function.prototype, typeof Symbol.hasInstance> | 282 | 283 | export const FunctionPrototypeToString: UncurryThis<typeof Function.prototype.toString> | 283 | 284 | export import Int16Array = globalThis.Int16Array; | 284 | 285 | export const Int16ArrayPrototype: typeof Int16Array.prototype | @@ -370,6 +371,8 @@ declare namespace primordials { | 370 | 371 | export const RegExpPrototypeGetSource: UncurryGetter<typeof RegExp.prototype, "source">; | 371 | 372 | export const RegExpPrototypeGetSticky: UncurryGetter<typeof RegExp.prototype, "sticky">; | 372 | 373 | export const RegExpPrototypeGetUnicode: UncurryGetter<typeof RegExp.prototype, "unicode">; | | 374 | + export const RegExpPrototypeSymbolReplace: UncurryMethod<typeof RegExp.prototype, typeof Symbol.replace> | | 375 | + export const RegExpPrototypeSymbolSplit: UncurryMethod<typeof RegExp.prototype, typeof Symbol.split> | 373 | 376 | export import Set = globalThis.Set; | 374 | 377 | export const SetLength: typeof Set.length | 375 | 378 | export const SetName: typeof Set.name | |
|