definement overview
Added in v1.0.0
Table of contents
Combinators
getAsStrict
Signature
export declare function getAsStrict<A>(value: A): Definement<unknown, A>
Added in v1.0.0
local
Signature
export declare function local<R, Q>(f: (q: Q) => R): <A>(fa: Definement<R, A>) => Definement<Q, A>
Added in v1.0.0
not
Signature
export declare function not<E, A>(definement: Definement<E, A>): Definement<E, Exclude<E, A>>
Added in v1.0.0
Constructor
init
Signature
export declare const init: Definement<unknown, unknown>
Added in v1.0.0
literal
Signature
export declare const literal: <A extends string | number>(literal: A) => <G extends A>(a: G) => a is Extract<G, unknown>
Added in v1.0.0
Constructors
fromRefinement
Signature
export declare function fromRefinement<E, A extends E>(predicate: RF.Refinement<E, A>): Definement<E, A>
Added in v1.0.0
Destructors
toPredicate
Signature
export declare function toPredicate<E, A>(fa: Definement<E, A>): PR.Predicate<E>
Added in v1.0.0
toRefinement
Signature
export declare function toRefinement<E, A>(fa: Definement<E, A>): A extends E ? RF.Refinement<E, A> : never
Added in v1.0.0
Instances
getLattice
Signature
export declare function getLattice<E, A extends E>(): Lattice<Definement<E, A>>
Added in v1.0.0
Lattice
join
Signature
export declare function join<E, A extends E>(
ab: Definement<E, A>
): <B extends E>(bc: Definement<E, B>) => Definement<E, A | B>
Added in v1.0.0
meet
Signature
export declare function meet<A, B, C>(bc: Definement<A & B, C>): (ab: Definement<A, B>) => Definement<A, B & C>
Added in v1.0.0
Primitives
asBoolean
Signature
export declare const asBoolean: Definement<unknown, boolean>
Added in v1.0.0
asFalse
Signature
export declare const asFalse: Definement<unknown, false>
Added in v1.0.0
asNull
Signature
export declare const asNull: Definement<unknown, null>
Added in v1.0.0
asNumber
Signature
export declare const asNumber: Definement<unknown, number>
Added in v1.0.0
asString
Signature
export declare const asString: Definement<unknown, string>
Added in v1.0.0
asTrue
Signature
export declare const asTrue: Definement<unknown, true>
Added in v1.0.0
asUndefined
Signature
export declare const asUndefined: Definement<unknown, undefined>
Added in v1.0.0
isArray
Signature
export declare const isArray: Definement<unknown, any[]>
Added in v1.0.0
isNullable
Signature
export declare const isNullable: Definement<unknown, null>
Added in v1.0.0
isObject
Signature
export declare const isObject: Definement<unknown, object>
Added in v1.0.0
Semigroupoid
compose
Signature
export declare const compose: <B, C>(bc: Definement<B, C>) => <A>(ab: Definement<A, B>) => Definement<A, C>
Added in v1.0.0
utils
Definement (interface)
Signature
export interface Definement<E, A> {
<G extends E>(a: G): a is Extract<G, A>
}
Added in v1.0.0