1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import { Eq } from 'fp-ts/lib/Eq'
|
11 | import * as O from 'fp-ts/lib/Option'
|
12 | import { ReadonlyRecord } from 'fp-ts/lib/ReadonlyRecord'
|
13 | import { Iso } from './Iso'
|
14 | import { Lens } from './Lens'
|
15 | import Option = O.Option
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export interface At<S, I, A> {
|
21 | readonly at: (i: I) => Lens<S, A>
|
22 | }
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare const at: <S, I, A>(at: At<S, I, A>['at']) => At<S, I, A>
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | export declare const fromIso: <T, S>(iso: Iso<T, S>) => <I, A>(sia: At<S, I, A>) => At<T, I, A>
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | export declare const atReadonlyRecord: <A = never>() => At<ReadonlyRecord<string, A>, string, Option<A>>
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | export declare const atReadonlyMap: <K>(E: Eq<K>) => <A = never>() => At<ReadonlyMap<K, A>, K, O.Option<A>>
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare const atReadonlySet: <A>(E: Eq<A>) => At<ReadonlySet<A>, A, boolean>
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | export declare const atRecord: <A = never>() => At<ReadonlyRecord<string, A>, string, Option<A>>
|