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