(options: {
readonly method: HttpMethod.HttpMethod | "*"
readonly path: PathInput
readonly handler: Effect.Effect<HttpServerResponse.HttpServerResponse, E, R>
readonly uninterruptible?: boolean | undefined
readonly prefix?: Option.Option<string> | string | undefined
})
| 642 | } |
| 643 | |
| 644 | const makeRoute = <E, R>(options: { |
| 645 | readonly method: HttpMethod.HttpMethod | "*" |
| 646 | readonly path: PathInput |
| 647 | readonly handler: Effect.Effect<HttpServerResponse.HttpServerResponse, E, R> |
| 648 | readonly uninterruptible?: boolean | undefined |
| 649 | readonly prefix?: Option.Option<string> | string | undefined |
| 650 | }): Route<E, Exclude<R, Provided>> => (({ |
| 651 | ...options, |
| 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. |
no test coverage detected