Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 269 Bytes

File metadata and controls

13 lines (8 loc) · 269 Bytes

Result

Success/Failure

const successfulResult = Result.success('apple');

console.log(successfulResult.getValueOrThrow()); // 'apple'

const failedResult = Result.failure('no fruit');

console.log(failedResult.getErrorOrThrow()); // 'no fruit'