• Checks whether opt is Some.

    Type Parameters

    • T

    Parameters

    • opt: Option<T>

      The optional value.

    Returns opt is Some<T>

    The proof that opt is a Some.

    Examples

    import { some, none, isSome } from "./option.ts";
    import { assertEquals } from "../deps.ts";

    assertEquals(isSome(some(2)), true);
    assertEquals(isSome(none()), false);

Generated using TypeDoc