Comparing version 0.2.3 to 0.2.4
@@ -15,2 +15,7 @@ # Changelog | ||
# 0.2.4 | ||
- **Polish** | ||
- deprecate `validation.getApplicativeS` / `validation.getStaticApplicative` (@gcanti) | ||
# 0.2.3 | ||
@@ -17,0 +22,0 @@ |
@@ -84,5 +84,7 @@ import { HKT, HKTS, HKT2, HKT2S } from './HKT'; | ||
export declare function map<L, A, B>(f: (a: A) => B, fa: Validation<L, A>): Validation<L, B>; | ||
export declare function of<L, A>(a: A): Success<L, A>; | ||
export declare function of<L, A>(a: A): Validation<L, A>; | ||
export declare function ap<L, A, B>(fab: Validation<L, (a: A) => B>, fa: Validation<L, A>): Validation<L, B>; | ||
/** deprecated */ | ||
export declare function getStaticApplicative<L>(semigroup: StaticSemigroup<L>): StaticApplicative<URI>; | ||
/** deprecated, use getStaticApplicative instead */ | ||
/** deprecated */ | ||
export declare const getApplicativeS: typeof getStaticApplicative; | ||
@@ -97,3 +99,3 @@ export declare function bimap<L, L2, A, B>(semigroup: StaticSemigroup<L2>, f: (l: L) => L2, g: (a: A) => B, fa: Validation<L, A>): Validation<L2, B>; | ||
export declare function failure<L, A>(semigroup: StaticSemigroup<L>, l: L): Validation<L, A>; | ||
export declare function success<L, A>(a: A): Validation<L, A>; | ||
export declare const success: typeof of; | ||
export declare function fromPredicate<L, A>(semigroup: StaticSemigroup<L>, predicate: Predicate<A>, l: (a: A) => L): (a: A) => Validation<L, A>; | ||
@@ -100,0 +102,0 @@ export declare function concat<L, A>(fx: Validation<L, A>, fy: Validation<L, A>): Validation<L, A>; |
@@ -149,9 +149,10 @@ import { constFalse, constTrue } from './function'; | ||
} | ||
export function ap(fab, fa) { | ||
return fa.ap(fab); | ||
} | ||
/** deprecated */ | ||
export function getStaticApplicative(semigroup) { | ||
function ap(fab, fa) { | ||
return fa.ap(fab); | ||
} | ||
return { URI: URI, map: map, of: of, ap: ap }; | ||
} | ||
/** deprecated, use getStaticApplicative instead */ | ||
/** deprecated */ | ||
export var getApplicativeS = getStaticApplicative; | ||
@@ -179,5 +180,3 @@ export function bimap(semigroup, f, g, fa) { | ||
} | ||
export function success(a) { | ||
return new Success(a); | ||
} | ||
export var success = of; | ||
export function fromPredicate(semigroup, predicate, l) { | ||
@@ -184,0 +183,0 @@ return function (a) { return predicate(a) ? success(a) : failure(semigroup, l(a)); }; |
@@ -84,5 +84,7 @@ import { HKT, HKTS, HKT2, HKT2S } from './HKT'; | ||
export declare function map<L, A, B>(f: (a: A) => B, fa: Validation<L, A>): Validation<L, B>; | ||
export declare function of<L, A>(a: A): Success<L, A>; | ||
export declare function of<L, A>(a: A): Validation<L, A>; | ||
export declare function ap<L, A, B>(fab: Validation<L, (a: A) => B>, fa: Validation<L, A>): Validation<L, B>; | ||
/** deprecated */ | ||
export declare function getStaticApplicative<L>(semigroup: StaticSemigroup<L>): StaticApplicative<URI>; | ||
/** deprecated, use getStaticApplicative instead */ | ||
/** deprecated */ | ||
export declare const getApplicativeS: typeof getStaticApplicative; | ||
@@ -97,3 +99,3 @@ export declare function bimap<L, L2, A, B>(semigroup: StaticSemigroup<L2>, f: (l: L) => L2, g: (a: A) => B, fa: Validation<L, A>): Validation<L2, B>; | ||
export declare function failure<L, A>(semigroup: StaticSemigroup<L>, l: L): Validation<L, A>; | ||
export declare function success<L, A>(a: A): Validation<L, A>; | ||
export declare const success: typeof of; | ||
export declare function fromPredicate<L, A>(semigroup: StaticSemigroup<L>, predicate: Predicate<A>, l: (a: A) => L): (a: A) => Validation<L, A>; | ||
@@ -100,0 +102,0 @@ export declare function concat<L, A>(fx: Validation<L, A>, fy: Validation<L, A>): Validation<L, A>; |
@@ -52,3 +52,3 @@ "use strict"; | ||
Failure.prototype.swap = function (semigroup) { | ||
return success(this.value); | ||
return exports.success(this.value); | ||
}; | ||
@@ -156,10 +156,12 @@ Failure.prototype.toOption = function () { | ||
exports.of = of; | ||
function ap(fab, fa) { | ||
return fa.ap(fab); | ||
} | ||
exports.ap = ap; | ||
/** deprecated */ | ||
function getStaticApplicative(semigroup) { | ||
function ap(fab, fa) { | ||
return fa.ap(fab); | ||
} | ||
return { URI: exports.URI, map: map, of: of, ap: ap }; | ||
} | ||
exports.getStaticApplicative = getStaticApplicative; | ||
/** deprecated, use getStaticApplicative instead */ | ||
/** deprecated */ | ||
exports.getApplicativeS = getStaticApplicative; | ||
@@ -194,8 +196,5 @@ function bimap(semigroup, f, g, fa) { | ||
exports.failure = failure; | ||
function success(a) { | ||
return new Success(a); | ||
} | ||
exports.success = success; | ||
exports.success = of; | ||
function fromPredicate(semigroup, predicate, l) { | ||
return function (a) { return predicate(a) ? success(a) : failure(semigroup, l(a)); }; | ||
return function (a) { return predicate(a) ? exports.success(a) : failure(semigroup, l(a)); }; | ||
} | ||
@@ -202,0 +201,0 @@ exports.fromPredicate = fromPredicate; |
{ | ||
"name": "fp-ts", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Functional programming in TypeScript", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
394177
6425