Type Alias: IsNarrowable<T, U>
type IsNarrowable<T, U>: IsNever<T extends U ? true : false & U extends T ? false : true> extends true ? false : true;
Type Parameters
Type Parameter | Description |
---|---|
| Type to check |
| Type to against |
Description
Checks if T can be narrowed further than U
Example
type Result = IsNarrowable<'foo', string>
// ^? true
Defined
@nilfoundation/niljs/src/types/utils.ts:46