diff --git a/lib/httpError.d.ts b/lib/httpError.d.ts index f754dbc..aa06921 100644 --- a/lib/httpError.d.ts +++ b/lib/httpError.d.ts @@ -1,10 +1,11 @@ export declare class HttpError extends Error { - status: N; - statusCode: N; - expose: boolean; + status: N + statusCode: N + expose: boolean headers?: { [key: string]: string; }; + [key: string]: any; } diff --git a/package.json b/package.json index 1480c6e..7ef4753 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@fastify/pre-commit": "^2.1.0", "@types/node": "^22.0.0", "fastify": "^5.0.0", - "neostandard": "^0.11.9", + "neostandard": "^0.12.0", "tap": "^18.7.1", "tsd": "^0.31.0" }, diff --git a/types/index.d.ts b/types/index.d.ts index ff5cfe8..a656865 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,5 +1,5 @@ -import { FastifyPluginCallback, FastifyReply } from 'fastify' -import { HttpErrors, HttpError } from "../lib/httpError" +import { FastifyPluginCallback, FastifyReply } from 'fastify' +import { HttpErrors, HttpError } from '../lib/httpError' import * as Errors from '../lib/httpError' type FastifySensible = FastifyPluginCallback @@ -89,11 +89,11 @@ declare namespace fastifySensible { sharedSchemaId?: string; } - export { HttpError }; + export { HttpError } - export type HttpErrors = Errors.HttpErrors; - export type HttpErrorCodes = Errors.HttpErrorCodes; - export type HttpErrorNames = Errors.HttpErrorNames; + export type HttpErrors = Errors.HttpErrors + export type HttpErrorCodes = Errors.HttpErrorCodes + export type HttpErrorNames = Errors.HttpErrorNames export const httpErrors: typeof Errors.default