Fix Json type definition naming
[e-mobility-charging-stations-simulator.git] / src / types / JsonType.ts
index 8908b7815a9f64e53433dc6d67a18cb846732015..5b6c9f6fc4184e019288b02caa3366d3e8d8160b 100644 (file)
@@ -1,7 +1,7 @@
-type JsonArray = Array<JsonValue>;
+type JsonPrimitive = string | number | boolean | Date | null;
 
-export type JsonValue = string | number | boolean | Date | JsonType | JsonArray;
+export type JsonObject = {
+  [key in string]: JsonType;
+};
 
-export interface JsonType {
-  [key: string]: JsonValue;
-}
+export type JsonType = JsonPrimitive | JsonType[] | JsonObject;