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