0.1.3 • Published 1 year ago
@shrimpcoder/ts-result v0.1.3
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-resultUsage
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.