Skip to content

Commit

Permalink
upgrade to latest: docs-ts, prettier, typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Apr 4, 2020
1 parent ca7feee commit 12c5f51
Show file tree
Hide file tree
Showing 167 changed files with 2,732 additions and 2,442 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"semi": false,
"singleQuote": true,
"printWidth": 120
"printWidth": 120,
"trailingComma": "none"
}
27 changes: 15 additions & 12 deletions docs/modules/Applicative.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,47 +296,50 @@ Like `Functor`, `Applicative`s compose. If `F` and `G` have `Applicative` instan
**Signature**

```ts
export function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
export declare function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
F: Applicative2<F>,
G: Applicative2C<G, E>
): ApplicativeComposition22C<F, G, E>
export function getApplicativeComposition<F extends URIS2, G extends URIS2>(
export declare function getApplicativeComposition<F extends URIS2, G extends URIS2>(
F: Applicative2<F>,
G: Applicative2<G>
): ApplicativeComposition22<F, G>
export function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
export declare function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
F: Applicative2<F>,
G: Applicative2C<G, E>
): ApplicativeComposition22C<F, G, E>
export function getApplicativeComposition<F extends URIS2, G extends URIS>(
export declare function getApplicativeComposition<F extends URIS2, G extends URIS>(
F: Applicative2<F>,
G: Applicative1<G>
): ApplicativeComposition21<F, G>
export function getApplicativeComposition<F extends URIS, G extends URIS2>(
export declare function getApplicativeComposition<F extends URIS, G extends URIS2>(
F: Applicative1<F>,
G: Applicative2<G>
): ApplicativeComposition12<F, G>
export function getApplicativeComposition<F extends URIS, G extends URIS2, E>(
export declare function getApplicativeComposition<F extends URIS, G extends URIS2, E>(
F: Applicative1<F>,
G: Applicative2C<G, E>
): ApplicativeComposition12C<F, G, E>
export function getApplicativeComposition<F extends URIS, G extends URIS>(
export declare function getApplicativeComposition<F extends URIS, G extends URIS>(
F: Applicative1<F>,
G: Applicative1<G>
): ApplicativeComposition11<F, G>
export function getApplicativeComposition<F, G extends URIS2>(
export declare function getApplicativeComposition<F, G extends URIS2>(
F: Applicative<F>,
G: Applicative2<G>
): ApplicativeCompositionHKT2<F, G>
export function getApplicativeComposition<F, G extends URIS2, E>(
export declare function getApplicativeComposition<F, G extends URIS2, E>(
F: Applicative<F>,
G: Applicative2C<G, E>
): ApplicativeCompositionHKT2C<F, G, E>
export function getApplicativeComposition<F, G extends URIS>(
export declare function getApplicativeComposition<F, G extends URIS>(
F: Applicative<F>,
G: Applicative1<G>
): ApplicativeCompositionHKT1<F, G>
export function getApplicativeComposition<F, G>(F: Applicative<F>, G: Applicative<G>): ApplicativeComposition<F, G> { ... }
export declare function getApplicativeComposition<F, G>(
F: Applicative<F>,
G: Applicative<G>
): ApplicativeComposition<F, G>
```

**Example**
Expand All @@ -354,7 +357,7 @@ const y: Task<Option<number>> = task.of(some(2))
const sum = (a: number) => (b: number): number => a + b
A.ap(A.map(x, sum), y)().then(result => assert.deepStrictEqual(result, some(3)))
A.ap(A.map(x, sum), y)().then((result) => assert.deepStrictEqual(result, some(3)))
```

Added in v2.0.0
36 changes: 18 additions & 18 deletions docs/modules/Apply.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,41 +126,41 @@ Like `Apply.sequenceT` but works with structs instead of tuples.
**Signature**

```ts
export function sequenceS<F extends URIS4>(
export declare function sequenceS<F extends URIS4>(
F: Apply4<F>
): <S, R, E, NER extends Record<string, Kind4<F, S, R, E, any>>>(
r: EnforceNonEmptyRecord<NER> & Record<string, Kind4<F, S, R, E, any>>
) => Kind4<F, S, R, E, { [K in keyof NER]: [NER[K]] extends [Kind4<F, any, any, any, infer A>] ? A : never }>
export function sequenceS<F extends URIS3>(
export declare function sequenceS<F extends URIS3>(
F: Apply3<F>
): <R, E, NER extends Record<string, Kind3<F, R, E, any>>>(
r: EnforceNonEmptyRecord<NER> & Record<string, Kind3<F, R, E, any>>
) => Kind3<F, R, E, { [K in keyof NER]: [NER[K]] extends [Kind3<F, any, any, infer A>] ? A : never }>
export function sequenceS<F extends URIS3, E>(
export declare function sequenceS<F extends URIS3, E>(
F: Apply3C<F, E>
): <R, NER extends Record<string, Kind3<F, R, E, any>>>(
r: EnforceNonEmptyRecord<NER> & Record<string, Kind3<F, R, E, any>>
) => Kind3<F, R, E, { [K in keyof NER]: [NER[K]] extends [Kind3<F, any, any, infer A>] ? A : never }>
export function sequenceS<F extends URIS2>(
export declare function sequenceS<F extends URIS2>(
F: Apply2<F>
): <E, NER extends Record<string, Kind2<F, E, any>>>(
r: EnforceNonEmptyRecord<NER> & Record<string, Kind2<F, E, any>>
) => Kind2<F, E, { [K in keyof NER]: [NER[K]] extends [Kind2<F, any, infer A>] ? A : never }>
export function sequenceS<F extends URIS2, E>(
export declare function sequenceS<F extends URIS2, E>(
F: Apply2C<F, E>
): <NER extends Record<string, Kind2<F, E, any>>>(
r: EnforceNonEmptyRecord<NER>
) => Kind2<F, E, { [K in keyof NER]: [NER[K]] extends [Kind2<F, any, infer A>] ? A : never }>
export function sequenceS<F extends URIS>(
export declare function sequenceS<F extends URIS>(
F: Apply1<F>
): <NER extends Record<string, Kind<F, any>>>(
r: EnforceNonEmptyRecord<NER>
) => Kind<F, { [K in keyof NER]: [NER[K]] extends [Kind<F, infer A>] ? A : never }>
export function sequenceS<F>(
export declare function sequenceS<F>(
F: Apply<F>
): <NER extends Record<string, HKT<F, any>>>(
r: EnforceNonEmptyRecord<NER>
) => HKT<F, { [K in keyof NER]: [NER[K]] extends [HKT<F, infer A>] ? A : never }> { ... }
) => HKT<F, { [K in keyof NER]: [NER[K]] extends [HKT<F, infer A>] ? A : never }>
```

**Example**
Expand All @@ -174,14 +174,14 @@ const ado = sequenceS(either)
assert.deepStrictEqual(
ado({
a: right(1),
b: right(true)
b: right(true),
}),
right({ a: 1, b: true })
)
assert.deepStrictEqual(
ado({
a: right(1),
b: left('error')
b: left('error'),
}),
left('error')
)
Expand All @@ -196,41 +196,41 @@ Tuple sequencing, i.e., take a tuple of monadic actions and does them from left-
**Signature**

```ts
export function sequenceT<F extends URIS4>(
export declare function sequenceT<F extends URIS4>(
F: Apply4<F>
): <S, R, E, T extends Array<Kind4<F, S, R, E, any>>>(
...t: T & { readonly 0: Kind4<F, S, R, E, any> }
) => Kind4<F, S, R, E, { [K in keyof T]: [T[K]] extends [Kind4<F, S, R, E, infer A>] ? A : never }>
export function sequenceT<F extends URIS3>(
export declare function sequenceT<F extends URIS3>(
F: Apply3<F>
): <R, E, T extends Array<Kind3<F, R, E, any>>>(
...t: T & { readonly 0: Kind3<F, R, E, any> }
) => Kind3<F, R, E, { [K in keyof T]: [T[K]] extends [Kind3<F, R, E, infer A>] ? A : never }>
export function sequenceT<F extends URIS3, E>(
export declare function sequenceT<F extends URIS3, E>(
F: Apply3C<F, E>
): <R, T extends Array<Kind3<F, R, E, any>>>(
...t: T & { readonly 0: Kind3<F, R, E, any> }
) => Kind3<F, R, E, { [K in keyof T]: [T[K]] extends [Kind3<F, R, E, infer A>] ? A : never }>
export function sequenceT<F extends URIS2>(
export declare function sequenceT<F extends URIS2>(
F: Apply2<F>
): <E, T extends Array<Kind2<F, E, any>>>(
...t: T & { readonly 0: Kind2<F, E, any> }
) => Kind2<F, E, { [K in keyof T]: [T[K]] extends [Kind2<F, E, infer A>] ? A : never }>
export function sequenceT<F extends URIS2, E>(
export declare function sequenceT<F extends URIS2, E>(
F: Apply2C<F, E>
): <T extends Array<Kind2<F, E, any>>>(
...t: T & { readonly 0: Kind2<F, E, any> }
) => Kind2<F, E, { [K in keyof T]: [T[K]] extends [Kind2<F, E, infer A>] ? A : never }>
export function sequenceT<F extends URIS>(
export declare function sequenceT<F extends URIS>(
F: Apply1<F>
): <T extends Array<Kind<F, any>>>(
...t: T & { readonly 0: Kind<F, any> }
) => Kind<F, { [K in keyof T]: [T[K]] extends [Kind<F, infer A>] ? A : never }>
export function sequenceT<F>(
export declare function sequenceT<F>(
F: Apply<F>
): <T extends Array<HKT<F, any>>>(
...t: T & { readonly 0: HKT<F, any> }
) => HKT<F, { [K in keyof T]: [T[K]] extends [HKT<F, infer A>] ? A : never }> { ... }
) => HKT<F, { [K in keyof T]: [T[K]] extends [HKT<F, infer A>] ? A : never }>
```

**Example**
Expand Down
Loading

0 comments on commit 12c5f51

Please sign in to comment.