A helper function that creates a typed IHttpEndpoint definition. Use this function to get full type inference for request data, files, and cookie data when defining inline endpoint objects.
The endpoint configuration object.
The same endpoint configuration object with inferred types.
defineHttpEndpoint({ url: "/users/:id", method: "GET", handler: async ({ req }) => { ... },}); Copy
defineHttpEndpoint({ url: "/users/:id", method: "GET", handler: async ({ req }) => { ... },});
IMPORT_PATH: "@daiso-tech/core/http-router/contracts"
"@daiso-tech/core/http-router/contracts"
A helper function that creates a typed IHttpEndpoint definition. Use this function to get full type inference for request data, files, and cookie data when defining inline endpoint objects.