function isSome
Since 0.1.0
isSome<T>(option: Option<T>): option is Some<T>

Type guard: narrows an Option to Some.

Type Parameters

The contained value type

Parameters

option: Option<T>

The option to inspect

Return Type

option is Some<T>

true if a value is present

Usage

import { isSome } from "common/src/index.ts";