Cool! Makes sense. Now I'm using:
    
    
    func myfunc*(data: cstring, opts: JsObject) {.importjs: "mylib.$1(#, #)".}
    
    
    Run

And I'm trying _on the Nim side_ to provide this` JsObject` aka dictionary:
    
    
    let opts = toJS({"type": "extended", "desc": "fortified"}.totable)
    myFunc(data, opts)
    
    
    Run

This compiles and runs, but _on the JavaScript side_ `opts.type` is `undefined` 
and not as I hoped/expected `"extended"`.

Any idea how to write the JsObject dictionary in Nim correctly? 

Reply via email to