Skip to content
Prev Previous commit
Next Next commit
Update lib/internal/process/pre_execution.js
Co-authored-by: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
MoLow and ronag authored Jun 22, 2023
commit 8dc2ee76069b755abdb1e6ecfed138ae1b012c0d
1 change: 0 additions & 1 deletion lib/internal/process/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ function setupSymbolDisposePolyfill() {
Symbol.asyncDispose ??= SymbolAsyncDispose;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be a good thing to polyfill them? Wouldn't users assume certain behaviors from the runtime because they exists?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a way for typescript or bable to recognize these symbols without them being global.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcollina this is confirmed (with the TS team) to play nice. Users would be able to use them with the polyfill but not the syntactic sugar until v8 ships

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That breaks core-js.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}


function setupUserModules(isLoaderWorker = false) {
initializeCJSLoader();
initializeESMLoader(isLoaderWorker);
Expand Down