Type guard to check if an Option is a Some value. This function is used to narrow down the type of an Option to SomeOption in TypeScript's type system.
The Option to be checked.
true if the provided Option is a SomeOption, false otherwise.
const option = Some('Success');if (isSome(option)) { console.log('Option has a value:', option.unwrap());} Copy
const option = Some('Success');if (isSome(option)) { console.log('Option has a value:', option.unwrap());}
Use Option.isSome instead.
Option.isSome
Type guard to check if an Option is a Some value. This function is used to narrow down the type of an Option to SomeOption in TypeScript's type system.