21 lines
287 B
TypeScript
21 lines
287 B
TypeScript
type JSONValue =
|
|
| string
|
|
| number
|
|
| boolean
|
|
| JSONObject
|
|
| JSONArray;
|
|
|
|
type JSONArray = Array<JSONValue>;
|
|
|
|
type Maybe<T> = {
|
|
just: T,
|
|
error: null,
|
|
} | {
|
|
just: null,
|
|
error: { message: string },
|
|
};
|
|
|
|
interface JSONObject {
|
|
[x: string]: JSONValue;
|
|
}
|