MCPcopy Create free account
hub / github.com/Effect-TS/effect / provide

Method provide

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

bin.tsFile · 0.45
Codegen.tsFile · 0.45
codegen.tsFile · 0.45
assertRuntimeFunction · 0.45
assertTypeOnlyFunction · 0.45
assertRuntimeIncludesFunction · 0.45
assertHttpApiIncludesFunction · 0.45

Calls 1

pipeFunction · 0.90

Tested by 15

assertRuntimeFunction · 0.36
assertTypeOnlyFunction · 0.36
assertRuntimeIncludesFunction · 0.36
assertHttpApiIncludesFunction · 0.36
expectFailureFunction · 0.36
makeClientFunction · 0.36
connectFailureReasonFunction · 0.36
queryFailureReasonFunction · 0.36
queryFailureReasonFunction · 0.36