Skip to content

Commit 74e828a

Browse files
committed
fix typings issues (ARROW-1903)
1 parent b49e8f3 commit 74e828a

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

js/src/text-encoding-utf-8.d.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

js/src/vector/numeric.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ export class NumericVector<T, TArray extends TypedArray> extends Vector<T> {
3434
concat(...vectors: Vector<T>[]): Vector<T> {
3535
return new VirtualVector(this.data.constructor as TypedArrayConstructor, this, ...vectors);
3636
}
37-
slice(start?: number, end?: number) {
37+
slice<R = TArray>(start?: number, end?: number): R {
3838
const { data, stride } = this, from = start! | 0;
3939
const to = end === undefined ? data.length : Math.max(end | 0, from);
40-
return data.subarray(Math.min(from, to) * stride | 0, to * stride | 0);
40+
return data.subarray(Math.min(from, to) * stride | 0, to * stride | 0) as any as R;
4141
}
4242
}
4343

@@ -49,7 +49,8 @@ export class FixedWidthNumericVector<T, TArray extends TypedArray> extends Numer
4949

5050
export class BoolVector extends NumericVector<boolean, Uint8Array> {
5151
static pack(values: Iterable<any>) {
52-
let xs = [], n, i = 0;
52+
let n = 0, i = 0;
53+
let xs: number[] = [];
5354
let bit = 0, byte = 0;
5455
for (const value of values) {
5556
value && (byte |= 1 << bit);

js/src/vector/virtual.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class VirtualVector<T> implements Vector<T> {
9393
// this is a significant improvement as we avoid the memcpy 🎉
9494
if ((source.length / vector.stride | 0) < total) {
9595
let vectorsLength = vectors.length;
96-
let count = 0, length = 0, sources = [];
96+
let count = 0, length = 0, sources = [] as any[];
9797
do {
9898
sources.push(source);
9999
length += source.length;

js/test/Arrow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// under the License.
1717

1818
/* tslint:disable */
19-
// Dynamically load an Ix target build based on command line arguments
19+
// Dynamically load an Arrow target build based on command line arguments
2020

2121
const path = require('path');
2222
const target = process.env.TEST_TARGET!;

js/test/integration/validate-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const arrowBuffers: Uint8Array[] = [fs.readFileSync(arrowPath)];
3737

3838
import Arrow from '../Arrow';
3939
import { zip } from 'ix/iterable/zip';
40-
import { toArray } from 'ix/iterable/toArray';
40+
import { toArray } from 'ix/iterable/toarray';
4141

4242
const { Table, read } = Arrow;
4343

0 commit comments

Comments
 (0)