forked from Effect-TS/data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HKT.ts
44 lines (40 loc) · 746 Bytes
/
HKT.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @since 1.0.0
*/
/**
* @since 1.0.0
*/
export declare const URI: unique symbol
/**
* @since 1.0.0
*/
export interface TypeClass<F extends TypeLambda> {
readonly [URI]?: F
}
/**
* @since 1.0.0
*/
export interface TypeLambda {
readonly In: unknown
readonly Out2: unknown
readonly Out1: unknown
readonly Target: unknown
}
/**
* @since 1.0.0
*/
export type Kind<F extends TypeLambda, In, Out2, Out1, Target> = F extends {
readonly type: unknown
} ? (F & {
readonly In: In
readonly Out2: Out2
readonly Out1: Out1
readonly Target: Target
})["type"]
: {
readonly F: F
readonly In: (_: In) => void
readonly Out2: () => Out2
readonly Out1: () => Out1
readonly Target: (_: Target) => Target
}