@flyyer/goerr
v3.0.0
Published
handle throwing errors in golang way.
Downloads
13
Readme
@flyyer/goerr
Internal utility function.
yarn add @flyyer/goerr
import { goerr } from "@flyyer/goerr";
const [res, error] = await goerr(fetch("..."));
if (error) {
//...
} else if (res) {
//...
} else {
// Never will return both values.
}