MCPcopy Index your code
hub / github.com/Effect-TS/effect / constructor

Method constructor

packages/platform/src/internal/httpRouter.ts:170–185  ·  view source on GitHub ↗
(
    readonly routes: Chunk.Chunk<Router.Route<E, R>>,
    readonly mounts: Chunk.Chunk<
      readonly [
        prefix: string,
        httpApp: App.Default<E, R>,
        options?: { readonly includePrefix?: boolean | undefined } | undefined
      ]
    >
  )

Source from the content-addressed store, hash-verified

168> implements Router.HttpRouter<E, R> {
169 readonly [TypeId]: Router.TypeId
170 constructor(
171 readonly routes: Chunk.Chunk<Router.Route<E, R>>,
172 readonly mounts: Chunk.Chunk<
173 readonly [
174 prefix: string,
175 httpApp: App.Default<E, R>,
176 options?: { readonly includePrefix?: boolean | undefined } | undefined
177 ]
178 >
179 ) {
180 super()
181 this[TypeId] = TypeId
182 this.httpApp = toHttpApp(this).pipe(
183 Effect.flatMap((app) => this.httpApp = app as any)
184 ) as any
185 }
186 private httpApp: Effect.Effect<
187 ServerResponse.HttpServerResponse,
188 E | Error.RouteNotFound,

Callers

nothing calls this directly

Calls 2

toHttpAppFunction · 0.85
pipeMethod · 0.65

Tested by

no test coverage detected