Skip to content

Commit

Permalink
typings: fix TypedArray to a global type
Browse files Browse the repository at this point in the history
PR-URL: #54063
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
1ilsang authored Sep 6, 2024
1 parent 13d6950 commit 94419bf
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions typings/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 94419bf

Please sign in to comment.