(
api: HttpApi.HttpApi<Id, Groups>,
options?: {
readonly path?: `/${string}` | undefined
}
)
| 57 | * @since 4.0.0 |
| 58 | */ |
| 59 | export const layer = <Id extends string, Groups extends HttpApiGroup.Constraint>( |
| 60 | api: HttpApi.HttpApi<Id, Groups>, |
| 61 | options?: { |
| 62 | readonly path?: `/${string}` | undefined |
| 63 | } |
| 64 | ): Layer.Layer<never, never, HttpRouter.HttpRouter> => |
| 65 | HttpRouter.use(Effect.fnUntraced(function*(router) { |
| 66 | const handler = makeHandler({ api }) |
| 67 | yield* router.add("GET", options?.path ?? "/docs", handler) |
| 68 | })) |
nothing calls this directly
no test coverage detected