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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
1ilsang authored and targos committed Sep 22, 2024
1 parent 1cae641 commit 75c1ace
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 75c1ace

Please sign in to comment.