X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FJsonType.ts;h=17db232c50cb7c55ec21d80cb0aacd1137010415;hb=6c0215d2bf5a098aceed9e9d94d75d50ff2630db;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..17db232c 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 + +export type JsonObject = { + [key in string]?: JsonType } -type JsonArray = Array; +export type JsonType = JsonPrimitive | JsonType[] | JsonObject