module /** */ import { FailureInfo , ParjsResult } from "./result" ; import { UserState } from "./state" ; import { ImplicitParjser } from "./scalar-converter" ; /**
 * A combinator or operator that takes a source parser that returns a new parser
 * based on it.
 */ export interface ParjsCombinator < TFrom , TTo > { ( from ) : Parjser < TTo > ; } /**
 * A projection on the parser result and the parser state.
 */ export interface ParjsProjection < T , TOut > { ( value , userState ) : TOut ; } /**
 * A predicate on the parser result and the user state. This function must
 * return `true` if the input fulfills the predicate, or failure information
 * object if it does not. Returning things other than `true` will make it behave
 * like a failure.
 */ export type ParjsValidator < T > = ParjsProjection < T , Partial < FailureInfo > | true > ; group export interface Parjser < T > { group readonly type : string ; param input param initialState group parse ( input , initialState ? ) : ParjsResult < T > ; param cmb1 pipe < T1 > ( cmb1 ) : Parjser < T1 > ; param cmb1 param cmb2 pipe < T1 , T2 > ( cmb1 , cmb2 ) : Parjser < T2 > ; param cmb1 param cmb2 param cmb3 pipe < T1 , T2 , T3 > ( cmb1 , cmb2 , cmb3 ) : Parjser < T3 > ; param cmb1 param cmb2 param cmb3 param cmb4 pipe < T1 , T2 , T3 , T4 > ( cmb1 , cmb2 , cmb3 , cmb4 ) : Parjser < T4 > ; param cmb1 param cmb2 param cmb3 param cmb4 param cmb5 pipe < T1 , T2 , T3 , T4 , T5 > ( cmb1 , cmb2 , cmb3 , cmb4 , cmb5 ) : Parjser < T5 > ; param cmb1 param cmb2 param cmb3 param cmb4 param cmb5 param cmb6 pipe < T1 , T2 , T3 , T4 , T5 , T6 > ( cmb1 , cmb2 , cmb3 , cmb4 , cmb5 , cmb6 ) : Parjser < T6 > ; }