(options: {
readonly op: Op
readonly [evaluate]?: (
fiber: FiberImpl
) => Primitive | Effect.Effect<any, any, any> | Yield
readonly [contA]?: (
this: Primitive,
value: any,
fiber: FiberImpl
) => Primitive | Effect.Effect<any, any, any> | Yield
readonly [contE]?: (
this: Primitive,
cause: Cause.Cause<any>,
fiber: FiberImpl
) => Primitive | Effect.Effect<any, any, any> | Yield
readonly [contAll]?: (
this: Primitive,
fiber: FiberImpl
) => void | ((value: any, fiber: FiberImpl) => void)
})
| 386 | |
| 387 | /** @internal */ |
| 388 | export const makePrimitiveProto = <Op extends string>(options: { |
| 389 | readonly op: Op |
| 390 | readonly [evaluate]?: ( |
| 391 | fiber: FiberImpl |
| 392 | ) => Primitive | Effect.Effect<any, any, any> | Yield |
| 393 | readonly [contA]?: ( |
| 394 | this: Primitive, |
| 395 | value: any, |
| 396 | fiber: FiberImpl |
| 397 | ) => Primitive | Effect.Effect<any, any, any> | Yield |
| 398 | readonly [contE]?: ( |
| 399 | this: Primitive, |
| 400 | cause: Cause.Cause<any>, |
| 401 | fiber: FiberImpl |
| 402 | ) => Primitive | Effect.Effect<any, any, any> | Yield |
| 403 | readonly [contAll]?: ( |
| 404 | this: Primitive, |
| 405 | fiber: FiberImpl |
| 406 | ) => void | ((value: any, fiber: FiberImpl) => void) |
| 407 | }): Primitive => |
| 408 | ({ |
| 409 | ...EffectProto, |
| 410 | [identifier]: options.op, |
| 411 | [evaluate]: options[evaluate] ?? defaultEvaluate, |
| 412 | [contA]: options[contA], |
| 413 | [contE]: options[contE], |
| 414 | [contAll]: options[contAll] |
| 415 | }) as any |
| 416 | |
| 417 | /** @internal */ |
| 418 | export const makePrimitive = < |
no outgoing calls
no test coverage detected