Better Typing and Optimizations

This commit is contained in:
2023-12-29 07:03:08 -03:00
parent 83fd8f0f2c
commit 567308ebfb
21 changed files with 105 additions and 145 deletions

View File

@@ -1,7 +1,12 @@
export interface HttpError {
title: string;
status: number;
details: string;
developerMessage: string;
timestamp: string;
}
import { Type, type Static } from '@sinclair/typebox'
export const HttpError = Type.Object({
title: Type.String(),
status: Type.Number(),
details: Type.String(),
developerMessage: Type.String(),
timestamp: Type.String()
});
export type HttpError = Static<typeof HttpError>;