Skip to content

Commit 41f55c5

Browse files
fix: Replace BigInt literals with BigInt() constructor for ES5 compatibility
1 parent b399691 commit 41f55c5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/builder/listview.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class LargeListViewBuilder<T extends DataType = any, TNull = any> extends
137137
protected _offsets: DataBufferBuilder<BigInt64Array>;
138138
protected _sizes: DataBufferBuilder<BigInt64Array>;
139139
protected _pending: Map<number, T['TValue'] | undefined> | undefined;
140-
protected _writeIndex = 0n; // BigInt for LargeListView
140+
protected _writeIndex = BigInt(0); // BigInt for LargeListView
141141

142142
constructor(opts: BuilderOptions<LargeListView<T>, TNull>) {
143143
super(opts);
@@ -169,7 +169,7 @@ export class LargeListViewBuilder<T extends DataType = any, TNull = any> extends
169169

170170
public clear() {
171171
this._pending = undefined;
172-
this._writeIndex = 0n;
172+
this._writeIndex = BigInt(0);
173173
return super.clear();
174174
}
175175

@@ -221,8 +221,8 @@ export class LargeListViewBuilder<T extends DataType = any, TNull = any> extends
221221

222222
if (typeof value === 'undefined') {
223223
// Null or empty list
224-
offsets.buffer[index] = 0n;
225-
sizes.buffer[index] = 0n;
224+
offsets.buffer[index] = BigInt(0);
225+
sizes.buffer[index] = BigInt(0);
226226
} else {
227227
const v = value as T['TValue'];
228228
const n = v.length;

0 commit comments

Comments
 (0)