forked from ahrefs/atd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheverything.atd
37 lines (32 loc) · 834 Bytes
/
everything.atd
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
type different_kinds_of_things = [
| Root (* class name conflict *)
| Thing of int
| WOW <json name="wow">
| Amaze <json name="!!!"> of string list
]
(* TS keyword *)
type this = int
type root = {
id <json name="ID">: string;
this: this;
items: int list list;
?maybe: int option;
~extras: int list;
~answer <ts default="42">: int;
aliased: alias;
point: (float * float);
kinds: different_kinds_of_things list;
assoc1: (float * int) list;
assoc2: (string * int) list <json repr="object">;
assoc3: (float * int) list <ts repr="map">;
assoc4: (string * int) list <json repr="object"> <ts repr="map">;
~options: int option list;
~nullables: int nullable list;
untyped_things: abstract list;
foo: foo nullable;
}
type alias = int list
type pair = (string * int)
type foo = {
foo: string;
}