Merge pull request #4959 from backstage/freben/json

Reformulate the json types to break type recursion
This commit is contained in:
Fredrik Adelöw
2021-03-15 23:01:23 +01:00
committed by GitHub
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;