TypeScript JSON type
28 Sep, 2023
👋 FYI, this note is over 6 months old. Some of the content may be out of date.
type JSONValue =
| string
| number
| boolean
| null
| JSONValue[]
| { [key: string]: JSONValue }
interface JSONObject {
[k: string]: JSONValue
}
interface JSONArray extends Array<JSONValue> {}
← Back home