Dominik Csiba
10/23/2019, 8:47 AMdynamic
, and I don't like the un-safety.
external interface GraphvizProps : RProps {
var dot : String
var options: {width: number, height: number}
}
diesieben07
10/23/2019, 8:49 AMexternal interface GraphvizProps : RProps {
external interface Options {
var width: Int
var height: Int
}
var dot : String
var options: Options
}
Dominik Csiba
10/23/2019, 8:52 AMNon top-level "external" declaration
diesieben07
10/23/2019, 8:53 AMDominik Csiba
10/23/2019, 9:06 AMGraphviz {
attrs.dot = "blabla"
attrs.options = ???
}
diesieben07
10/23/2019, 9:08 AMjs
function.Dominik Csiba
10/23/2019, 9:15 AMobject
implementing the interface, but I am unable to figure out the correct syntaxdiesieben07
10/23/2019, 9:19 AMobject : MyInterface {
override var foo = 3
}
However that creates a "class" (implemented in JS as a function) with a prototype and everything instead of just a plain object.Dominik Csiba
10/23/2019, 9:31 AMwidth
. Thanks for the insights!