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 and targos committed Oct 2, 2024
1 parent a47bb9b commit e635e09
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 @@ -16,19 +16,6 @@ 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;
Expand All @@ -54,6 +41,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 e635e09

Please sign in to comment.