0.1.3 • Published 10 months ago

@shrimpcoder/ts-result v0.1.3

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

TS Result

This library is a TypeScript library inspired by Rust's Result type, designed to represent the success or failure of an operation. It provides two classes, Ok and Err, to handle the results of operations concisely.

Installation

npm install @shrimpcoder/ts-result

Usage

import { Result } from '@shrimpcoder/ts-result';

const result = Result.run(() => {
  return 100;
});

console.log(result.unwrap());

For more details, see here.

License

This project is licensed under the MIT License.

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago