From eec9a6d13906be6e8aaf8c32b49f645535c35759 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 24 Mar 2023 08:42:45 -0700 Subject: [PATCH] fix: export interface version of HttpException --- packages/nextlove/src/types/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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[]