Function optional

  • Takes a parser and runs it. If the parser fails, optional returns a success with a null result.

    Type Parameters

    • T

    Parameters

    Returns Parser<T | null>

    • a parser that runs the given parser. If it fails, returns a success with a null result.

Generated using TypeDoc