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

Function layer

packages/sql-mysql2/src/MysqlClient.ts:293–301  ·  view source on GitHub ↗
(
  config: MysqlClientConfig
)

Source from the content-addressed store, hash-verified

291 * @since 1.0.0
292 */
293export const layer = (
294 config: MysqlClientConfig
295): Layer.Layer<MysqlClient | Client.SqlClient, ConfigError | SqlError> =>
296 Layer.scopedContext(
297 Effect.map(make(config), (client) =>
298 Context.make(MysqlClient, client).pipe(
299 Context.add(Client.SqlClient, client)
300 ))
301 ).pipe(Layer.provide(Reactivity.layer))
302
303/**
304 * @category compiler

Callers

nothing calls this directly

Calls 6

makeFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.65
makeMethod · 0.65
addMethod · 0.65
provideMethod · 0.65

Tested by

no test coverage detected