UNPKG

parjs

Version:

A parser-combinator library for JavaScript.

11 lines (10 loc) 275 B
/** * @module parjs/combinators */ /** */ import { ParjsCombinator } from "../../index"; /** * Applies the source parser. If it fails softly, succeeds and yields `val`. * @param val */ export declare function maybe<T, S = undefined>(val?: S): ParjsCombinator<T, T | S>;