Checks if the given value is an Optional.
The value to check.
true if the value is an Optional, otherwise false.
true
false
const maybeOptional = Optional.some('value');const notOptional = { $$tag: 'ts-data-forge::Optional.some' };assert.ok(Optional.isOptional(maybeOptional));assert.notOk(Optional.isOptional(notOptional)); Copy
const maybeOptional = Optional.some('value');const notOptional = { $$tag: 'ts-data-forge::Optional.some' };assert.ok(Optional.isOptional(maybeOptional));assert.notOk(Optional.isOptional(notOptional));
Checks if the given value is an Optional.