(
method: "*" | HttpMethod.HttpMethod,
path: PathInput,
handler:
| HttpServerResponse.HttpServerResponse
| Effect.Effect<HttpServerResponse.HttpServerResponse, E, R>
| ((request: HttpServerRequest.HttpServerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, E, R>),
options?: {
readonly uninterruptible?: boolean | undefined
}
)
| 652 | uninterruptible: options.uninterruptible ?? false, |
| 653 | prefix: typeof options.prefix === "string" ? Option.some(options.prefix) : options.prefix ?? Option.none(), |
| 654 | [RouteTypeId]: RouteTypeId |
| 655 | }) as Route<E, Exclude<R, Provided>>) |
| 656 | |
| 657 | /** |
| 658 | * Constructs a `Route` from an HTTP method, path, and handler. |
| 659 | * |
| 660 | * **Details** |
| 661 | * |
| 662 | * The handler may be a static response, an effect that produces a response, or a |
| 663 | * function from the current request to a response effect. Set `uninterruptible` to |
| 664 | * prevent the route handler from being made interruptible while it runs. |
| 665 | * |
| 666 | * @category routes |
| 667 | * @since 4.0.0 |
| 668 | */ |
| 669 | export const route = <E = never, R = never>( |
| 670 | method: "*" | HttpMethod.HttpMethod, |
| 671 | path: PathInput, |
| 672 | handler: |
| 673 | | HttpServerResponse.HttpServerResponse |
| 674 | | Effect.Effect<HttpServerResponse.HttpServerResponse, E, R> |
| 675 | | ((request: HttpServerRequest.HttpServerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, E, R>), |
| 676 | options?: { |
| 677 | readonly uninterruptible?: boolean | undefined |
| 678 | } |
no test coverage detected
searching dependent graphs…