From 65b51d05facd30973b0fb50e5eb931d46ec008ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 26 Sep 2021 12:22:11 +0200 Subject: [PATCH] typings: fix declaration of primordials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/40222 Fixes: https://github.com/nodejs/node/issues/40144 Reviewed-By: Tobias Nießen Reviewed-By: Evan Lucas Reviewed-By: Zijian Liu Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- typings/primordials.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/typings/primordials.d.ts b/typings/primordials.d.ts index beed1d7b83c4c9..5c291769de66b1 100644 --- a/typings/primordials.d.ts +++ b/typings/primordials.d.ts @@ -24,7 +24,7 @@ type StaticApply unknown> = * primordials.StringPrototypeStartsWith('thing', 'hello') * ``` */ -declare namespace primordials { +declare namespace Primordials { export function uncurryThis< T extends (...args: unknown[]) => unknown > (fn: T): @@ -527,3 +527,7 @@ declare namespace primordials { export const PromisePrototypeCatch: UncurryThis export const PromisePrototypeFinally: UncurryThis } + +declare global { + const primordials: typeof Primordials; +}