Checks if the given value is a Result.
Result
The value to check.
true if the value is a Result, otherwise false.
true
false
const okValue = Result.ok('success');const errValue = Result.err(new Error('failure'));const notResult = { $$tag: 'ts-data-forge::Result.ok' };assert.ok(Result.isResult(okValue));assert.ok(Result.isResult(errValue));assert.notOk(Result.isResult(notResult)); Copy
const okValue = Result.ok('success');const errValue = Result.err(new Error('failure'));const notResult = { $$tag: 'ts-data-forge::Result.ok' };assert.ok(Result.isResult(okValue));assert.ok(Result.isResult(errValue));assert.notOk(Result.isResult(notResult));
Checks if the given value is a
Result
.