Node v8.HookCallbacks TypeScript interface | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:v8/
HookCallbacksPafterPbeforePinitPsettledSearch the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:v8/
HookCallbacksPafterPbeforePinitPsettledinterface
v8.HookCallbacksinterface
HookCallbacksKey events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or around an await, and when the promise resolves or rejects.
Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the init(), before(), after(), and settled() callbacks must not be async functions as they create more promises which would produce an infinite loop.
after?:
Afterbefore?:
Beforeinit?:
Initsettled?:
SettledResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →