fix(ui): refresh add charging stations button on UI server switch
[e-mobility-charging-stations-simulator.git] / src / types / JsonType.ts
index 8ed02231f04d94fc942e2fdb8c30f9fc443be19a..17db232c50cb7c55ec21d80cb0aacd1137010415 100644 (file)
@@ -1,7 +1,7 @@
-export interface JsonType {
-  [key: string]: JsonValue;
-}
+type JsonPrimitive = string | number | boolean | Date | null
 
-type JsonArray = Array<JsonValue>;
+export type JsonObject = {
+  [key in string]?: JsonType
+}
 
-type JsonValue = string | number | boolean | Date | JsonType | JsonArray;
+export type JsonType = JsonPrimitive | JsonType[] | JsonObject