@@ -29,12 +29,20 @@ const ComponentProto = Object.seal({
|
||||
const nonReactiveTags = [Tracer.ParentSpan] as const
|
||||
|
||||
|
||||
export namespace make {
|
||||
export interface Options {
|
||||
readonly traced?: boolean
|
||||
readonly finalizerExecutionMode?: "sync" | "fork"
|
||||
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy
|
||||
}
|
||||
}
|
||||
|
||||
export const make = <
|
||||
Eff extends Utils.YieldWrap<Effect.Effect<any, any, any>>,
|
||||
P extends {} = {},
|
||||
>(
|
||||
body: (props: P) => Generator<Eff, React.ReactNode, never>,
|
||||
options?: Make.MakeOptions,
|
||||
options?: make.Options,
|
||||
): Component<
|
||||
[Eff] extends [never] ? never : [Eff] extends [Utils.YieldWrap<Effect.Effect<infer _A, infer E, infer _R>>] ? E : never,
|
||||
[Eff] extends [never] ? never : [Eff] extends [Utils.YieldWrap<Effect.Effect<infer _A, infer _E, infer R>>] ? R : never,
|
||||
@@ -56,14 +64,6 @@ export const make = <
|
||||
}, ComponentProto)
|
||||
}
|
||||
|
||||
export namespace Make {
|
||||
export interface MakeOptions {
|
||||
readonly traced?: boolean
|
||||
readonly finalizerExecutionMode?: "sync" | "fork"
|
||||
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const withRuntime: {
|
||||
<E, R, P extends {}>(
|
||||
|
||||
Reference in New Issue
Block a user