• 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.

    Parameters

    Returns IHttpEndpoint

    The same endpoint configuration object with inferred types.

    defineHttpEndpoint({
    url: "/users/:id",
    method: "GET",
    handler: async ({ req }) => { ... },
    });

    IMPORT_PATH: "@daiso-tech/core/http-router/contracts"