Creates an Some containing the given value.
The type of the value.
The value to wrap in an Some.
An Some containing the value.
const someValue = Optional.some({ id: 1 });const noneValue = Optional.none;assert.isTrue(Optional.isSome(someValue));assert.isTrue(Optional.isNone(noneValue)); Copy
const someValue = Optional.some({ id: 1 });const noneValue = Optional.none;assert.isTrue(Optional.isSome(someValue));assert.isTrue(Optional.isNone(noneValue));
Creates an Some containing the given value.