-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.ts
48 lines (45 loc) · 1.29 KB
/
index.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
45
46
47
48
import { types as mstTypes } from "mobx-state-tree";
import { array } from "./array";
import { compose } from "./compose";
import { custom } from "./custom";
import { enumeration } from "./enumeration";
import { frozen } from "./frozen";
import { late } from "./late";
import { map } from "./map";
import { maybe, maybeNull } from "./maybe";
import { model } from "./model";
import { optional } from "./optional";
import { reference, safeReference } from "./reference";
import { refinement } from "./refinement";
import { DateType, IntegerType, NullType, SimpleType, literal } from "./simple";
import { lazyUnion, union } from "./union";
export * from "./api";
export * from "./types";
export { $type } from "./symbols";
export { setDefaultShouldEmitPatchOnChange } from "./class-model";
export const types = {
boolean: SimpleType.for("boolean", mstTypes.boolean),
Date: new DateType(mstTypes.Date),
identifier: SimpleType.for("string", mstTypes.identifier),
integer: new IntegerType(),
literal,
null: new NullType(),
number: SimpleType.for("number", mstTypes.number),
string: SimpleType.for("string", mstTypes.string),
array,
compose,
custom,
enumeration,
frozen,
late,
lazyUnion,
map,
maybe,
maybeNull,
model,
optional,
reference,
refinement,
safeReference,
union,
};