mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
typings: fix TypedArray to a global type
PR-URL: https://github.com/nodejs/node/pull/54063 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
26
typings/globals.d.ts
vendored
26
typings/globals.d.ts
vendored
@@ -19,19 +19,6 @@ import { WASIBinding } from './internalBinding/wasi';
|
||||
import { WorkerBinding } from './internalBinding/worker';
|
||||
import { ModulesBinding } from './internalBinding/modules';
|
||||
|
||||
declare type TypedArray =
|
||||
| Uint8Array
|
||||
| Uint8ClampedArray
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| BigUint64Array
|
||||
| BigInt64Array;
|
||||
|
||||
interface InternalBindingMap {
|
||||
async_wrap: AsyncWrapBinding;
|
||||
blob: BlobBinding;
|
||||
@@ -60,6 +47,19 @@ type InternalBindingKeys = keyof InternalBindingMap;
|
||||
declare function internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
|
||||
|
||||
declare global {
|
||||
type TypedArray =
|
||||
| Uint8Array
|
||||
| Uint8ClampedArray
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| BigUint64Array
|
||||
| BigInt64Array;
|
||||
|
||||
namespace NodeJS {
|
||||
interface Global {
|
||||
internalBinding<T extends InternalBindingKeys>(binding: T): InternalBindingMap[T]
|
||||
|
||||
Reference in New Issue
Block a user