Skip to content

268 - If #8

Description

@DEV4N4
type If<C, T, F> = C extends true ? T : C extends boolean ? F : error; // my answer
type If<C extends boolean, T, F> = C extends true ? T : F; // best answer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    answerShare answers/solutions to a question

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions