[
https://issues.apache.org/jira/browse/ARROW-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16358741#comment-16358741
]
ASF GitHub Bot commented on ARROW-2123:
---
wesm closed pull request #1582: ARROW-2123: [JS] Upgrade to TS 2.7.1
URL: https://github.com/apache/arrow/pull/1582
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/js/package.json b/js/package.json
index e553b56cd..d36e87263 100644
--- a/js/package.json
+++ b/js/package.json
@@ -97,7 +97,7 @@
"trash": "4.2.1",
"ts-jest": "22.0.1",
"tslint": "5.9.1",
-"typescript": "2.6.2",
+"typescript": "2.7.1",
"uglifyjs-webpack-plugin": "1.1.6",
"webpack": "3.10.0",
"xml2js": "0.4.19"
diff --git a/js/src/data.ts b/js/src/data.ts
index 81d19a3cf..ab2e40ae9 100644
--- a/js/src/data.ts
+++ b/js/src/data.ts
@@ -142,7 +142,7 @@ export class FlatListData extends
FlatData {
this[VectorType.OFFSET] = toTypedArray(Int32Array, valueOffsets);
}
public clone(type: R, length = this.length, offset =
this.offset, nullCount = this._nullCount) {
-return new FlatListData(type, length, this[VectorType.VALIDITY],
this[VectorType.OFFSET], this[VectorType.DATA], offset, nullCount);
+return new FlatListData(type, length, this[VectorType.VALIDITY],
this[VectorType.OFFSET], this[VectorType.DATA], offset, nullCount) as
FlatListData;
}
}
diff --git a/js/src/vector/chunked.ts b/js/src/vector/chunked.ts
index c0087fdd7..2eaf99c7c 100644
--- a/js/src/vector/chunked.ts
+++ b/js/src/vector/chunked.ts
@@ -22,6 +22,7 @@ import { DataType, TypedArray, IterableArrayLike } from
'../type';
export class ChunkedView implements View {
public chunkVectors: Vector[];
public chunkOffsets: Uint32Array;
+// @ts-ignore
protected _children: Vector[];
constructor(data: ChunkedData) {
this.chunkVectors = data.chunkVectors;
diff --git a/js/test/unit/table-tests.ts b/js/test/unit/table-tests.ts
index 36d2ae903..8dd30de93 100644
--- a/js/test/unit/table-tests.ts
+++ b/js/test/unit/table-tests.ts
@@ -313,8 +313,8 @@ describe(`Table`, () => {
for (let batch of table.batches) {
expect(bind).toHaveBeenCalledWith(batch);
}
-})
-})
+});
+});
test(`count() returns the correct length`, () => {
expect(table.count()).toEqual(values.length);
});
@@ -331,7 +331,7 @@ describe(`Table`, () => {
}, {
name: `filter on 0 <= f32`,
filtered: table.filter(lit(0).lteq(col('f32'))),
-expected: values.filter((row)=>0 <= row[F32])
+expected: values.filter((row) => 0 <= row[F32])
}, {
name: `filter on i32 <= 0`,
filtered: table.filter(col('i32').lteq(0)),
@@ -339,11 +339,11 @@ describe(`Table`, () => {
}, {
name: `filter on 0 >= i32`,
filtered: table.filter(lit(0).gteq(col('i32'))),
-expected: values.filter((row)=>0 >= row[I32])
+expected: values.filter((row) => 0 >= row[I32])
}, {
name: `filter on f32 <= -.25 || f3 >= .25`,
filtered:
table.filter(col('f32').lteq(-.25).or(col('f32').gteq(.25))),
-expected: values.filter((row)=>row[F32] <= -.25 ||
row[F32] >= .25)
+expected: values.filter((row) => row[F32] <= -.25 ||
row[F32] >= .25)
}, {
name: `filter method combines predicates (f32 >= 0 &&
i32 <= 0)`,
filtered:
table.filter(col('i32').lteq(0)).filter(col('f32').gteq(0)),
@@ -355,15 +355,15 @@ describe(`Table`, () => {
}, {
name: `filter on 'a' == dictionary (commutativity)`,
filtered: table.filter(lit('a').eq(col('dictionary'))),
-expected: values.filter((row)=>row[DICT] === 'a')
+expected: values.filter((row) => row[DICT] === 'a')
}, {
name: `filter on f32 >= i32`,
filtered: table.filter(col('f32').gteq(col('i32'))),
-expected: values.filter((row)=>row[F32] >= row[I32])
+expected: values.filter((row) => row[F32] >= row[I32])
}, {
name: `filter on f32 <= i32`,
filtered: table.filter(col('f32').lteq(col('i32'))),
-