Function: cast()
cast<
T>(value:unknown):T
Defined in: cast.ts:10
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.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to cast to another type |
Returns
T
The value but as type T