UNPKG

702 BPlain TextView Raw
1// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved.
2// Node module: @loopback/context
3// This file is licensed under the MIT License.
4// License text available at https://opensource.org/licenses/MIT
5
6/**
7 * Type definition for JSON types
8 */
9
10/**
11 * JSON primitive types:
12 * - string
13 * - number
14 * - boolean
15 * - null
16 */
17export type JSONPrimitive = string | number | boolean | null;
18
19/**
20 * JSON values
21 * - primitive
22 * - object
23 * - array
24 */
25export type JSONValue = JSONPrimitive | JSONObject | JSONArray;
26
27/**
28 * JSON object
29 */
30export interface JSONObject extends Record<string, JSONValue> {}
31
32/**
33 * JSON array
34 */
35export interface JSONArray extends Array<JSONValue> {}