parjs
Version:
A parser-combinator library for JavaScript.
17 lines (16 loc) • 567 B
TypeScript
/**
* @module parjs/combinators
*/
/** */
import { ParjsCombinator } from "../../index";
import { ParjsProjection } from "../parjser";
/**
* Applies the source parser and projects its result with `projection`.
* @param projection The projection to apply.
*/
export declare function map<TIn, TOut>(projection: ParjsProjection<TIn, TOut>): ParjsCombinator<TIn, TOut>;
/**
* Applies the source parser and yields the constant value `result`.
* @param result The constant value to yield.
*/
export declare function mapConst<T>(result: T): ParjsCombinator<any, T>;