X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FJsonType.ts;h=17db232c50cb7c55ec21d80cb0aacd1137010415;hb=55ae7b758f478a2beb4557bbc96363fb913dcc73;hp=8ed02231f04d94fc942e2fdb8c30f9fc443be19a;hpb=122d9243eeb1a125dab68b6ab681f544e65dfbbb;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/JsonType.ts b/src/types/JsonType.ts index 8ed02231..17db232c 100644 --- a/src/types/JsonType.ts +++ b/src/types/JsonType.ts @@ -1,7 +1,7 @@ -export interface JsonType { - [key: string]: JsonValue; -} +type JsonPrimitive = string | number | boolean | Date | null -type JsonArray = Array; +export type JsonObject = { + [key in string]?: JsonType +} -type JsonValue = string | number | boolean | Date | JsonType | JsonArray; +export type JsonType = JsonPrimitive | JsonType[] | JsonObject