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

Function layer

packages/sql-mssql/src/MssqlClient.ts:451–459  ·  view source on GitHub ↗
(
  config: MssqlClientConfig
)

Source from the content-addressed store, hash-verified

449 * @since 1.0.0
450 */
451export const layer = (
452 config: MssqlClientConfig
453): Layer.Layer<Client.SqlClient | MssqlClient, ConfigError | SqlError> =>
454 Layer.scopedContext(
455 Effect.map(make(config), (client) =>
456 Context.make(MssqlClient, client).pipe(
457 Context.add(Client.SqlClient, client)
458 ))
459 ).pipe(Layer.provide(Reactivity.layer))
460
461/**
462 * @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