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.
    
    
    MapOptions* {.importjs.} = ref object of JsRoot
          container*: cstring
          center*: LngLat
          zoom*: int
          style*: StyleSpecification | string
    
    
    Run

map.nim(38, 7) Error: invalid type: 'StyleSpecification or string' in this 
context: 'MapOptions' for let stack trace: (most recent call last)

What am I doing wrong?

thanks

Živoslav

Reply via email to