IsNarrowable<T, U>: IsNever<(T extends U
        ? true
        : false) & (U extends T
        ? false
        : true)> extends true
    ? false
    : true

Type Parameters

  • T

    Type to check

  • U

    Type to against

Description

Checks if T can be narrowed further than U

Example

type Result = IsNarrowable<'foo', string>
// ^? true

Generated using TypeDoc