Function: confirm()
ts
function confirm<T>(value: unknown): T;Confirms that a value is serializable, returning the typecasted value if it is.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The expected type of the value |
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to confirm |
Returns
T
The value if it is serializable, typecasted to T
Throws
E_PAYLOAD_UNSERIALIZABLE if the value is not serializable