MCPcopy Create free account
hub / github.com/effect-app/libs / provide

Method provide

repos/effect/packages/effect/src/testing/TestSchema.ts:419–427  ·  view source on GitHub ↗

* Returns a new Decoding instance with the given service injected into the decoding effect context. * * **When to use** * * Use when the schema's decoder requires a service dependency. * * @see Encoding.provide

(
    service: Context.Key<Id, Service>,
    implementation: Service
  )

Source from the content-addressed store, hash-verified

417 * @see {@link Encoding.provide}
418 */
419 provide<Id, Service>(
420 service: Context.Key<Id, Service>,
421 implementation: Service
422 ): Decoding<Schema.middlewareDecoding<S, Exclude<S["DecodingServices"], Id>>> {
423 return new Decoding(
424 pipe(this.schema, Schema.middlewareDecoding(Effect.provideService(service, implementation))),
425 this.options
426 )
427 }
428}
429
430/**

Callers 15

SomethingRepoClass · 0.45
query.test.tsFile · 0.45
middlewareClass · 0.45
SomethingRepoClass · 0.45
layerForFunction · 0.45
clusterRpcLayerFunction · 0.45
clusterWorkflowLayerFunction · 0.45
mwClass · 0.45
AppMiddlewareClass · 0.45

Calls 1

pipeFunction · 0.90

Tested by 15

layerForFunction · 0.36
clusterRpcLayerFunction · 0.36
clusterWorkflowLayerFunction · 0.36
testSuiteFunction · 0.36
makeBaseFunction · 0.36
clusterWorkflowLayerFunction · 0.36
runSuiteFunction · 0.36
saveFunction · 0.36
saveOtherFunction · 0.36
mountSuspenseFunction · 0.36
withStoreFunction · 0.36
provideMigrationFunction · 0.36