fortepiano 0.1.2 → 0.1.3
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/AsyncYield/package.json +6 -0
- package/AsyncYield.d.ts +104 -0
- package/Buffer.d.ts +0 -1
- package/CHANGELOG.md +73 -1
- package/CONTRIBUTING.md +2 -2
- package/Console.d.ts +2 -2
- package/Crypto.d.ts +0 -1
- package/Error.d.ts +8 -1
- package/GeneratorL.d.ts +524 -18
- package/Has/package.json +6 -0
- package/Has.d.ts +16 -0
- package/Http.d.ts +1 -2
- package/ReaderTaskEither.d.ts +49 -0
- package/Storage.d.ts +0 -1
- package/Stream.d.ts +0 -1
- package/Type.d.ts +2 -0
- package/Yield/package.json +6 -0
- package/Yield.d.ts +210 -0
- package/esm/{IOAsyncGenerator.js → AsyncYield.js} +9 -8
- package/esm/Error.js +17 -4
- package/esm/GeneratorL.js +404 -4
- package/esm/Has.js +5 -0
- package/esm/Http.js +1 -1
- package/esm/Mock.js +5 -4
- package/esm/ReaderTaskEither.js +48 -1
- package/esm/Type.js +3 -0
- package/esm/Yield.js +401 -0
- package/esm/cache/Redis.js +1 -1
- package/esm/index.js +8 -2
- package/index.d.ts +9 -2
- package/lib/AsyncYield.d.ts +104 -0
- package/lib/{IOAsyncGenerator.js → AsyncYield.js} +36 -31
- package/lib/Buffer.d.ts +0 -1
- package/lib/Buffer.js +5 -1
- package/lib/Cache.js +13 -9
- package/lib/Console.d.ts +2 -2
- package/lib/Crypto.d.ts +0 -1
- package/lib/Crypto.js +8 -4
- package/lib/Date.js +7 -3
- package/lib/Eq.js +7 -3
- package/lib/Error.d.ts +8 -1
- package/lib/Error.js +26 -8
- package/lib/GeneratorL.d.ts +524 -18
- package/lib/GeneratorL.js +480 -76
- package/lib/Has.d.ts +16 -0
- package/lib/Has.js +13 -0
- package/lib/Http.d.ts +1 -2
- package/lib/Http.js +10 -6
- package/lib/Magma.js +6 -2
- package/lib/Matrix.js +8 -4
- package/lib/Mock.js +29 -24
- package/lib/Option.js +5 -1
- package/lib/Reader.js +7 -3
- package/lib/ReaderEither.js +9 -5
- package/lib/ReaderTask.js +9 -5
- package/lib/ReaderTaskEither.d.ts +49 -0
- package/lib/ReaderTaskEither.js +106 -10
- package/lib/ReadonlyArray.js +9 -5
- package/lib/ReadonlyRecord.js +6 -2
- package/lib/ReadonlyTuple.js +7 -3
- package/lib/Storage.d.ts +0 -1
- package/lib/Storage.js +11 -7
- package/lib/Stream.d.ts +0 -1
- package/lib/Stream.js +5 -1
- package/lib/TaskEither.js +5 -1
- package/lib/Type.d.ts +2 -0
- package/lib/Type.js +13 -5
- package/lib/Validation.js +6 -2
- package/lib/Yield.d.ts +210 -0
- package/lib/Yield.js +504 -0
- package/lib/cache/Memcached.js +11 -7
- package/lib/cache/Memory.js +6 -2
- package/lib/cache/Redis.js +11 -7
- package/lib/cache/Storage.js +10 -6
- package/lib/http/Axios.js +6 -2
- package/lib/http/Fetch.js +9 -5
- package/lib/http/Got.js +7 -3
- package/lib/http/Mock.js +6 -2
- package/lib/index.d.ts +9 -2
- package/lib/index.js +16 -4
- package/lib/number.js +1 -1
- package/lib/storage/Flydrive.js +7 -3
- package/lib/storage/Fs.js +5 -1
- package/lib/string.js +5 -1
- package/lib/struct.d.ts +4 -0
- package/lib/struct.js +11 -7
- package/package.json +29 -27
- package/struct.d.ts +4 -0
- package/IOAsyncGenerator/package.json +0 -6
- package/IOAsyncGenerator.d.ts +0 -102
- package/lib/IOAsyncGenerator.d.ts +0 -102
package/AsyncYield.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as Appli from 'fp-ts/Applicative';
|
|
2
|
+
import * as _Apply from 'fp-ts/Apply';
|
|
3
|
+
import * as Ch from 'fp-ts/Chain';
|
|
4
|
+
import * as Co from 'fp-ts/Compactable';
|
|
5
|
+
import * as Ei from 'fp-ts/Either';
|
|
6
|
+
import * as Eq from 'fp-ts/Eq';
|
|
7
|
+
import * as Fi from 'fp-ts/Filterable';
|
|
8
|
+
import * as FiWI from 'fp-ts/FilterableWithIndex';
|
|
9
|
+
import * as FIO from 'fp-ts/FromIO';
|
|
10
|
+
import { Lazy } from 'fp-ts/function';
|
|
11
|
+
import * as Fu from 'fp-ts/Functor';
|
|
12
|
+
import * as FuWI from 'fp-ts/FunctorWithIndex';
|
|
13
|
+
import * as IO from 'fp-ts/IO';
|
|
14
|
+
import * as Mona from 'fp-ts/Monad';
|
|
15
|
+
import * as MIO from 'fp-ts/MonadIO';
|
|
16
|
+
import * as Mono from 'fp-ts/Monoid';
|
|
17
|
+
import * as O from 'fp-ts/Option';
|
|
18
|
+
import * as P from 'fp-ts/Pointed';
|
|
19
|
+
import * as Pr from 'fp-ts/Predicate';
|
|
20
|
+
import * as Re from 'fp-ts/Refinement';
|
|
21
|
+
import * as S from 'fp-ts/Separated';
|
|
22
|
+
import * as T from 'fp-ts/Task';
|
|
23
|
+
import * as $Y from './Yield';
|
|
24
|
+
export declare const URI = "AsyncYield";
|
|
25
|
+
export declare type URI = typeof URI;
|
|
26
|
+
declare module 'fp-ts/HKT' {
|
|
27
|
+
interface URItoKind<A> {
|
|
28
|
+
[URI]: AsyncYield<A>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare type AsyncYield<A> = IO.IO<AsyncGenerator<A>>;
|
|
32
|
+
export declare const getMonoid: <A>() => Mono.Monoid<AsyncYield<A>>;
|
|
33
|
+
export declare const fromIOGenerator: <A>(as: $Y.Yield<A>) => AsyncYield<A>;
|
|
34
|
+
export declare const Functor: Fu.Functor1<URI>;
|
|
35
|
+
export declare const map: <A, B>(a: (a: A) => B) => (b: AsyncYield<A>) => AsyncYield<B>;
|
|
36
|
+
export declare const flap: <A>(a: A) => <B>(fab: AsyncYield<(a: A) => B>) => AsyncYield<B>;
|
|
37
|
+
export declare const bindTo: <N extends string>(name: N) => <A>(fa: AsyncYield<A>) => AsyncYield<{ readonly [K in N]: A; }>;
|
|
38
|
+
export declare const FunctorWithIndex: FuWI.FunctorWithIndex1<URI, number>;
|
|
39
|
+
export declare const Pointed: P.Pointed1<URI>;
|
|
40
|
+
export declare const of: <A>(a: A) => AsyncYield<A>;
|
|
41
|
+
export declare const Do: AsyncYield<{}>;
|
|
42
|
+
export declare const ApplyPar: _Apply.Apply1<URI>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export declare const ApplySeq: _Apply.Apply1<URI>;
|
|
47
|
+
export declare const ap: <A, B>(a: AsyncYield<A>) => (b: AsyncYield<(a: A) => B>) => AsyncYield<B>;
|
|
48
|
+
export declare const apFirst: <B>(second: AsyncYield<B>) => <A>(first: AsyncYield<A>) => AsyncYield<A>;
|
|
49
|
+
export declare const apSecond: <B>(second: AsyncYield<B>) => <A>(first: AsyncYield<A>) => AsyncYield<B>;
|
|
50
|
+
export declare const apS: <N extends string, A, B>(name: Exclude<N, keyof A>, fb: AsyncYield<B>) => (fa: AsyncYield<A>) => AsyncYield<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
|
|
51
|
+
export declare const ApplicativePar: Appli.Applicative1<URI>;
|
|
52
|
+
export declare const ApplicativeSeq: Appli.Applicative1<URI>;
|
|
53
|
+
export declare const Chain: Ch.Chain1<URI>;
|
|
54
|
+
export declare const chain: <A, B>(a: (a: A) => AsyncYield<B>) => (b: AsyncYield<A>) => AsyncYield<B>;
|
|
55
|
+
export declare const chainFirst: <A, B>(f: (a: A) => AsyncYield<B>) => (first: AsyncYield<A>) => AsyncYield<A>;
|
|
56
|
+
export declare const bind: <N extends string, A, B>(name: Exclude<N, keyof A>, f: (a: A) => AsyncYield<B>) => (ma: AsyncYield<A>) => AsyncYield<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
|
|
57
|
+
export declare const Monad: Mona.Monad1<URI>;
|
|
58
|
+
export declare const FromIO: FIO.FromIO1<URI>;
|
|
59
|
+
export declare const fromIO: import("fp-ts/lib/NaturalTransformation").NaturalTransformation11<"IO", "AsyncYield">;
|
|
60
|
+
export declare const fromIOK: <A extends readonly unknown[], B>(f: (...a: A) => IO.IO<B>) => (...a: A) => AsyncYield<B>;
|
|
61
|
+
export declare const chainIOK: <A, B>(f: (a: A) => IO.IO<B>) => (first: AsyncYield<A>) => AsyncYield<B>;
|
|
62
|
+
export declare const chainFirstIOK: <A, B>(f: (a: A) => IO.IO<B>) => (first: AsyncYield<A>) => AsyncYield<A>;
|
|
63
|
+
export declare const fromIOReadonlyArray: <A>(fa: IO.IO<readonly A[]>) => AsyncYield<A>;
|
|
64
|
+
export declare const fromIOReadonlyArrayK: <A extends readonly unknown[], B>(f: (...a: A) => IO.IO<readonly B[]>) => (...a: A) => AsyncYield<B>;
|
|
65
|
+
export declare const chainIOReadonlyArrayK: <A, B>(f: (a: A) => IO.IO<readonly B[]>) => (b: AsyncYield<A>) => AsyncYield<B>;
|
|
66
|
+
export declare const MonadIO: MIO.MonadIO1<URI>;
|
|
67
|
+
export declare const Compactable: Co.Compactable1<URI>;
|
|
68
|
+
export declare const compact: <A>(fa: AsyncYield<O.Option<A>>) => AsyncYield<A>;
|
|
69
|
+
export declare const separate: <A, B>(fa: AsyncYield<Ei.Either<A, B>>) => S.Separated<AsyncYield<A>, AsyncYield<B>>;
|
|
70
|
+
export declare const Filterable: Fi.Filterable1<URI>;
|
|
71
|
+
export declare function filter<A, B extends A>(refinement: Re.Refinement<A, B>): (fa: AsyncYield<A>) => AsyncYield<B>;
|
|
72
|
+
export declare function filter<A>(predicate: Pr.Predicate<A>): (fa: AsyncYield<A>) => AsyncYield<A>;
|
|
73
|
+
export declare const filterMap: <A, B>(a: (a: A) => O.Option<B>) => (b: AsyncYield<A>) => AsyncYield<B>;
|
|
74
|
+
export declare function partition<A, B extends A>(refinement: Re.Refinement<A, B>): (fa: AsyncYield<A>) => S.Separated<AsyncYield<A>, AsyncYield<B>>;
|
|
75
|
+
export declare function partition<A>(predicate: Pr.Predicate<A>): (fa: AsyncYield<A>) => S.Separated<AsyncYield<A>, AsyncYield<A>>;
|
|
76
|
+
export declare const partitionMap: <A, B, C>(a: (a: A) => Ei.Either<B, C>) => (b: AsyncYield<A>) => S.Separated<AsyncYield<B>, AsyncYield<C>>;
|
|
77
|
+
export declare const FilterableWithIndex: FiWI.FilterableWithIndex1<URI, number>;
|
|
78
|
+
export declare function filterWithIndex<A, B extends A>(refinementWithIndex: (i: number, a: A) => a is B): (fa: AsyncYield<A>) => AsyncYield<B>;
|
|
79
|
+
export declare function filterWithIndex<A>(predicateWithIndex: (i: number, a: A) => boolean): (fa: AsyncYield<A>) => AsyncYield<A>;
|
|
80
|
+
export declare const filterMapWithIndex: <A, B>(a: (i: number, a: A) => O.Option<B>) => (b: AsyncYield<A>) => AsyncYield<B>;
|
|
81
|
+
export declare function partitionWithIndex<A, B extends A>(refinementWithIndex: (i: number, a: A) => a is B): (fa: AsyncYield<A>) => S.Separated<AsyncYield<A>, AsyncYield<B>>;
|
|
82
|
+
export declare function partitionWithIndex<A>(predicateWithIndex: (i: number, a: A) => boolean): (fa: AsyncYield<A>) => S.Separated<AsyncYield<A>, AsyncYield<A>>;
|
|
83
|
+
export declare const partitionMapWithIndex: <A, B, C>(a: (i: number, a: A) => Ei.Either<B, C>) => (b: AsyncYield<A>) => S.Separated<AsyncYield<B>, AsyncYield<C>>;
|
|
84
|
+
export declare const range: (start: number, end?: number | undefined) => AsyncYield<number>;
|
|
85
|
+
export declare const replicate: <A>(a: A) => AsyncYield<A>;
|
|
86
|
+
export declare const fromReadonlyArray: <A>(x: readonly A[]) => AsyncYield<A>;
|
|
87
|
+
export declare const sieve: <A>(f: (init: readonly A[], a: A) => boolean) => (as: AsyncYield<A>) => AsyncYield<A>;
|
|
88
|
+
export declare const prime: AsyncYield<number>;
|
|
89
|
+
export declare const exp: AsyncYield<number>;
|
|
90
|
+
export declare const fibonacci: AsyncYield<number>;
|
|
91
|
+
export declare const flatten: <A>(as: AsyncYield<AsyncYield<A>>) => AsyncYield<A>;
|
|
92
|
+
export declare const take: <A>(n: number) => (as: AsyncYield<A>) => AsyncYield<A>;
|
|
93
|
+
export declare const drop: <A>(n: number) => (as: AsyncYield<A>) => AsyncYield<A>;
|
|
94
|
+
export declare const zip: <A, B>(bs: AsyncYield<B>) => (as: AsyncYield<A>) => AsyncYield<readonly [A, B]>;
|
|
95
|
+
export declare const uniq: <A>(E: Eq.Eq<A>) => (as: AsyncYield<A>) => AsyncYield<A>;
|
|
96
|
+
export declare const match: <A, B>(onEmpty: Lazy<B>, onNonEmpty: (head: A, tail: AsyncYield<A>) => B) => (as: AsyncYield<A>) => T.Task<B>;
|
|
97
|
+
export declare const toTask: <A>(as: AsyncYield<A>) => T.Task<readonly A[]>;
|
|
98
|
+
export declare const isEmpty: (as: AsyncYield<unknown>) => T.Task<boolean>;
|
|
99
|
+
export declare const isNonEmpty: (as: AsyncYield<unknown>) => T.Task<boolean>;
|
|
100
|
+
export declare const lookup: <A>(i: number) => (as: AsyncYield<A>) => T.Task<O.Option<A>>;
|
|
101
|
+
export declare const head: <A>(as: AsyncYield<A>) => T.Task<O.Option<A>>;
|
|
102
|
+
export declare function find<A, B extends A>(refinement: Re.Refinement<A, B>): (as: AsyncYield<A>) => T.Task<O.Option<B>>;
|
|
103
|
+
export declare function find<A>(predicate: Pr.Predicate<A>): (as: AsyncYield<A>) => T.Task<O.Option<A>>;
|
|
104
|
+
export declare const elem: <A>(Eq: Eq.Eq<A>) => (a: A) => (as: AsyncYield<A>) => T.Task<O.Option<A>>;
|
package/Buffer.d.ts
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,78 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.1.3](https://github.com/facile-it/fortepiano/compare/v0.1.2...v0.1.3) - 2022-05-31
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Add `AggregateError` inspired from TC39.
|
|
12
|
+
- Add `decode` method to `Type` module to help wrapping `io-ts` `Errors` into an `Error` subclass.
|
|
13
|
+
- Add unit tests for the `set` function of the `Redis` module.
|
|
14
|
+
- Add `Has` module and enhance `ReaderTaskEither` for smart dependencies management (inspired by [Effect-TS](https://www.matechs.com/open-source)):
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// Foo.ts
|
|
18
|
+
import { TaskEither } from 'fp-ts/TaskEither'
|
|
19
|
+
import { $has, $readerTaskEither } from 'fortepiano'
|
|
20
|
+
|
|
21
|
+
export interface Foo {
|
|
22
|
+
bar(a: number): TaskEither<Error, string>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const TagFoo = $has.tag<Foo>()
|
|
26
|
+
|
|
27
|
+
export const $foo = {
|
|
28
|
+
bar: $readerTaskEither.derivesTaskEither(TagFoo, 'bar'),
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
// Bar.ts
|
|
34
|
+
import { IOEither } from 'fp-ts/IOEither'
|
|
35
|
+
import { $has, $readerTaskEither } from 'fortepiano'
|
|
36
|
+
|
|
37
|
+
export interface Bar {
|
|
38
|
+
(a: string): IOEither<Error, boolean>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const TagBar = $has.tag<Bar>()
|
|
42
|
+
|
|
43
|
+
export const bar = $readerTaskEither.deriveIOEither(TagBar)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// index.ts
|
|
48
|
+
import { $has } from 'fortepiano'
|
|
49
|
+
import { ioEither, readerTaskEither, taskEither } from 'fp-ts'
|
|
50
|
+
import { pipe } from 'fp-ts/function'
|
|
51
|
+
import { TagBar, bar } from './Bar'
|
|
52
|
+
import { $foo, TagFoo } from './Foo'
|
|
53
|
+
|
|
54
|
+
// const a: ReaderTaskEither<Has<Foo> & Has<Bar>, Error, boolean>
|
|
55
|
+
const a = pipe($foo.bar(42), readerTaskEither.chainW(bar))
|
|
56
|
+
|
|
57
|
+
// const b: TaskEither<Error, boolean>
|
|
58
|
+
const b = a(
|
|
59
|
+
// Let's mock our dependencies.
|
|
60
|
+
pipe(
|
|
61
|
+
$has.singleton(TagFoo, { bar: () => taskEither.of('foobar') }),
|
|
62
|
+
$has.upsertAt(TagBar, () => ioEither.of(true)),
|
|
63
|
+
),
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- Replace `struct` type with `Struct`.
|
|
70
|
+
- Rename `GeneratorL` module to `Yield`.
|
|
71
|
+
- Use `cause` property to record wrapped errors (inspired by TC39).
|
|
72
|
+
- Decode from Json and then from the given codec in the `get` function of the `Redis` module.
|
|
73
|
+
|
|
74
|
+
### Deprecated
|
|
75
|
+
|
|
76
|
+
- Deprecate `struct` (use `Struct` instead).
|
|
77
|
+
- Deprecate `GeneratorL` module (use `Yield` instead).
|
|
78
|
+
|
|
7
79
|
## [0.1.2](https://github.com/facile-it/fortepiano/compare/v0.1.1...v0.1.2) - 2022-04-29
|
|
8
80
|
|
|
9
81
|
### Added
|
|
@@ -26,7 +98,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
26
98
|
### Added
|
|
27
99
|
|
|
28
100
|
- Support [tree shaking](https://webpack.js.org/guides/tree-shaking/) via top-level imports:
|
|
29
|
-
```
|
|
101
|
+
```typescript
|
|
30
102
|
import { curry } from 'fortepiano/function'
|
|
31
103
|
// ...instead of `import { curry } from 'fortepiano/lib/function'`
|
|
32
104
|
```
|
package/CONTRIBUTING.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Any relevant modification to this project should be duly noted in `CHANGELOG.md`. Changelog entries should come along code patches via pull requests.
|
|
4
4
|
|
|
5
|
-
## Style
|
|
5
|
+
## Style Guide
|
|
6
6
|
|
|
7
7
|
`fortepiano` modules should mymic `fp-ts` as best as they can regarding scope, naming and structure (see [`fp-ts` code conventions](https://gcanti.github.io/fp-ts/guides/code-conventions.html)). A custom convention should be used instead for imports and exports.
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ import * as $type from './Type'
|
|
|
26
26
|
// ...instead of `import { $type } from '.'`
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Use namespace imports for io-ts and friends, to avoid collisions
|
|
29
|
+
* Use namespace imports for `io-ts` and friends, to avoid collisions
|
|
30
30
|
* and enforce consistency.
|
|
31
31
|
*/
|
|
32
32
|
import * as t from 'io-ts'
|
package/Console.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare const countReset: (a?: unknown) => IO.IO<void>;
|
|
|
12
12
|
export declare const group: (...as: ReadonlyArray<unknown>) => IO.IO<void>;
|
|
13
13
|
export declare const groupCollapsed: (...as: ReadonlyArray<unknown>) => IO.IO<void>;
|
|
14
14
|
export declare const groupEnd: IO.IO<void>;
|
|
15
|
-
export declare function table<A extends $S.
|
|
16
|
-
export declare function table(data: $S.
|
|
15
|
+
export declare function table<A extends $S.Struct, K extends keyof A>(data: ReadonlyArray<A> | RR.ReadonlyRecord<string, A>, columns?: ReadonlyArray<K>): IO.IO<void>;
|
|
16
|
+
export declare function table(data: $S.Struct | ReadonlyArray<unknown>): IO.IO<void>;
|
|
17
17
|
export declare function table(a?: undefined | boolean | number | string, ...as: ReadonlyArray<unknown>): IO.IO<void>;
|
|
18
18
|
export declare const time: (a?: unknown) => IO.IO<void>;
|
|
19
19
|
export declare const timeEnd: (a?: unknown) => IO.IO<void>;
|
package/Crypto.d.ts
CHANGED
package/Error.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as t from 'io-ts';
|
|
2
|
+
/**
|
|
3
|
+
* @see https://tc39.es/proposal-promise-any/#sec-aggregate-error-objects
|
|
4
|
+
*/
|
|
5
|
+
export declare class AggregateError extends Error {
|
|
6
|
+
readonly errors: ReadonlyArray<Error>;
|
|
7
|
+
constructor(errors: ReadonlyArray<Error>, message?: string);
|
|
8
|
+
}
|
|
2
9
|
export declare const ErrorC: t.Type<Error, string, unknown>;
|
|
3
10
|
export declare const fromUnknown: (e: Error) => (u: unknown) => Error;
|
|
4
11
|
export declare const wrap: (e: Error) => (u: unknown) => Error & {
|
|
5
|
-
readonly
|
|
12
|
+
readonly cause?: Error;
|
|
6
13
|
};
|