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