X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FJsonType.ts;h=256f0f42f7c76b7fccb1e16b2cb70921391c3534;hb=32c4b77bdc1c2d53bb2c37dd363d091816178190;hp=8908b7815a9f64e53433dc6d67a18cb846732015;hpb=a95873d8d308a20a7151346ac70d9a551f1a06f5;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/JsonType.ts b/src/types/JsonType.ts index 8908b781..256f0f42 100644 --- a/src/types/JsonType.ts +++ b/src/types/JsonType.ts @@ -1,7 +1,7 @@ -type JsonArray = Array; +type JsonPrimitive = string | number | boolean | Date | null; -export type JsonValue = string | number | boolean | Date | JsonType | JsonArray; +export type JsonObject = { + [key in string]?: JsonType; +}; -export interface JsonType { - [key: string]: JsonValue; -} +export type JsonType = JsonPrimitive | JsonType[] | JsonObject;