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

Function Prototype

packages/effect/src/Effectable.ts:31–41  ·  view source on GitHub ↗
(options: {
  readonly label: string
  readonly evaluate: (
    this: A,
    fiber: Fiber.Fiber<any, any>
  ) => Effect.Effect<Effect.Success<A>, Effect.Error<A>, Effect.Services<A>>
})

Source from the content-addressed store, hash-verified

29 * @since 4.0.0
30 */
31export const Prototype = <A extends Effect.Effect<any, any, any>>(options: {
32 readonly label: string
33 readonly evaluate: (
34 this: A,
35 fiber: Fiber.Fiber<any, any>
36 ) => Effect.Effect<Effect.Success<A>, Effect.Error<A>, Effect.Services<A>>
37}): Effect.Effect<Effect.Success<A>, Effect.Error<A>, Effect.Services<A>> =>
38 makePrimitiveProto({
39 op: options.label,
40 [evaluate]: options.evaluate
41 }) as any
42
43const Base: new<A, E, R>() => Effect.Effect<A, E, R> = (() => {
44 const Base = function() {}

Callers 1

Effectable.tsFile · 0.85

Calls 1

makePrimitiveProtoFunction · 0.90

Tested by

no test coverage detected