Closed kevinresol closed 5 years ago
Hmm. Ok, I can see why. The following should work:
typedef Data = {
@:optional var onChange(default, never):coconut.data.Value<String->Void>;
}
class Editor extends vdom.Foreign {
public function new(data:Data) {
super(document.createDivElement());
}
}
But I can see how that can be a little awkward. I'll probably just reintroduce treatment of Observable<T>
as single constructor argument.
But then I couldn't watch for changes in the Foreign
?
Argh, ignore me, I see the Value
thingy now
Closing this as I'm not sure it's needed anymore.
src/Main.hx:9: characters 15-21 : <Editor/> must have exactly one spread and no other attributes