type ParsedResponse<T extends Record<string, unknown> = never> = Omit<
NextApiResponse,
'json'
> & {json: (obj: T) => void}
export interface NextApiResponseService<T extends Record<string, unknown>> {
readonly response: ParsedResponse<T>
}
export const NextApiResponseService = Context.Tag<NextApiResponseService>(// <-- this requires a generic, but not sure how to get it one
'@home/NextApiResponseService',
)
type ParsedResponse<T extends Record<string, unknown> = never> = Omit<
NextApiResponse,
'json'
> & {json: (obj: T) => void}
export interface NextApiResponseService<T extends Record<string, unknown>> {
readonly response: ParsedResponse<T>
}
export const NextApiResponseService = Context.Tag<NextApiResponseService>(// <-- this requires a generic, but not sure how to get it one
'@home/NextApiResponseService',
)