• Converts into a string for debug. It is not safe for serialization.

    Type Parameters

    • T

    Parameters

    • opt: Option<T>

      The optional value.

    Returns string

    The string form.

    Examples

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

    assertEquals(toString(some(2)), "some(2)");
    assertEquals(toString(none()), "none");

Generated using TypeDoc