throw.flow
v0.2.0
Published
throw expression as a function
Downloads
15
Maintainers
Readme
throw.flow
throw expression as a function
Import
import crash from "throw.flow"
API
throw
Just throws given error
. Function is also generic and has a output
type
parameter so that it's return type can be treated as anything you want.
import crash from "throw.flow"
crash(new Error("Boom")) // => Error: Boom
Parameters
error
reason
Returns output
Install
yarn add throw.flow --save
or with npm
npm install throw.flow --save