0.1.2 #3
@@ -59,12 +59,12 @@ const ComponentProto = Object.freeze({
|
|||||||
}, [])
|
}, [])
|
||||||
}),
|
}),
|
||||||
|
|
||||||
makeFunctionComponent(
|
makeFunctionComponent <E, R, P extends {}>(
|
||||||
this: Component<any, any, any>,
|
this: Component<E, R, P>,
|
||||||
runtimeRef: React.RefObject<Runtime.Runtime<any>>,
|
runtimeRef: React.RefObject<Runtime.Runtime<Exclude<R, Scope.Scope>>>,
|
||||||
scope: Scope.Scope,
|
scope: Scope.Scope,
|
||||||
): React.FC<any> {
|
): React.FC<P> {
|
||||||
return (props: any) => Runtime.runSync(runtimeRef.current)(
|
return (props: P) => Runtime.runSync(runtimeRef.current)(
|
||||||
Effect.provideService(this.body(props), Scope.Scope, scope)
|
Effect.provideService(this.body(props), Scope.Scope, scope)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user