@snailicide/build-config / tsconfig / JsonObject
JsonObject
ts
type JsonObject = { [Key in string]: JsonValue } & { [Key in string]?: JsonValue };Defined in: node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/basic.d.ts:45
Matches a JSON object.
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: jsonObject as unknown as CustomResponse. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: interface CustomResponse extends JsonObject { … }.