mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
esm: remove return value for Module.register
The current API shape si not great because it's too limited and redundant with the use of `MessagePort`. PR-URL: https://github.com/nodejs/node/pull/49529 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me>
This commit is contained in:
parent
0a2ab4c77c
commit
b64c3ee6cb
6 changed files with 16 additions and 30 deletions
|
@ -140,7 +140,7 @@ class Hooks {
|
|||
parentURL,
|
||||
kEmptyObject,
|
||||
);
|
||||
return this.addCustomLoader(urlOrSpecifier, keyedExports, data);
|
||||
await this.addCustomLoader(urlOrSpecifier, keyedExports, data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -150,7 +150,7 @@ class Hooks {
|
|||
* @param {Record<string, unknown>} exports
|
||||
* @param {any} [data] Arbitrary data to be passed from the custom loader (user-land)
|
||||
* to the worker.
|
||||
* @returns {any} The result of the loader's `initialize` hook, if provided.
|
||||
* @returns {any | Promise<any>} User data, ignored unless it's a promise, in which case it will be awaited.
|
||||
*/
|
||||
addCustomLoader(url, exports, data) {
|
||||
const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue