API Reference
@routar/core
| Export | Description |
|---|---|
endpoint() | Define a single typed endpoint |
defineRouter() | Group endpoints under a URL prefix |
createApi() | Build a typed API client from executor + router |
createExecutor() | Wrap a transport function with plugins |
dispatchExecutor() | Select a transport per request at runtime |
createFetchExecutor() | Built-in fetch executor |
HttpError | Thrown by createFetchExecutor on non-2xx responses |
definePlugin | Create a custom executor plugin |
logger | Built-in logging plugin |
TimeoutError | Thrown when a createFetchExecutor timeout fires |
ValidationError | Thrown when request/response validation fails |
ApiTypes<TApi> | Utility type to extract request/response types from an API client |
PathParams<TPath> | Utility type to extract :param names from a path |
Last updated on