type JSONPrimitive = string | number | boolean | null | undefined; type JSONValue = JSONPrimitive | JSONValue[] | { [key: string]: JSONValue; }; export type JSONCompatible = unknown extends T ? never : { [P in keyof T]: T[P] extends JSONValue ? T[P] : T[P] extends NotAssignableToJson ? never : JSONCompatible; }; type NotAssignableToJson = bigint | symbol | Function; export type CustomMetadataType = { [key: string]: JSONValue; }; export {};