(options: {
readonly op: Op
readonly eval?: (fiber: MicroFiberImpl) => Primitive | Micro<any, any, any> | Yield
readonly contA?: (this: Primitive, value: any, fiber: MicroFiberImpl) => Primitive | Micro<any, any, any> | Yield
readonly contE?: (
this: Primitive,
cause: MicroCause<any>,
fiber: MicroFiberImpl
) => Primitive | Micro<any, any, any> | Yield
readonly ensure?: (this: Primitive, fiber: MicroFiberImpl) => void | ((value: any, fiber: MicroFiberImpl) => void)
})
| 727 | } |
| 728 | |
| 729 | const makePrimitiveProto = <Op extends string>(options: { |
| 730 | readonly op: Op |
| 731 | readonly eval?: (fiber: MicroFiberImpl) => Primitive | Micro<any, any, any> | Yield |
| 732 | readonly contA?: (this: Primitive, value: any, fiber: MicroFiberImpl) => Primitive | Micro<any, any, any> | Yield |
| 733 | readonly contE?: ( |
| 734 | this: Primitive, |
| 735 | cause: MicroCause<any>, |
| 736 | fiber: MicroFiberImpl |
| 737 | ) => Primitive | Micro<any, any, any> | Yield |
| 738 | readonly ensure?: (this: Primitive, fiber: MicroFiberImpl) => void | ((value: any, fiber: MicroFiberImpl) => void) |
| 739 | }): Primitive => ({ |
| 740 | ...MicroProto, |
| 741 | [identifier]: options.op, |
| 742 | [evaluate]: options.eval ?? defaultEvaluate, |
| 743 | [successCont]: options.contA, |
| 744 | [failureCont]: options.contE, |
| 745 | [ensureCont]: options.ensure |
| 746 | } as any) |
| 747 | |
| 748 | const makePrimitive = <Fn extends (...args: Array<any>) => any, Single extends boolean = true>(options: { |
| 749 | readonly op: string |
no outgoing calls
no test coverage detected