Skip to content

Commit 0bcb359

Browse files
committed
Allow Int64/UInt64-based arrays
1 parent 814774b commit 0bcb359

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/JavaScriptKit/BasicObjects/JSTypedArray.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ extension UInt32: TypedArrayElement {
135135
public static var typedArrayClass = JSObject.global.Uint32Array.function!
136136
}
137137

138-
// FIXME: Support passing BigInts across the bridge
139-
// See https://github.com/swiftwasm/JavaScriptKit/issues/56
140-
//extension Int64: TypedArrayElement {
141-
// public static var typedArrayClass = JSObject.global.BigInt64Array.function!
142-
//}
143-
//extension UInt64: TypedArrayElement {
144-
// public static var typedArrayClass = JSObject.global.BigUint64Array.function!
145-
//}
138+
#if !JAVASCRIPTKIT_WITHOUT_BIGINTS
139+
extension Int64: TypedArrayElement {
140+
public static var typedArrayClass = JSObject.global.BigInt64Array.function!
141+
}
142+
extension UInt64: TypedArrayElement {
143+
public static var typedArrayClass = JSObject.global.BigUint64Array.function!
144+
}
145+
#endif
146146

147147
extension Float32: TypedArrayElement {
148148
public static var typedArrayClass = JSObject.global.Float32Array.function!

0 commit comments

Comments
 (0)