Type alias IfExtends<T, E, A, B>

IfExtends<T, E, A, B>: T extends E
    ? A
    : B

Utility type for conditional types

Type Parameters

  • T

    Target type

  • E

    Predicate type

  • A

    Conditional type if T extends E

  • B

Template

Conditional type if T does not extend E

Generated using TypeDoc