Checks if type T does not have the specified type U.
T
U
The type to check if it does not have the specified type U.
The type to check if it is not in the type T.
import { assertType, NotHas } from "@std/testing/types";assertType<NotHas<string | number, Date>>(true);assertType<NotHas<string, number>>(true);assertType<NotHas<number, any>>(true);assertType<NotHas<string | number, string>>(false);assertType<NotHas<any, number>>(false); Copy
import { assertType, NotHas } from "@std/testing/types";assertType<NotHas<string | number, Date>>(true);assertType<NotHas<string, number>>(true);assertType<NotHas<number, any>>(true);assertType<NotHas<string | number, string>>(false);assertType<NotHas<any, number>>(false);
Checks if type
Tdoes not have the specified typeU.