Better Typing and Optimizations
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user