UNPKG

@sapphire/utilities

Version:
13 lines (11 loc) 416 B
/** * Casts any value to `T` * * Note that this function is not type-safe, and may cause runtime errors if used incorrectly. * Also note that this function is effectively useless in a JavaScript project, it only serves a purpose for TypeScript projects. * * @param value The value to cast to another type * @returns The value but as type `T` */ declare function cast<T>(value: unknown): T; export { cast };