functype 0.8.35 → 0.8.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -43
- package/dist/chunk-4H62YQ42.mjs +0 -0
- package/dist/chunk-5NZRFQ7O.mjs +1 -0
- package/dist/chunk-OTZ4XGNK.js +1 -0
- package/dist/chunk-WTWWDZY6.js +1 -0
- package/dist/collections/index.d.mts +1 -1
- package/dist/collections/index.d.ts +1 -1
- package/dist/core/task/Task.d.mts +1 -1
- package/dist/core/task/Task.d.ts +1 -1
- package/dist/core/task/Task.js +1 -1
- package/dist/core/task/Task.mjs +1 -1
- package/dist/either/Either.d.mts +1 -1
- package/dist/either/Either.d.ts +1 -1
- package/dist/either/Either.js +1 -1
- package/dist/either/Either.mjs +1 -1
- package/dist/{index-B6k3GVAd.d.ts → index-Bvqg1Srg.d.ts} +47 -55
- package/dist/{index-Cwkc_dEO.d.mts → index-D6OHxaFT.d.mts} +47 -55
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/iterable/index.d.mts +1 -1
- package/dist/iterable/index.d.ts +1 -1
- package/dist/iterable/index.js +1 -1
- package/dist/iterable/index.mjs +1 -1
- package/dist/list/List.d.mts +1 -1
- package/dist/list/List.d.ts +1 -1
- package/dist/list/List.js +1 -1
- package/dist/list/List.mjs +1 -1
- package/dist/map/Map.d.mts +1 -1
- package/dist/map/Map.d.ts +1 -1
- package/dist/map/Map.js +1 -1
- package/dist/map/Map.mjs +1 -1
- package/dist/option/Option.d.mts +1 -1
- package/dist/option/Option.d.ts +1 -1
- package/dist/option/Option.js +1 -1
- package/dist/option/Option.mjs +1 -1
- package/dist/set/Set.d.mts +1 -1
- package/dist/set/Set.d.ts +1 -1
- package/dist/set/Set.js +1 -1
- package/dist/set/Set.mjs +1 -1
- package/dist/try/Try.d.mts +1 -1
- package/dist/try/Try.d.ts +1 -1
- package/dist/try/Try.js +1 -1
- package/dist/try/Try.mjs +1 -1
- package/dist/typeable/Typeable.d.mts +5 -4
- package/dist/typeable/Typeable.d.ts +5 -4
- package/dist/util/index.d.mts +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/index.mjs +1 -1
- package/dist/util/isIterable.js +1 -1
- package/dist/util/isIterable.mjs +1 -1
- package/package.json +10 -10
- package/dist/chunk-52OPFRS2.js +0 -1
- package/dist/chunk-BNNK42JC.js +0 -1
- package/dist/chunk-QBAH7SOA.mjs +0 -1
- package/dist/chunk-RRAIFS3D.mjs +0 -1
- package/dist/iterable/Seq.d.mts +0 -8
- package/dist/iterable/Seq.d.ts +0 -8
- package/dist/iterable/Seq.js +0 -1
- package/dist/iterable/Seq.mjs +0 -1
- package/lib/TaskPromise.d.ts +0 -3
- package/lib/collections/index.d.ts +0 -8
- package/lib/either/Either.d.ts +0 -52
- package/lib/either/EitherT.d.ts +0 -9
- package/lib/error/ParseError.d.ts +0 -6
- package/lib/functor/index.d.ts +0 -15
- package/lib/identity/Identity.d.ts +0 -4
- package/lib/index.d.ts +0 -21
- package/lib/iterable/Seq.d.ts +0 -31
- package/lib/iterable/index.d.ts +0 -22
- package/lib/list/List.d.ts +0 -26
- package/lib/map/Map.d.ts +0 -17
- package/lib/map/shim.d.ts +0 -2
- package/lib/option/Option.d.ts +0 -30
- package/lib/serializable/Serializable.d.ts +0 -15
- package/lib/set/Set.d.ts +0 -15
- package/lib/set/shim.d.ts +0 -2
- package/lib/try/Try.d.ts +0 -18
- package/lib/tuple/Tuple.d.ts +0 -9
- package/lib/typeable/Typeable.d.ts +0 -4
- package/lib/util/index.d.ts +0 -3
- package/lib/util/isIterable.d.ts +0 -1
package/lib/set/Set.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Collection } from "../collections";
|
|
2
|
-
import { _Iterable_ } from "../iterable";
|
|
3
|
-
import { List } from "../list/List";
|
|
4
|
-
export type Set<A> = {
|
|
5
|
-
add: (value: A) => Set<A>;
|
|
6
|
-
remove: (value: A) => Set<A>;
|
|
7
|
-
contains: (value: A) => boolean;
|
|
8
|
-
has: (value: A) => boolean;
|
|
9
|
-
map: <B>(f: (a: A) => B) => Set<B>;
|
|
10
|
-
flatMap: <B>(f: (a: A) => _Iterable_<B>) => Set<B>;
|
|
11
|
-
toList: () => List<A>;
|
|
12
|
-
toSet: () => Set<A>;
|
|
13
|
-
toString: () => string;
|
|
14
|
-
} & _Iterable_<A> & Collection<A>;
|
|
15
|
-
export declare const Set: <A>(iterable?: Iterable<A> | _Iterable_<A>) => Set<A>;
|
package/lib/set/shim.d.ts
DELETED
package/lib/try/Try.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Either } from "../either/Either";
|
|
2
|
-
import { Typeable } from "../typeable/Typeable";
|
|
3
|
-
export type Try<T> = {
|
|
4
|
-
readonly _tag: "Success" | "Failure";
|
|
5
|
-
readonly value: T | undefined;
|
|
6
|
-
readonly error: Error | undefined;
|
|
7
|
-
isSuccess: () => boolean;
|
|
8
|
-
isFailure: () => boolean;
|
|
9
|
-
get: () => T;
|
|
10
|
-
getOrElse: (defaultValue: T) => T;
|
|
11
|
-
orElse: (alternative: Try<T>) => Try<T>;
|
|
12
|
-
orThrow: (error: Error) => T;
|
|
13
|
-
toEither: () => Either<Error, T>;
|
|
14
|
-
map: <U>(f: (value: T) => U) => Try<U>;
|
|
15
|
-
flatMap: <U>(f: (value: T) => Try<U>) => Try<U>;
|
|
16
|
-
toString: () => string;
|
|
17
|
-
} & Typeable<"Success" | "Failure">;
|
|
18
|
-
export declare const Try: <T>(f: () => T) => Try<T>;
|
package/lib/tuple/Tuple.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ArrayFunctor, ArrayType } from "../functor";
|
|
2
|
-
export type Tuple<T extends ArrayType> = {
|
|
3
|
-
get<K extends number>(index: K): T[K];
|
|
4
|
-
map<U extends ArrayType>(f: (value: T) => U): Tuple<U>;
|
|
5
|
-
flatMap<U extends ArrayType>(f: (value: T) => Tuple<U>): Tuple<U>;
|
|
6
|
-
toArray(): T;
|
|
7
|
-
[Symbol.iterator](): Iterator<T[number]>;
|
|
8
|
-
} & ArrayFunctor<T>;
|
|
9
|
-
export declare const Tuple: <T extends ArrayType>(values: T) => Tuple<T>;
|
package/lib/util/index.d.ts
DELETED
package/lib/util/isIterable.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isIterable: <T>(value: unknown) => value is Iterable<T>;
|