Skip to content

Instantly share code, notes, and snippets.

@iansan5653
Created February 11, 2020 21:10
Show Gist options
  • Save iansan5653/3ad4b3f180bf8e8863c5e3e3ee373d8d to your computer and use it in GitHub Desktop.
Save iansan5653/3ad4b3f180bf8e8863c5e3e3ee373d8d to your computer and use it in GitHub Desktop.
Typescript types for parsed JSON data
/** Any allowed JSON member value. */
export type JSONValue =
| string
| number
| boolean
| null
| JSONValue[]
| {[key: string]: JSONValue};
/** The generic result of parsing any valid JSON data. */
export type ParsedJSON = Record<string, JSONValue>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment