`import std/jsffi type StyleSpecification = ref object of JsRoot LngLat = ref
object of JsRoot MapOptions*[T: StyleSpecification | cstring] {.importjs.} =
ref object of JsRoot container*: cstring center*: LngLat zoom*: int style*: T
let opts = MapOptions[string]( container: "foo", center: LngLat
Hi,
I'm creating a wrapper over a javascript (typescrti) library where a parameter
can have two values.
export type MapOptions = {
...
style: StyleSpecification | string;
...
Run
Direct implementation in Nim returns an error