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

Method schema

packages/effect/src/unstable/cluster/Reply.ts:222–230  ·  view source on GitHub ↗

* Builds a chunk schema from the streaming success schema of an RPC. * * @since 4.0.0

(
    rpc: R
  )

Source from the content-addressed store, hash-verified

220 * @since 4.0.0
221 */
222 static schema<R extends Rpc.Any>(
223 rpc: R
224 ): Schema.declareConstructor<Chunk<R>, Chunk<R>, readonly [Rpc.SuccessExitSchema<R>]> {
225 const successSchema = ((rpc as any as Rpc.AnyWithProps).successSchema as RpcSchema.Stream<any, any>).success
226 if (!successSchema) {
227 return Schema.Never as any
228 }
229 return this.schemaFrom(successSchema) as any
230 }
231
232 /**
233 * Builds a chunk schema that validates each success value with the supplied schema.

Callers 15

CLI.tsFile · 0.45
loadFunction · 0.45
config.tsFile · 0.45
Config.tst.tsFile · 0.45
Config.test.tsFile · 0.45
EventLog.test.tsFile · 0.45
OtlpResource.tsFile · 0.45
headersFunction · 0.45
exportersFunction · 0.45
EntryClass · 0.45
WriteEntriesClass · 0.45

Calls 1

schemaFromMethod · 0.95

Tested by

no test coverage detected