index overview

Added in v0.4.0


Table of contents


formatters

Formatter

Signature

export declare const Formatter: typeof Formatter

Added in v0.4.0

contramap

Signature

export declare const contramap: <A, B>(f: (b: B) => A) => (fa: Formatter<A>) => Formatter<B>

Added in v0.5.1

format

Signature

export declare const format: <A>(formatter: Formatter<A>, a: A, encode?: boolean) => string

Added in v0.4.0

formatter

Signature

export declare const formatter: Contravariant1<'fp-ts-routing/Formatter'>

Added in v0.5.1

helpers

RowLacks

Signature

export declare const RowLacks: any

Added in v0.4.0

matchers

IntegerFromString

Signature

export declare const IntegerFromString: Type<number, string, unknown>

Added in v0.4.2

Match

Signature

export declare const Match: typeof Match

Added in v0.4.0

end

Signature

export declare const end: Match<{}>

Added in v0.4.0

imap

Signature

export declare const imap: <A, B>(f: (a: A) => B, g: (b: B) => A) => (ma: Match<A>) => Match<B>

Added in v0.5.1

int

Signature

export declare const int: <K extends string>(k: K) => Match<{ [_ in K]: number }>

Added in v0.4.0

lit

Signature

export declare const lit: (literal: string) => Match<{}>

Added in v0.4.0

query

Signature

export declare const query: <A>(type: Type<A, Record<string, QueryValues>, unknown>) => Match<A>

Added in v0.4.0

str

Signature

export declare const str: <K extends string>(k: K) => Match<{ [_ in K]: string }>

Added in v0.4.0

succeed

Signature

export declare const succeed: <A>(a: A) => Match<A>

Added in v0.4.0

then

Signature

export declare const then: <B>(mb: Match<B>) => <A>(ma: Match<A> & Match<RowLacks<A, keyof B>>) => Match<A & B>

Added in v0.5.1

type

Signature

export declare const type: <K extends string, A>(k: K, type: Type<A, string, unknown>) => Match<{ [_ in K]: A }>

Added in v0.4.0

parsers

Parser

Signature

export declare const Parser: typeof Parser

Added in v0.4.0

alt

Signature

export declare const alt: <A>(that: Lazy<Parser<A>>) => (fa: Parser<A>) => Parser<A>

Added in v0.5.1

ap

Signature

export declare const ap: <A>(fa: Parser<A>) => <B>(fab: Parser<(a: A) => B>) => Parser<B>

Added in v0.5.1

apFirst

Signature

export declare const apFirst: <B>(fb: Parser<B>) => <A>(fa: Parser<A>) => Parser<A>

Added in v0.5.1

apSecond

Signature

export declare const apSecond: <B>(fb: Parser<B>) => <A>(fa: Parser<A>) => Parser<B>

Added in v0.5.1

chain

Signature

export declare const chain: <A, B>(f: (a: A) => Parser<B>) => (ma: Parser<A>) => Parser<B>

Added in v0.5.1

chainFirst

Signature

export declare const chainFirst: <A, B>(f: (a: A) => Parser<B>) => (ma: Parser<A>) => Parser<A>

Added in v0.5.1

flatten

Signature

export declare const flatten: <A>(mma: Parser<Parser<A>>) => Parser<A>

Added in v0.5.1

getParserMonoid

Signature

export declare const getParserMonoid: <A>() => Monoid<Parser<A>>

Added in v0.5.1

map

Signature

export declare const map: <A, B>(f: (a: A) => B) => (fa: Parser<A>) => Parser<B>

Added in v0.5.1

parse

Signature

export declare const parse: <A>(parser: Parser<A>, r: Route, a: A) => A

Added in v0.4.0

parser

Signature

export declare const parser: Monad1<'fp-ts-routing/Parser'> & Alternative1<'fp-ts-routing/Parser'>

Added in v0.5.1

zero

Signature

export declare const zero: <A>() => Parser<A>

Added in v0.4.0