Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove promiseHooks stub; #14485

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

axe-me
Copy link

@axe-me axe-me commented Oct 11, 2024

project using this optionally could at least run, trying to resolve this issue: #6136

What does this PR do?

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

project using this optionally could at lease run
@Jarred-Sumner
Copy link
Collaborator

Thank you for this, but this would break libraries which test for the existence of promise hooks in other ways

Instead, we can create a function that masquerades as undefined and then assign the promise hook functions onto that function as well. Then, code which does if (promiseHooks) would return false, but if they were to do promiseHooks.createHook, it will warn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants