From 689d127ee72d7e5c8ed94b333fa0c651e7ad4663 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 0b82dbb2ccb330..3861dfbc5080bd 100644 --- a/typings/globals.d.ts +++ b/typings/globals.d.ts @@ -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(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]