array literals uses typed arrays; fix a jsgen bug (#16850)

* array litterals uses typed arrays
* Update compiler/jsgen.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
flywind 2021-02-15 04:28:11 -06:00 • committed by GitHub
commit 240879bf3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 31 deletions

View file

@ -1,6 +1,5 @@
proc jsTypeOf*[T](x: T): cstring {.importjs: "typeof(#)".}
## Returns the name of the JsObject's JavaScript type as a cstring.
# xxx replace jsffi.jsTypeOf with this definition and add tests
import std/private/jsutils
type JsBigIntImpl {.importc: "bigint".} = int
type JsBigInt = distinct JsBigIntImpl