functools-ts
Advanced tools
Comparing version 1.0.0 to 1.0.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.asyncPipe = exports.asyncGroup = void 0; | ||
var defer = function (f) { return setTimeout(f, 0); }; | ||
@@ -4,0 +5,0 @@ var asyncGroup_ = function () { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compose = void 0; | ||
exports.compose = function () { | ||
@@ -4,0 +5,0 @@ var fns = []; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.curry2 = exports.curry1 = void 0; | ||
exports.curry1 = function (f) { return function (a) { return function (b) { | ||
@@ -4,0 +5,0 @@ return f(a, b); |
import { Option } from "./option"; | ||
import { F1, Lazy, F2, F3, F4, F5, F6 } from "./function"; | ||
import { List } from "./list"; | ||
export declare type Right<A> = { | ||
@@ -22,20 +23,20 @@ isRight: true; | ||
isRight: <E, A>(either: Either<E, A>) => either is Right<A>; | ||
isLeft: <E, A>(either: Either<E, A>) => either is Left<E>; | ||
bimap: <E, A, A2, E2>(either: Either<E, A>, l: F1<E, E2>, r: F1<A, A2>) => Either<E2, A2>; | ||
map: <E, A, B>(either: Either<E, A>, f: F1<A, B>) => Either<E, B>; | ||
toString: <E, A>(either: Either<E, A>) => string; | ||
flatMap: <E, A, B>(either: Either<E, A>, f: F1<A, Either<E, B>>) => Either<E, B>; | ||
recover: <E, A, B extends A>(either: Either<E, A>, f: F1<E, Either<E, B>>) => Either<E, A>; | ||
getOrElse: <E, A>(either: Either<E, A>, defaultVal: Lazy<A>) => A; | ||
forEach: <E, A>(either: Either<E, A>, f: F1<A, void>) => void; | ||
sequence: <E, A>(list: ReadonlyArray<Either<E, A>>) => Either<E, ReadonlyArray<A>>; | ||
left: <E, A>(either: Either<E, A>) => Option<E>; | ||
right: <E, A>(either: Either<E, A>) => Option<A>; | ||
match: <E, A, B>(either: Either<E, A>, cases: EitherCases<E, A, B>) => B; | ||
flatMap2: <E, A, B, C>(ea: Either<E, A>, eb: Either<E, B>, f: F2<A, B, Either<E, C>>) => Either<E, C>; | ||
flatMap3: <E, A, B, C, D>(ea: Either<E, A>, eb: Either<E, B>, ec: Either<E, C>, f: F3<A, B, C, Either<E, D>>) => Either<E, D>; | ||
flatMap4: <E, A, B, C, D, F>(ea: Either<E, A>, eb: Either<E, B>, ec: Either<E, C>, ed: Either<E, D>, f: F4<A, B, C, D, Either<E, F>>) => Either<E, F>; | ||
flatMap5: <E, A, B, C, D, F, G>(ea: Either<E, A>, eb: Either<E, B>, ec: Either<E, C>, ed: Either<E, D>, eh: Either<E, F>, f: F5<A, B, C, D, F, Either<E, G>>) => Either<E, G>; | ||
flatMap6: <E, A, B, C, D, F, G, J>(ea: Either<E, A>, eb: Either<E, B>, ec: Either<E, C>, ed: Either<E, D>, eh: Either<E, F>, eg: Either<E, G>, f: F6<A, B, C, D, F, G, Either<E, J>>) => Either<E, J>; | ||
isLeft: <E_1, A_1>(either: Either<E_1, A_1>) => either is Left<E_1>; | ||
bimap: <E_2, A_2, A2, E2>(either: Either<E_2, A_2>, l: F1<E_2, E2>, r: F1<A_2, A2>) => Either<E2, A2>; | ||
map: <E_3, A_3, B>(either: Either<E_3, A_3>, f: F1<A_3, B>) => Either<E_3, B>; | ||
toString: <E_4, A_4>(either: Either<E_4, A_4>) => string; | ||
flatMap: <E_5, A_5, B_1>(either: Either<E_5, A_5>, f: F1<A_5, Either<E_5, B_1>>) => Either<E_5, B_1>; | ||
recover: <E_6, A_6, B_2 extends A_6>(either: Either<E_6, A_6>, f: F1<E_6, Either<E_6, B_2>>) => Either<E_6, A_6>; | ||
getOrElse: <E_7, A_7>(either: Either<E_7, A_7>, defaultVal: Lazy<A_7>) => A_7; | ||
forEach: <E_8, A_8>(either: Either<E_8, A_8>, f: F1<A_8, void>) => void; | ||
sequence: <E_9, A_9>(list: List<Either<E_9, A_9>>) => Either<E_9, List<A_9>>; | ||
left: <E_10, A_10>(either: Either<E_10, A_10>) => Option<E_10>; | ||
right: <E_11, A_11>(either: Either<E_11, A_11>) => Option<A_11>; | ||
match: <E_12, A_12, B_3>(either: Either<E_12, A_12>, cases: EitherCases<E_12, A_12, B_3>) => B_3; | ||
flatMap2: <E_13, A_13, B_4, C>(ea: Either<E_13, A_13>, eb: Either<E_13, B_4>, f: F2<A_13, B_4, Either<E_13, C>>) => Either<E_13, C>; | ||
flatMap3: <E_14, A_14, B_5, C_1, D>(ea: Either<E_14, A_14>, eb: Either<E_14, B_5>, ec: Either<E_14, C_1>, f: F3<A_14, B_5, C_1, Either<E_14, D>>) => Either<E_14, D>; | ||
flatMap4: <E_15, A_15, B_6, C_2, D_1, F>(ea: Either<E_15, A_15>, eb: Either<E_15, B_6>, ec: Either<E_15, C_2>, ed: Either<E_15, D_1>, f: F4<A_15, B_6, C_2, D_1, Either<E_15, F>>) => Either<E_15, F>; | ||
flatMap5: <E_16, A_16, B_7, C_3, D_2, F_1, G>(ea: Either<E_16, A_16>, eb: Either<E_16, B_7>, ec: Either<E_16, C_3>, ed: Either<E_16, D_2>, eh: Either<E_16, F_1>, f: F5<A_16, B_7, C_3, D_2, F_1, Either<E_16, G>>) => Either<E_16, G>; | ||
flatMap6: <E_17, A_17, B_8, C_4, D_3, F_2, G_1, J>(ea: Either<E_17, A_17>, eb: Either<E_17, B_8>, ec: Either<E_17, C_4>, ed: Either<E_17, D_3>, eh: Either<E_17, F_2>, eg: Either<E_17, G_1>, f: F6<A_17, B_8, C_4, D_3, F_2, G_1, Either<E_17, J>>) => Either<E_17, J>; | ||
}; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Either = exports.Left = exports.Right = void 0; | ||
exports.Right = function (value) { return ({ | ||
@@ -4,0 +5,0 @@ isLeft: false, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Filter = void 0; | ||
exports.Filter = { | ||
@@ -4,0 +5,0 @@ combine: function () { |
@@ -17,3 +17,3 @@ import { List } from "./list"; | ||
} | ||
export declare const Invalid: <E, A>(value: A, errors: ReadonlyArray<E>) => Invalid<E, A>; | ||
export declare const Invalid: <E, A>(value: A, errors: List<E>) => Invalid<E, A>; | ||
export interface Initial<A> { | ||
@@ -32,7 +32,7 @@ type: FormFieldType.Untouched; | ||
invalid: <E, A>(ff: FormField<E, A>) => ff is Invalid<E, A>; | ||
valid: <E, A>(ff: FormField<E, A>) => ff is Valid<A>; | ||
untouched: <E, A>(ff: FormField<E, A>) => ff is Initial<A>; | ||
match: <E, A, B>(ff: FormField<E, A>, cases: FormFieldCases<E, A, B>) => B; | ||
valid: <E_1, A_1>(ff: FormField<E_1, A_1>) => ff is Valid<A_1>; | ||
untouched: <E_2, A_2>(ff: FormField<E_2, A_2>) => ff is Initial<A_2>; | ||
match: <E_3, A_3, B>(ff: FormField<E_3, A_3>, cases: FormFieldCases<E_3, A_3, B>) => B; | ||
isValidForm: (...fields: FormField<any, any>[]) => boolean; | ||
}; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FormField = exports.Untouched = exports.Invalid = exports.Valid = exports.FormFieldType = void 0; | ||
var FormFieldType; | ||
@@ -4,0 +5,0 @@ (function (FormFieldType) { |
@@ -7,4 +7,8 @@ export declare type F1<A, B> = (a: A) => B; | ||
export declare type F6<A, B, C, D, E, F, G> = (a: A, b: B, c: C, d: D, e: E, f: F) => G; | ||
export declare type F7<A, B, C, D, E, F, G, H> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => H; | ||
export declare type F8<A, B, C, D, E, F, G, H, I> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) => I; | ||
export declare type F9<A, B, C, D, E, F, G, H, I, J> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I) => J; | ||
export declare type F10<A, B, C, D, E, F, G, H, I, J, K> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J) => K; | ||
export declare type Lazy<A> = () => A; | ||
export declare type Curried<A, B, C> = (a: A) => (b: B) => C; | ||
export declare type Curried2<A, B, C, D> = (a: A) => (b: B) => (c: C) => D; |
"use strict"; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.group = void 0; | ||
var group_ = function () { | ||
@@ -18,3 +22,3 @@ var fns = []; | ||
return fns.reduce(function (acc, f) { | ||
return __assign({}, acc, f(arg)); | ||
return __assign(__assign({}, acc), f(arg)); | ||
}, {}); | ||
@@ -21,0 +25,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.group = exports.Failure = exports.Success = exports.Untouched = exports.Invalid = exports.Valid = exports.FormField = exports.ListView = exports.Validation = exports.Filter = exports.List = exports.Pending = exports.Failed = exports.Unloaded = exports.Loaded = exports.RemoteData = exports.Option = exports.Right = exports.Left = exports.Either = exports.curry2 = exports.curry1 = exports.asyncGroup = exports.asyncPipe = exports.pipe = exports.compose = void 0; | ||
var compose_1 = require("./compose"); | ||
exports.compose = compose_1.compose; | ||
Object.defineProperty(exports, "compose", { enumerable: true, get: function () { return compose_1.compose; } }); | ||
var pipe_1 = require("./pipe"); | ||
exports.pipe = pipe_1.pipe; | ||
Object.defineProperty(exports, "pipe", { enumerable: true, get: function () { return pipe_1.pipe; } }); | ||
var curry_1 = require("./curry"); | ||
exports.curry1 = curry_1.curry1; | ||
exports.curry2 = curry_1.curry2; | ||
Object.defineProperty(exports, "curry1", { enumerable: true, get: function () { return curry_1.curry1; } }); | ||
Object.defineProperty(exports, "curry2", { enumerable: true, get: function () { return curry_1.curry2; } }); | ||
var either_1 = require("./either"); | ||
exports.Either = either_1.Either; | ||
exports.Left = either_1.Left; | ||
exports.Right = either_1.Right; | ||
Object.defineProperty(exports, "Either", { enumerable: true, get: function () { return either_1.Either; } }); | ||
Object.defineProperty(exports, "Left", { enumerable: true, get: function () { return either_1.Left; } }); | ||
Object.defineProperty(exports, "Right", { enumerable: true, get: function () { return either_1.Right; } }); | ||
var option_1 = require("./option"); | ||
exports.Option = option_1.Option; | ||
Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return option_1.Option; } }); | ||
var remote_data_1 = require("./remote-data"); | ||
exports.RemoteData = remote_data_1.RemoteData; | ||
exports.Loaded = remote_data_1.Loaded; | ||
exports.Unloaded = remote_data_1.Unloaded; | ||
exports.Failed = remote_data_1.Failed; | ||
exports.Pending = remote_data_1.Pending; | ||
Object.defineProperty(exports, "RemoteData", { enumerable: true, get: function () { return remote_data_1.RemoteData; } }); | ||
Object.defineProperty(exports, "Loaded", { enumerable: true, get: function () { return remote_data_1.Loaded; } }); | ||
Object.defineProperty(exports, "Unloaded", { enumerable: true, get: function () { return remote_data_1.Unloaded; } }); | ||
Object.defineProperty(exports, "Failed", { enumerable: true, get: function () { return remote_data_1.Failed; } }); | ||
Object.defineProperty(exports, "Pending", { enumerable: true, get: function () { return remote_data_1.Pending; } }); | ||
var list_1 = require("./list"); | ||
exports.List = list_1.List; | ||
Object.defineProperty(exports, "List", { enumerable: true, get: function () { return list_1.List; } }); | ||
var validation_1 = require("./validation"); | ||
exports.Validation = validation_1.Validation; | ||
Object.defineProperty(exports, "Validation", { enumerable: true, get: function () { return validation_1.Validation; } }); | ||
var view_1 = require("./view"); | ||
exports.ListView = view_1.ListView; | ||
Object.defineProperty(exports, "ListView", { enumerable: true, get: function () { return view_1.ListView; } }); | ||
var filter_1 = require("./filter"); | ||
exports.Filter = filter_1.Filter; | ||
Object.defineProperty(exports, "Filter", { enumerable: true, get: function () { return filter_1.Filter; } }); | ||
var form_1 = require("./form"); | ||
exports.FormField = form_1.FormField; | ||
exports.Valid = form_1.Valid; | ||
exports.Invalid = form_1.Invalid; | ||
exports.Untouched = form_1.Untouched; | ||
Object.defineProperty(exports, "FormField", { enumerable: true, get: function () { return form_1.FormField; } }); | ||
Object.defineProperty(exports, "Valid", { enumerable: true, get: function () { return form_1.Valid; } }); | ||
Object.defineProperty(exports, "Invalid", { enumerable: true, get: function () { return form_1.Invalid; } }); | ||
Object.defineProperty(exports, "Untouched", { enumerable: true, get: function () { return form_1.Untouched; } }); | ||
var result_1 = require("./result"); | ||
exports.Success = result_1.Success; | ||
exports.Failure = result_1.Failure; | ||
Object.defineProperty(exports, "Success", { enumerable: true, get: function () { return result_1.Success; } }); | ||
Object.defineProperty(exports, "Failure", { enumerable: true, get: function () { return result_1.Failure; } }); | ||
var async_pipe_1 = require("./async-pipe"); | ||
exports.asyncPipe = async_pipe_1.asyncPipe; | ||
exports.asyncGroup = async_pipe_1.asyncGroup; | ||
Object.defineProperty(exports, "asyncPipe", { enumerable: true, get: function () { return async_pipe_1.asyncPipe; } }); | ||
Object.defineProperty(exports, "asyncGroup", { enumerable: true, get: function () { return async_pipe_1.asyncGroup; } }); | ||
var group_1 = require("./group"); | ||
exports.group = group_1.group; | ||
Object.defineProperty(exports, "group", { enumerable: true, get: function () { return group_1.group; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -11,11 +11,11 @@ import { F1 } from "./function"; | ||
export declare const List: { | ||
set: <A>(list: ReadonlyArray<A>, where: Selector<A>, value: A | F1<A, A>) => ReadonlyArray<A>; | ||
get: <A>(list: ReadonlyArray<A>, where: Selector<A>) => Option<A>; | ||
contains: <A>(list: ReadonlyArray<A>, item: A) => boolean; | ||
match: <A, B>(list: ReadonlyArray<A>, cases: ListCases<A, B>) => B; | ||
isList: <A>(maybeList: any) => maybeList is ReadonlyArray<A>; | ||
remove: <A>(list: ReadonlyArray<A>, itemToRemove: A) => ReadonlyArray<A>; | ||
equals: <A>(list1: ReadonlyArray<A>, list2: ReadonlyArray<A>, eq?: ((a: A, b: A) => boolean) | undefined) => boolean; | ||
setAndMove: <A>(a: A, where: Selector<A>, newIdx: number) => (list: ReadonlyArray<A>) => ReadonlyArray<A>; | ||
set: <A>(list: List<A>, where: Selector<A>, value: A | F1<A, A>) => List<A>; | ||
get: <A_1>(list: List<A_1>, where: Selector<A_1>) => Option<A_1>; | ||
contains: <A_2>(list: List<A_2>, item: A_2) => boolean; | ||
match: <A_3, B>(list: List<A_3>, cases: ListCases<A_3, B>) => B; | ||
isList: <A_4>(maybeList: any) => maybeList is List<A_4>; | ||
remove: <A_5>(list: List<A_5>, itemToRemove: A_5) => List<A_5>; | ||
equals: <A_6>(list1: List<A_6>, list2: List<A_6>, eq?: ((a: A_6, b: A_6) => boolean) | undefined) => boolean; | ||
setAndMove: <A_7>(a: A_7, where: Selector<A_7>, newIdx: number) => (list: List<A_7>) => List<A_7>; | ||
}; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.List = void 0; | ||
var option_1 = require("./option"); | ||
@@ -4,0 +5,0 @@ var match = function (selector, item, index, list) { |
import { F1, Lazy } from "./function"; | ||
import { List } from "./list"; | ||
export declare type Option<A> = A | null | undefined; | ||
export declare const Option: { | ||
map: <A, B>(value: Option<A>, f: F1<A, B>) => Option<B>; | ||
flatMap: <A, B>(value: Option<A>, f: F1<A, Option<B>>) => Option<B>; | ||
getOrElse: <A>(value: Option<A>, defaultVal: Lazy<A>) => A; | ||
isDefined: <A>(value: Option<A>) => value is A; | ||
isEmpty: <A>(value: Option<A>) => value is null | undefined; | ||
forEach: <A>(value: Option<A>, f: F1<A, void>) => void; | ||
sequence: <A>(list: ReadonlyArray<Option<A>>) => Option<ReadonlyArray<A>>; | ||
flatMap: <A_1, B_1>(value: Option<A_1>, f: F1<A_1, Option<B_1>>) => Option<B_1>; | ||
getOrElse: <A_2>(value: Option<A_2>, defaultVal: Lazy<A_2>) => A_2; | ||
isDefined: <A_3>(value: Option<A_3>) => value is A_3; | ||
isEmpty: <A_4>(value: Option<A_4>) => value is null | undefined; | ||
forEach: <A_5>(value: Option<A_5>, f: F1<A_5, void>) => void; | ||
sequence: <A_6>(list: List<Option<A_6>>) => Option<List<A_6>>; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Option = void 0; | ||
exports.Option = { | ||
@@ -4,0 +5,0 @@ map: function (value, f) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pipe = void 0; | ||
exports.pipe = function (a) { | ||
@@ -4,0 +5,0 @@ var fns = []; |
@@ -39,16 +39,16 @@ import { F1, F2, Lazy } from "./function"; | ||
loaded: <E, A>(rd: RemoteData<E, A>) => rd is Loaded<A>; | ||
pending: <E, A>(rd: RemoteData<E, A>) => rd is Pending<A>; | ||
failed: <E, A>(rd: RemoteData<E, A>) => rd is Failed<E, A>; | ||
unloaded: <E, A>(rd: RemoteData<E, A>) => rd is Unloaded; | ||
match: <E, A, B>(rd: RemoteData<E, A>, cases: RemoteDataCases<E, A, B>) => B; | ||
map: <E, A, B>(rd: RemoteData<E, A>, f: F1<A, B>) => RemoteData<E, B>; | ||
flatMap: <E, A, B>(rd: RemoteData<E, A>, f: F1<A, RemoteData<E, B>>) => RemoteData<E, B>; | ||
map2: <E, A, B, C>(rd1: RemoteData<E, A>, rd2: RemoteData<E, B>, f: F2<A, B, C>) => RemoteData<E, C>; | ||
data: <E, A>(rd: RemoteData<E, A>) => Option<A>; | ||
toString: <E, A>(rd: RemoteData<E, A>) => string; | ||
getOrElse: <E, A>(rd1: RemoteData<E, A>, fval: Lazy<A>) => A; | ||
merge: <E, A>(rd1: RemoteData<E, A>, rd2: RemoteData<E, A>, add: F2<A, A, A>) => RemoteData<E, A>; | ||
replace: <E, A>(rd1: RemoteData<E, A>, rd2: RemoteData<E, A>) => RemoteData<E, A>; | ||
getState: <E, A>(rd1: RemoteData<E, A>) => [Option<E>, Option<A>, boolean]; | ||
pending: <E_1, A_1>(rd: RemoteData<E_1, A_1>) => rd is Pending<A_1>; | ||
failed: <E_2, A_2>(rd: RemoteData<E_2, A_2>) => rd is Failed<E_2, A_2>; | ||
unloaded: <E_3, A_3>(rd: RemoteData<E_3, A_3>) => rd is Unloaded; | ||
match: <E_4, A_4, B>(rd: RemoteData<E_4, A_4>, cases: RemoteDataCases<E_4, A_4, B>) => B; | ||
map: <E_5, A_5, B_1>(rd: RemoteData<E_5, A_5>, f: F1<A_5, B_1>) => RemoteData<E_5, B_1>; | ||
flatMap: <E_6, A_6, B_2>(rd: RemoteData<E_6, A_6>, f: F1<A_6, RemoteData<E_6, B_2>>) => RemoteData<E_6, B_2>; | ||
map2: <E_7, A_7, B_3, C>(rd1: RemoteData<E_7, A_7>, rd2: RemoteData<E_7, B_3>, f: F2<A_7, B_3, C>) => RemoteData<E_7, C>; | ||
data: <E_8, A_8>(rd: RemoteData<E_8, A_8>) => Option<A_8>; | ||
toString: <E_9 extends {}, A_9>(rd: RemoteData<E_9, A_9>) => string; | ||
getOrElse: <E_10, A_10>(rd1: RemoteData<E_10, A_10>, fval: Lazy<A_10>) => A_10; | ||
merge: <E_11, A_11>(rd1: RemoteData<E_11, A_11>, rd2: RemoteData<E_11, A_11>, add: F2<A_11, A_11, A_11>) => RemoteData<E_11, A_11>; | ||
replace: <E_12, A_12>(rd1: RemoteData<E_12, A_12>, rd2: RemoteData<E_12, A_12>) => RemoteData<E_12, A_12>; | ||
getState: <E_13, A_13>(rd1: RemoteData<E_13, A_13>) => State<E_13, A_13>; | ||
}; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RemoteData = exports.Unloaded = exports.Failed = exports.Pending = exports.Loaded = exports.RemoteDataStatus = void 0; | ||
var option_1 = require("./option"); | ||
@@ -4,0 +5,0 @@ var RemoteDataStatus; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Failure = exports.Success = void 0; | ||
var either_1 = require("./either"); | ||
@@ -4,0 +5,0 @@ exports.Success = function (value) { return either_1.Right(value); }; |
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Validation = void 0; | ||
var form_1 = require("./form"); | ||
@@ -20,3 +28,3 @@ exports.Validation = { | ||
Valid: function (_) { return form_1.Invalid(result, errors); }, | ||
Invalid: function (_, errors2) { return form_1.Invalid(result, errors.concat(errors2)); }, | ||
Invalid: function (_, errors2) { return form_1.Invalid(result, __spreadArrays(errors, errors2)); }, | ||
Untouched: function (_) { return form_1.Invalid(result, errors); } | ||
@@ -23,0 +31,0 @@ }); |
@@ -0,1 +1,2 @@ | ||
import { List } from "./list"; | ||
import { F2, F3 } from "./function"; | ||
@@ -15,3 +16,3 @@ export interface View<A> { | ||
} | ||
export declare const ListView: <A>(start: number, end: number, items: ReadonlyArray<A>) => View<A>; | ||
export declare const ListView: <A>(start: number, end: number, items: List<A>) => View<A>; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ListView = void 0; | ||
exports.ListView = function (start, end, items) { | ||
@@ -4,0 +5,0 @@ var self = { |
@@ -10,3 +10,3 @@ { | ||
"typings": "dist/index.d.ts", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"repository": "git@bitbucket.org:chaaba_j/ts-functools.git", | ||
@@ -13,0 +13,0 @@ "author": "Jalal Chaabane", |
@@ -13,3 +13,3 @@ { | ||
"allowUnreachableCode": false, | ||
"allowJs": true, | ||
"allowJs": false, | ||
"allowSyntheticDefaultImports": true, | ||
@@ -22,3 +22,3 @@ "noEmit": false, | ||
"pretty": true, | ||
"declaration": false, | ||
"declaration": true, | ||
"module": "commonjs", | ||
@@ -25,0 +25,0 @@ "moduleResolution": "node", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
129136
2710