X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FJsonType.ts;h=5b6c9f6fc4184e019288b02caa3366d3e8d8160b;hb=0d8852a590c91d7d24509d6c24defe4e56004f9c;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..5b6c9f6f 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;