X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FJsonType.ts;h=17db232c50cb7c55ec21d80cb0aacd1137010415;hb=6c0215d2bf5a098aceed9e9d94d75d50ff2630db;hp=79670c9a5c894e4a63643a93d149cd0b625c1239;hpb=a6243c35f4df13144b5e56474ed7e93e4096ecc2;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/JsonType.ts b/src/types/JsonType.ts index 79670c9a..17db232c 100644 --- a/src/types/JsonType.ts +++ b/src/types/JsonType.ts @@ -1,8 +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