Skip to content

qoobes/ts-go-exceptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published