Reformulate the json types to break type recursion

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-03-15 21:32:29 +01:00
parent 5f46e1e6d0
commit 0434853a56
3 changed files with 10 additions and 9 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/config': patch
---
Reformulate the json types to break type recursion
+2 -1
View File
@@ -14,11 +14,12 @@
* limitations under the License.
*/
export { ConfigReader } from './reader';
export type {
AppConfig,
Config,
JsonArray,
JsonObject,
JsonPrimitive,
JsonValue,
} from './types';
export { ConfigReader } from './reader';
+3 -8
View File
@@ -14,15 +14,10 @@
* limitations under the License.
*/
export type JsonPrimitive = number | string | boolean | null;
export type JsonObject = { [key in string]?: JsonValue };
export type JsonArray = JsonValue[];
export type JsonValue =
| JsonObject
| JsonArray
| number
| string
| boolean
| null;
export interface JsonArray extends Array<JsonValue> {}
export type JsonValue = JsonObject | JsonArray | JsonPrimitive;
export type AppConfig = {
context: string;