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 committed 2021-10-10 11:02:45 +02:00
1 parent 8068f40313
commit 9e64336fbf
1 file changed
+5 -1
+5 -1
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;
}