@alanscodelog/utils
Github
Issues
npm
Preparing search index...
utils
throwIfError
Function throwIfError
throwIfError
<
T
extends
unknown
>
(
maybeError
:
T
)
:
Exclude
<
T
,
Error
>
Poor man's unwrap for functions that return errors.
Type Parameters
T
extends
unknown
Parameters
maybeError
:
T
Returns
Exclude
<
T
,
Error
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Github
Issues
npm
@alanscodelog/utils
Loading...
Poor man's unwrap for functions that return errors.