aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-types/tests/array-buffer.test-d.ts
blob: a3253138e308c202ba1d6044dcc37c846023878b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
const buffer = new ArrayBuffer(1024, {
  maxByteLength: 2048,
});

console.log(buffer.byteLength); // 1024
buffer.resize(2048);
console.log(buffer.byteLength); // 2048
TextDecoder;

const buf = new SharedArrayBuffer(1024);
buf.grow(2048);