Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

type TypedArrayKind = 'i8' | 'ui8' | 'ui8c' | 'i16' | 'ui16' | 'i32' | 'ui32' | 'f32' | 'f64' | 'bi64' | 'bui64';
type TypedArrayKind = 'i8' | 'ui8' | 'ui8c' | 'i16' | 'ui16' | 'i32' | 'ui32' | 'f16' | 'f32' | 'f64' | 'bi64' | 'bui64';

export type SerializedValue =
undefined | boolean | number | string |
Expand Down Expand Up @@ -86,7 +86,7 @@ const typedArrayConstructors: Record<TypedArrayKind, Function> = {
ui16: Uint16Array,
i32: Int32Array,
ui32: Uint32Array,
// TODO: add Float16Array once it's in baseline
f16: Float16Array,
f32: Float32Array,
f64: Float64Array,
bi64: BigInt64Array,
Expand Down
1 change: 1 addition & 0 deletions tests/page/page-evaluate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ it('should transfer typed arrays', async ({ page }) => {
new Uint16Array([1, 2, 3]),
new Int32Array([1, 2, 3]),
new Uint32Array([1, 2, 3]),
new Float16Array([1.1, 2.2, 3.3]),
new Float32Array([1.1, 2.2, 3.3]),
new Float64Array([1.1, 2.2, 3.3]),
new BigInt64Array([1n, 2n, 3n]),
Expand Down
Loading