Skip to content

options to conditional-keys #1385

@salisbury-espinosa

Description

@salisbury-espinosa

Type description + examples

the type already exists
https://github.com/sindresorhus/type-fest/blob/main/source/conditional-keys.d.ts

possibly we need

  1. append deep?: boolean to fetch deep keys
    to work similarly to this:
ConditionalKeys<Example, Condition, {deep: true}> = Paths<
  ConditionalPickDeep<Base, Condition>
>
  1. append revert?: boolean (here need to come up with a better naming) to 'revert' extends condition:
    ExtendsStrict<Base[Key], Condition> extends true ? Key : never => ExtendsStrict<Condition, Base[Key]> extends true ? Key : never

Type source

No response

Search existing types and issues first

  • I tried my best to look for it

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions