X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FJsonType.ts;h=17db232c50cb7c55ec21d80cb0aacd1137010415;hb=48c7e1d6db4b3cbf82d17e191b2255066c462a71;hp=846eb7639597bd518cb2fb736674bd1e50b11848;hpb=baba027e2c34ff68ccb4d39f62de23428c9996ad;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/JsonType.ts b/src/types/JsonType.ts index 846eb763..17db232c 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 -type JsonValue = string | number | boolean | Date | JsonType | JsonArray; - -export interface JsonType { - [key: string]: JsonValue; +export type JsonObject = { + [key in string]?: JsonType } + +export type JsonType = JsonPrimitive | JsonType[] | JsonObject