tiny-types
Version:
A tiny library that brings Tiny Types to JavaScript and TypeScript
10 lines (9 loc) • 353 B
TypeScript
export type Null = null;
export type NonNullJSONPrimitive = string | number | boolean;
export type JSONPrimitive = NonNullJSONPrimitive | Null;
export interface JSONObject {
[_: string]: JSONPrimitive | JSONObject | JSONArray;
}
export interface JSONArray extends Array<JSONValue> {
}
export type JSONValue = JSONPrimitive | JSONObject | JSONArray;