Skip to content

Commit 12c5f51

Browse files
committed
upgrade to latest: docs-ts, prettier, typescript
1 parent ca7feee commit 12c5f51

File tree

167 files changed

+2732
-2442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+2732
-2442
lines changed

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"semi": false,
33
"singleQuote": true,
4-
"printWidth": 120
4+
"printWidth": 120,
5+
"trailingComma": "none"
56
}

docs/modules/Applicative.ts.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,47 +296,50 @@ Like `Functor`, `Applicative`s compose. If `F` and `G` have `Applicative` instan
296296
**Signature**
297297

298298
```ts
299-
export function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
299+
export declare function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
300300
F: Applicative2<F>,
301301
G: Applicative2C<G, E>
302302
): ApplicativeComposition22C<F, G, E>
303-
export function getApplicativeComposition<F extends URIS2, G extends URIS2>(
303+
export declare function getApplicativeComposition<F extends URIS2, G extends URIS2>(
304304
F: Applicative2<F>,
305305
G: Applicative2<G>
306306
): ApplicativeComposition22<F, G>
307-
export function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
307+
export declare function getApplicativeComposition<F extends URIS2, G extends URIS2, E>(
308308
F: Applicative2<F>,
309309
G: Applicative2C<G, E>
310310
): ApplicativeComposition22C<F, G, E>
311-
export function getApplicativeComposition<F extends URIS2, G extends URIS>(
311+
export declare function getApplicativeComposition<F extends URIS2, G extends URIS>(
312312
F: Applicative2<F>,
313313
G: Applicative1<G>
314314
): ApplicativeComposition21<F, G>
315-
export function getApplicativeComposition<F extends URIS, G extends URIS2>(
315+
export declare function getApplicativeComposition<F extends URIS, G extends URIS2>(
316316
F: Applicative1<F>,
317317
G: Applicative2<G>
318318
): ApplicativeComposition12<F, G>
319-
export function getApplicativeComposition<F extends URIS, G extends URIS2, E>(
319+
export declare function getApplicativeComposition<F extends URIS, G extends URIS2, E>(
320320
F: Applicative1<F>,
321321
G: Applicative2C<G, E>
322322
): ApplicativeComposition12C<F, G, E>
323-
export function getApplicativeComposition<F extends URIS, G extends URIS>(
323+
export declare function getApplicativeComposition<F extends URIS, G extends URIS>(
324324
F: Applicative1<F>,
325325
G: Applicative1<G>
326326
): ApplicativeComposition11<F, G>
327-
export function getApplicativeComposition<F, G extends URIS2>(
327+
export declare function getApplicativeComposition<F, G extends URIS2>(
328328
F: Applicative<F>,
329329
G: Applicative2<G>
330330
): ApplicativeCompositionHKT2<F, G>
331-
export function getApplicativeComposition<F, G extends URIS2, E>(
331+
export declare function getApplicativeComposition<F, G extends URIS2, E>(
332332
F: Applicative<F>,
333333
G: Applicative2C<G, E>
334334
): ApplicativeCompositionHKT2C<F, G, E>
335-
export function getApplicativeComposition<F, G extends URIS>(
335+
export declare function getApplicativeComposition<F, G extends URIS>(
336336
F: Applicative<F>,
337337
G: Applicative1<G>
338338
): ApplicativeCompositionHKT1<F, G>
339-
export function getApplicativeComposition<F, G>(F: Applicative<F>, G: Applicative<G>): ApplicativeComposition<F, G> { ... }
339+
export declare function getApplicativeComposition<F, G>(
340+
F: Applicative<F>,
341+
G: Applicative<G>
342+
): ApplicativeComposition<F, G>
340343
```
341344

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

360363
Added in v2.0.0

docs/modules/Apply.ts.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,41 +126,41 @@ Like `Apply.sequenceT` but works with structs instead of tuples.
126126
**Signature**
127127

128128
```ts
129-
export function sequenceS<F extends URIS4>(
129+
export declare function sequenceS<F extends URIS4>(
130130
F: Apply4<F>
131131
): <S, R, E, NER extends Record<string, Kind4<F, S, R, E, any>>>(
132132
r: EnforceNonEmptyRecord<NER> & Record<string, Kind4<F, S, R, E, any>>
133133
) => Kind4<F, S, R, E, { [K in keyof NER]: [NER[K]] extends [Kind4<F, any, any, any, infer A>] ? A : never }>
134-
export function sequenceS<F extends URIS3>(
134+
export declare function sequenceS<F extends URIS3>(
135135
F: Apply3<F>
136136
): <R, E, NER extends Record<string, Kind3<F, R, E, any>>>(
137137
r: EnforceNonEmptyRecord<NER> & Record<string, Kind3<F, R, E, any>>
138138
) => Kind3<F, R, E, { [K in keyof NER]: [NER[K]] extends [Kind3<F, any, any, infer A>] ? A : never }>
139-
export function sequenceS<F extends URIS3, E>(
139+
export declare function sequenceS<F extends URIS3, E>(
140140
F: Apply3C<F, E>
141141
): <R, NER extends Record<string, Kind3<F, R, E, any>>>(
142142
r: EnforceNonEmptyRecord<NER> & Record<string, Kind3<F, R, E, any>>
143143
) => Kind3<F, R, E, { [K in keyof NER]: [NER[K]] extends [Kind3<F, any, any, infer A>] ? A : never }>
144-
export function sequenceS<F extends URIS2>(
144+
export declare function sequenceS<F extends URIS2>(
145145
F: Apply2<F>
146146
): <E, NER extends Record<string, Kind2<F, E, any>>>(
147147
r: EnforceNonEmptyRecord<NER> & Record<string, Kind2<F, E, any>>
148148
) => Kind2<F, E, { [K in keyof NER]: [NER[K]] extends [Kind2<F, any, infer A>] ? A : never }>
149-
export function sequenceS<F extends URIS2, E>(
149+
export declare function sequenceS<F extends URIS2, E>(
150150
F: Apply2C<F, E>
151151
): <NER extends Record<string, Kind2<F, E, any>>>(
152152
r: EnforceNonEmptyRecord<NER>
153153
) => Kind2<F, E, { [K in keyof NER]: [NER[K]] extends [Kind2<F, any, infer A>] ? A : never }>
154-
export function sequenceS<F extends URIS>(
154+
export declare function sequenceS<F extends URIS>(
155155
F: Apply1<F>
156156
): <NER extends Record<string, Kind<F, any>>>(
157157
r: EnforceNonEmptyRecord<NER>
158158
) => Kind<F, { [K in keyof NER]: [NER[K]] extends [Kind<F, infer A>] ? A : never }>
159-
export function sequenceS<F>(
159+
export declare function sequenceS<F>(
160160
F: Apply<F>
161161
): <NER extends Record<string, HKT<F, any>>>(
162162
r: EnforceNonEmptyRecord<NER>
163-
) => HKT<F, { [K in keyof NER]: [NER[K]] extends [HKT<F, infer A>] ? A : never }> { ... }
163+
) => HKT<F, { [K in keyof NER]: [NER[K]] extends [HKT<F, infer A>] ? A : never }>
164164
```
165165

166166
**Example**
@@ -174,14 +174,14 @@ const ado = sequenceS(either)
174174
assert.deepStrictEqual(
175175
ado({
176176
a: right(1),
177-
b: right(true)
177+
b: right(true),
178178
}),
179179
right({ a: 1, b: true })
180180
)
181181
assert.deepStrictEqual(
182182
ado({
183183
a: right(1),
184-
b: left('error')
184+
b: left('error'),
185185
}),
186186
left('error')
187187
)
@@ -196,41 +196,41 @@ Tuple sequencing, i.e., take a tuple of monadic actions and does them from left-
196196
**Signature**
197197

198198
```ts
199-
export function sequenceT<F extends URIS4>(
199+
export declare function sequenceT<F extends URIS4>(
200200
F: Apply4<F>
201201
): <S, R, E, T extends Array<Kind4<F, S, R, E, any>>>(
202202
...t: T & { readonly 0: Kind4<F, S, R, E, any> }
203203
) => Kind4<F, S, R, E, { [K in keyof T]: [T[K]] extends [Kind4<F, S, R, E, infer A>] ? A : never }>
204-
export function sequenceT<F extends URIS3>(
204+
export declare function sequenceT<F extends URIS3>(
205205
F: Apply3<F>
206206
): <R, E, T extends Array<Kind3<F, R, E, any>>>(
207207
...t: T & { readonly 0: Kind3<F, R, E, any> }
208208
) => Kind3<F, R, E, { [K in keyof T]: [T[K]] extends [Kind3<F, R, E, infer A>] ? A : never }>
209-
export function sequenceT<F extends URIS3, E>(
209+
export declare function sequenceT<F extends URIS3, E>(
210210
F: Apply3C<F, E>
211211
): <R, T extends Array<Kind3<F, R, E, any>>>(
212212
...t: T & { readonly 0: Kind3<F, R, E, any> }
213213
) => Kind3<F, R, E, { [K in keyof T]: [T[K]] extends [Kind3<F, R, E, infer A>] ? A : never }>
214-
export function sequenceT<F extends URIS2>(
214+
export declare function sequenceT<F extends URIS2>(
215215
F: Apply2<F>
216216
): <E, T extends Array<Kind2<F, E, any>>>(
217217
...t: T & { readonly 0: Kind2<F, E, any> }
218218
) => Kind2<F, E, { [K in keyof T]: [T[K]] extends [Kind2<F, E, infer A>] ? A : never }>
219-
export function sequenceT<F extends URIS2, E>(
219+
export declare function sequenceT<F extends URIS2, E>(
220220
F: Apply2C<F, E>
221221
): <T extends Array<Kind2<F, E, any>>>(
222222
...t: T & { readonly 0: Kind2<F, E, any> }
223223
) => Kind2<F, E, { [K in keyof T]: [T[K]] extends [Kind2<F, E, infer A>] ? A : never }>
224-
export function sequenceT<F extends URIS>(
224+
export declare function sequenceT<F extends URIS>(
225225
F: Apply1<F>
226226
): <T extends Array<Kind<F, any>>>(
227227
...t: T & { readonly 0: Kind<F, any> }
228228
) => Kind<F, { [K in keyof T]: [T[K]] extends [Kind<F, infer A>] ? A : never }>
229-
export function sequenceT<F>(
229+
export declare function sequenceT<F>(
230230
F: Apply<F>
231231
): <T extends Array<HKT<F, any>>>(
232232
...t: T & { readonly 0: HKT<F, any> }
233-
) => HKT<F, { [K in keyof T]: [T[K]] extends [HKT<F, infer A>] ? A : never }> { ... }
233+
) => HKT<F, { [K in keyof T]: [T[K]] extends [HKT<F, infer A>] ? A : never }>
234234
```
235235

236236
**Example**

0 commit comments

Comments
 (0)