formatter overview

Added in v0.6.0


Table of contents


formatters

Formatter (class)

Signature

export declare class Formatter<A> {
  constructor(readonly run: (r: Route, a: A) => Route)
}

Added in v0.4.0

contramap (method)

Signature

contramap<B>(f: (b: B) => A): Formatter<B>

Added in v0.4.0

then (method)

Signature

then<B>(that: Formatter<B> & Formatter<RowLacks<B, keyof A>>): Formatter<A & B>

Added in v0.4.0

_A (property)

Signature

readonly _A: A

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

then

Signature

export declare const then: <B>(
  fb: Formatter<B>
) => <A>(fa: Formatter<A> & Formatter<RowLacks<A, keyof B>>) => Formatter<A & B>

Added in v0.6.0