mirror of
https://github.com/nodejs/node.git
synced 2024-11-28 06:28:40 +01:00
da7962fd4d
PR-URL: https://github.com/nodejs/node/pull/49742 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
import {AsyncWrapBinding} from "./internalBinding/async_wrap";
|
|
import {BlobBinding} from "./internalBinding/blob";
|
|
import {ConfigBinding} from "./internalBinding/config";
|
|
import {ConstantsBinding} from "./internalBinding/constants";
|
|
import {HttpParserBinding} from "./internalBinding/http_parser";
|
|
import {FsBinding} from "./internalBinding/fs";
|
|
import {MessagingBinding} from "./internalBinding/messaging";
|
|
import {OptionsBinding} from "./internalBinding/options";
|
|
import {OSBinding} from "./internalBinding/os";
|
|
import {SerdesBinding} from "./internalBinding/serdes";
|
|
import {SymbolsBinding} from "./internalBinding/symbols";
|
|
import {TimersBinding} from "./internalBinding/timers";
|
|
import {TypesBinding} from "./internalBinding/types";
|
|
import {URLBinding} from "./internalBinding/url";
|
|
import {UtilBinding} from "./internalBinding/util";
|
|
import {WorkerBinding} from "./internalBinding/worker";
|
|
|
|
declare type TypedArray =
|
|
| Uint8Array
|
|
| Uint8ClampedArray
|
|
| Uint16Array
|
|
| Uint32Array
|
|
| Int8Array
|
|
| Int16Array
|
|
| Int32Array
|
|
| Float32Array
|
|
| Float64Array
|
|
| BigUint64Array
|
|
| BigInt64Array;
|
|
|
|
interface InternalBindingMap {
|
|
async_wrap: AsyncWrapBinding;
|
|
blob: BlobBinding;
|
|
config: ConfigBinding;
|
|
constants: ConstantsBinding;
|
|
fs: FsBinding;
|
|
http_parser: HttpParserBinding;
|
|
messaging: MessagingBinding;
|
|
options: OptionsBinding;
|
|
os: OSBinding;
|
|
serdes: SerdesBinding;
|
|
symbols: SymbolsBinding;
|
|
timers: TimersBinding;
|
|
types: TypesBinding;
|
|
url: URLBinding;
|
|
util: UtilBinding;
|
|
worker: WorkerBinding;
|
|
}
|
|
|
|
type InternalBindingKeys = keyof InternalBindingMap;
|
|
|
|
declare function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
|
|
|
|
declare global {
|
|
namespace NodeJS {
|
|
interface Global {
|
|
internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
|
|
}
|
|
}
|
|
}
|