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

type alias DistributedOmit | Bun module | Bun

type alias DistributedOmit | Bun module | BunBuildDocsReferenceGuidesBlogDiscord/Bun/__internal/DistributedOmitTDistributedOmit

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Bun/__internal/DistributedOmitTDistributedOmit

type

__internal.DistributedOmittype DistributedOmitT, K extends PropertyKey> = T extends T ? OmitT, K> : never

Like Omit, but correctly distributes over unions. Most useful for removing properties from union options objects, like Bun.SQL.Options

type X = Bun.DistributedOmit?: 'a', url?: string} | {type?: 'b', flag?: boolean}, "url">
// `{type?: 'a'} | {type?: 'b', flag?: boolean}` (Omit applied to each union item instead of entire type)

type X = Omit?: 'a', url?: string} | {type?: 'b', flag?: boolean}, "url">;
// `{type?: "a" | "b" | undefined}` (Missing `flag` property and no longer a union)

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 →

type alias DistributedOmit | Bun module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Like Omit, but correctly distributes over unions. Most useful for removing properties from union options objects, like Bun.SQL.Options