Returns a boolean for whether the given array includes the given item.
This can be useful if another type wants to make a decision based on whether the array includes that item.
import type {Includes} from 'type-fest';type hasRed<array extends any[]> = Includes<array, 'red'>; Copy
import type {Includes} from 'type-fest';type hasRed<array extends any[]> = Includes<array, 'red'>;
Returns a boolean for whether the given array includes the given item.
This can be useful if another type wants to make a decision based on whether the array includes that item.