0.0.3 • Published 5 months ago

ts-go-exceptions v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

TS Error handling, the go way

This is mostly a small convenience for myself. I wanted to see what it's like to publish an npm package, if you want to use it, write it yourself, it's probably gonna be better.

Code Example:

import { handleException } from 'ts-go-exceptions';

const theBigAsync = async () => {...};

const [result, error] = await handleException<ResultType, ErrorType>(theBigAsync());

if (error !== null) {
  // handle error
};

// You're free to use result!
0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago