JavaScriptKit Documentation

Class JSBig​Int

public final class JSBigInt: JSObject  

A wrapper around the JavaScript BigInt class that exposes its properties in a type-safe and Swifty way.

%27 JSBigInt JSBigInt JSBigIntExtended JSBigIntExtended JSBigInt->JSBigIntExtended JSObject JSObject JSBigInt->JSObject JSBigIntExtended->JSBigInt

Superclass

JSObject

JSObject represents an object in JavaScript and supports dynamic member lookup. Any member access like object.foo will dynamically request the JavaScript and Swift runtime bridge library for a member with the specified name in this object.

Conforms To

JSBigIntExtended

Types Conforming to JSBig​Int

JSBigIntExtended

Initializers

init(_:​)

public convenience init(_ value: Int64)  

init(unsigned:​)

public convenience init(unsigned value: UInt64)  

init(id:​)

@_spi(JSObject_id)
    override public init(id: JavaScriptObjectRef)  

init(_slow​Bridge:​)

public init(_slowBridge value: Int64)  

Instantiate a new JSBigInt with given Int64 value in a slow path This doesn't require JS-BigInt-integration feature.

init(_slow​Bridge:​)

public init(_slowBridge value: UInt64)  

Instantiate a new JSBigInt with given UInt64 value in a slow path This doesn't require JS-BigInt-integration feature.

Properties

int64Value

public var int64Value: Int64  

uInt64Value

public var uInt64Value: UInt64  

js​Value

override public var jsValue: JSValue  

Methods

construct(from:​)

override public class func construct(from value: JSValue) -> Self?  

clamped(bit​Size:​signed:​)

public func clamped(bitSize: Int, signed: Bool) -> JSBigInt