From e541931eeb62cedc700da66e28f140535e59dad4 Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Fri, 12 Nov 2021 17:03:30 -0600 Subject: [PATCH] fix: loosen JsonObject definition to include undefined A temporary workaround https://github.com/sindresorhus/serialize-error/issues/52 --- src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index 11449af..4a836f6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2,7 +2,7 @@ import type { AsyncLocalStorage, } from 'async_hooks'; -export type JsonObject = { [key: string]: JsonValue, }; +export type JsonObject = { [Key in string]?: JsonValue }; export type JsonValue = JsonObject | JsonValue[] | boolean | number | string | null;