2024-07-29 23:19:58 +02:00
|
|
|
import { AsyncWrapBinding } from './internalBinding/async_wrap';
|
|
|
|
import { BlobBinding } from './internalBinding/blob';
|
|
|
|
import { ConfigBinding } from './internalBinding/config';
|
|
|
|
import { ConstantsBinding } from './internalBinding/constants';
|
2024-08-13 14:37:02 +02:00
|
|
|
import { DebugBinding } from './internalBinding/debug';
|
2024-07-29 23:19:58 +02:00
|
|
|
import { HttpParserBinding } from './internalBinding/http_parser';
|
|
|
|
import { FsBinding } from './internalBinding/fs';
|
|
|
|
import { FsDirBinding } from './internalBinding/fs_dir';
|
|
|
|
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';
|
2024-08-24 18:59:17 +02:00
|
|
|
import { WASIBinding } from './internalBinding/wasi';
|
2024-07-29 23:19:58 +02:00
|
|
|
import { WorkerBinding } from './internalBinding/worker';
|
|
|
|
import { ModulesBinding } from './internalBinding/modules';
|
2024-09-01 19:14:27 +02:00
|
|
|
import { ZlibBinding } from './internalBinding/zlib';
|
2023-09-23 12:48:34 +02:00
|
|
|
|
|
|
|
interface InternalBindingMap {
|
|
|
|
async_wrap: AsyncWrapBinding;
|
|
|
|
blob: BlobBinding;
|
|
|
|
config: ConfigBinding;
|
|
|
|
constants: ConstantsBinding;
|
2024-08-13 14:37:02 +02:00
|
|
|
debug: DebugBinding;
|
2023-09-23 12:48:34 +02:00
|
|
|
fs: FsBinding;
|
2024-06-30 18:39:06 +02:00
|
|
|
fs_dir: FsDirBinding;
|
2023-09-23 12:48:34 +02:00
|
|
|
http_parser: HttpParserBinding;
|
|
|
|
messaging: MessagingBinding;
|
2023-10-25 23:51:27 +02:00
|
|
|
modules: ModulesBinding;
|
2023-09-23 12:48:34 +02:00
|
|
|
options: OptionsBinding;
|
|
|
|
os: OSBinding;
|
|
|
|
serdes: SerdesBinding;
|
|
|
|
symbols: SymbolsBinding;
|
|
|
|
timers: TimersBinding;
|
|
|
|
types: TypesBinding;
|
|
|
|
url: URLBinding;
|
|
|
|
util: UtilBinding;
|
2024-08-24 18:59:17 +02:00
|
|
|
wasi: WASIBinding;
|
2023-09-23 12:48:34 +02:00
|
|
|
worker: WorkerBinding;
|
2024-09-01 19:14:27 +02:00
|
|
|
zlib: ZlibBinding;
|
2023-09-23 12:48:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type InternalBindingKeys = keyof InternalBindingMap;
|
|
|
|
|
|
|
|
declare function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
|
|
|
|
|
|
|
|
declare global {
|
2024-09-06 10:29:11 +02:00
|
|
|
type TypedArray =
|
|
|
|
| Uint8Array
|
|
|
|
| Uint8ClampedArray
|
|
|
|
| Uint16Array
|
|
|
|
| Uint32Array
|
|
|
|
| Int8Array
|
|
|
|
| Int16Array
|
|
|
|
| Int32Array
|
|
|
|
| Float32Array
|
|
|
|
| Float64Array
|
|
|
|
| BigUint64Array
|
|
|
|
| BigInt64Array;
|
|
|
|
|
2023-09-23 12:48:34 +02:00
|
|
|
namespace NodeJS {
|
|
|
|
interface Global {
|
|
|
|
internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|