summaryrefslogtreecommitdiff
path: root/typings
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2021-09-26 12:22:11 +0200
committerMichaël Zasso <targos@protonmail.com>2021-10-10 11:02:45 +0200
commit9e64336fbf22db26c7f70345231d0c060cf24e2c (patch)
tree05217538d185854af7c161f4b77689d22a2ed583 /typings
parent8068f40313a550423145081e0a9c94e52bd21a08 (diff)
downloadnode-new-9e64336fbf22db26c7f70345231d0c060cf24e2c.tar.gz
typings: fix declaration of primordials
PR-URL: https://github.com/nodejs/node/pull/40222 Fixes: https://github.com/nodejs/node/issues/40144 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'typings')
-rw-r--r--typings/primordials.d.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/typings/primordials.d.ts b/typings/primordials.d.ts
index beed1d7b83..5c291769de 100644
--- a/typings/primordials.d.ts
+++ b/typings/primordials.d.ts
@@ -24,7 +24,7 @@ type StaticApply<T extends (this: unknown, ...args: unknown[]) => 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<typeof Promise.prototype.catch>
export const PromisePrototypeFinally: UncurryThis<typeof Promise.prototype.finally>
}
+
+declare global {
+ const primordials: typeof Primordials;
+}