From 75c1ace0449cc3e782a2005c58a5e2564e7e1f7d Mon Sep 17 00:00:00 2001 From: 1ilsang <1ilsang@naver.com> Date: Fri, 6 Sep 2024 17:29:11 +0900 Subject: [PATCH] typings: fix TypedArray to a global type PR-URL: https://github.com/nodejs/node/pull/54063 Reviewed-By: Daeyeon Jeong Reviewed-By: James M Snell --- typings/globals.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/typings/globals.d.ts b/typings/globals.d.ts index bc47c08b02b376..52b64bf9c344b2 100644 --- a/typings/globals.d.ts +++ b/typings/globals.d.ts @@ -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; @@ -54,6 +41,19 @@ type InternalBindingKeys = keyof InternalBindingMap; declare function internalBinding(binding: T): InternalBindingMap[T] declare global { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | Float32Array + | Float64Array + | BigUint64Array + | BigInt64Array; + namespace NodeJS { interface Global { internalBinding(binding: T): InternalBindingMap[T]