Open
Description
We want to support constructors from the PS level. Let's introduce set of types and helpers:
foreign import data EffectConstructorFn2 :: Type -> Type -> Type -> EffectConstructorConstructorFn2
foreign import data runEffectConstructorFn2 ::
forall a b obj. EffectFn3 (EffectConstructorFn2 a b obj) a b objRunners should use a referenced function and call new on function application - I mean usual stuff:
export function runEffectConstructorFn2(f, arg1, arg2) {
return (new f(arg1, arg2));
}Metadata
Metadata
Assignees
Labels
No labels
Activity
paluh commentedon Jul 30, 2022
I left
obj :: Typeabove - it gives us flexibility so when we are going process constructors in a generic way we can handle bothJSObjectand newtypedJSObjectas well.