docs: fix README.md formatting
[e-mobility-charging-stations-simulator.git] / src / types / JsonType.ts
index 2bd219f40ab9f982961ac5774596f5398ae0d353..17db232c50cb7c55ec21d80cb0aacd1137010415 100644 (file)
@@ -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<string | number | boolean | Date | JsonType | JsonArray>;
+export type JsonType = JsonPrimitive | JsonType[] | JsonObject