Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1x 1x | // https://stackoverflow.com/a/64117261
export type JSONPrimitive = string | number | boolean | null;
export type JSONArray = Array<JSONValue>;
export interface JSONObject {
[k: string]: JSONValue;
}
export type JSONValue = JSONPrimitive | JSONArray | JSONObject;
/** @deprecated Default exports are not best practice */
export default JSONValue;
export function isJSONPrimitive(value: unknown): value is JSONPrimitive {
return (
value === null ||
typeof value === 'string' ||
typeof value === 'number' ||
typeof value === 'boolean'
);
}
|