I am adding some AudioParam method support to nim-webaudio .
So far so good and tested until this:
setValueCurveAtTime(values, startTime, duration), where values is an array of floating-point numbers.
How would I declare such an array (of undetermined size)?
proc setValueCurveAtTime*(param: AudioParam, values:???, startTime: float, duration: float) {.importjs:"#.setValueCurveAtTime(@,@,@,@)".}
proc setValueCurveAtTime*(param: AudioParam; values: openArray[float]; startTime, duration: float) {.importjs:"#.$1(#, #, #, #)".}
Thanks !
I didn't know of that alternate way to express repeated types. I'll have to see if I can find a guide to writing js wrappers in nim.
Thanks again.
Some docs and examples https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers#interoperability-template
Also as example check the code at https://github.com/juancarlospaco/nodejs#documentation