@sapphire/utilities
Version:
Common JavaScript utilities for the Sapphire Community
13 lines (11 loc) • 416 B
text/typescript
/**
* 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 };