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>
This commit is contained in:
Michaël Zasso 2021-09-26 12:22:11 +02:00
parent 8068f40313
commit 9e64336fbf
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600

View File

@ -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;
}