温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/v8/HookCallbacks
点击访问原文链接

Node v8.HookCallbacks TypeScript interface | API Reference | Bun

Node v8.HookCallbacks TypeScript interface | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:v8/HookCallbacksPafterPbeforePinitPsettled

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:v8/HookCallbacksPafterPbeforePinitPsettled

interface

v8.HookCallbacksinterface HookCallbacks

Key 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?: Settled

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Node v8.HookCallbacks TypeScript interface | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Key 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.