Creates a Some variant of an Option containing the given value.
Wraps the provided value in a Some, indicating the presence of a value.
The type of the value.
The value to wrap in Some.
An Option containing the value as Some.
const x = some(42);expect(x.isSome()).toBe(true);expect(x.expect("Not 42")).toBe(42); Copy
const x = some(42);expect(x.isSome()).toBe(true);expect(x.expect("Not 42")).toBe(42);
Creates a Some variant of an Option containing the given value.
Wraps the provided value in a Some, indicating the presence of a value.