diff --git a/packages/nextlove/src/types/index.ts b/packages/nextlove/src/types/index.ts index 18f9edfc8..435a67c6a 100644 --- a/packages/nextlove/src/types/index.ts +++ b/packages/nextlove/src/types/index.ts @@ -1,9 +1,15 @@ import { NextApiResponse, NextApiRequest } from "next" import { Middleware as WrapperMiddleware } from "nextjs-middleware-wrappers" +import { HttpException } from "nextjs-exception-middleware" import { z } from "zod" import { HTTPMethods } from "../with-route-spec/middlewares/with-methods" import { SecuritySchemeObject, SecurityRequirementObject } from "openapi3-ts" +/** Export an interface version of HttpException to avoid class inheritance issues */ +export interface IHttpException + /** Omitting metadata properties from base level attributes, TS is getting them confused */ + extends Omit {} + export type Middleware = WrapperMiddleware & { securitySchema?: SecuritySchemeObject securityObjects?: SecurityRequirementObject[]