Use importjs (#17422)
This commit is contained in:
parent
430c30299f
commit
9997b42c35
4 changed files with 56 additions and 56 deletions
|
|
@ -3,8 +3,8 @@
|
|||
when not defined(js):
|
||||
{.fatal: "Module jsbigints is designed to be used with the JavaScript backend.".}
|
||||
|
||||
type JsBigIntImpl {.importc: "bigint".} = int # https://github.com/nim-lang/Nim/pull/16606
|
||||
type JsBigInt* = distinct JsBigIntImpl ## Arbitrary precision integer for JavaScript target.
|
||||
type JsBigIntImpl {.importjs: "bigint".} = int # https://github.com/nim-lang/Nim/pull/16606
|
||||
type JsBigInt* = distinct JsBigIntImpl ## Arbitrary precision integer for JavaScript target.
|
||||
|
||||
func big*(integer: SomeInteger): JsBigInt {.importjs: "BigInt(#)".} =
|
||||
## Constructor for `JsBigInt`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue