Interface Formatted<A>

Interface for mapping a given type to a formatted string and back.

interface Formatted<A> {
    fromFormatted(formatted): A;
    toFormatted(value): string;
}

Type Parameters

  • A

Methods

  • Retrieve a value from a given string.

    Parameters

    • formatted: string

      the format string from which to obtain a value

    Returns A

    the obtained value

  • Format the given value

    Parameters

    • value: A

      the value to be formatted

    Returns string

    the formatted string