This is an automated email from the ASF dual-hosted git repository. wesm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push: new 0417b14 ARROW-2123: [JS] Upgrade to TS 2.7.1 0417b14 is described below commit 0417b1420019d5c6611bba36aaa5eb59765618ef Author: Brian Hulette <brian.hule...@ccri.com> AuthorDate: Fri Feb 9 12:30:56 2018 -0500 ARROW-2123: [JS] Upgrade to TS 2.7.1 Bump TS version to 2.7.1 and fix some related errors Author: Brian Hulette <brian.hule...@ccri.com> Closes #1582 from TheNeuralBit/ts-upgrade and squashes the following commits: df47bfa0 [Brian Hulette] linter 95aa2b7e [Brian Hulette] Upgrade to TS 2.7.1 --- js/package.json | 2 +- js/src/data.ts | 2 +- js/src/vector/chunked.ts | 1 + js/test/unit/table-tests.ts | 16 ++++++++-------- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/js/package.json b/js/package.json index e553b56..d36e872 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 81d19a3..ab2e40a 100644 --- a/js/src/data.ts +++ b/js/src/data.ts @@ -142,7 +142,7 @@ export class FlatListData<T extends FlatListType> extends FlatData<T> { this[VectorType.OFFSET] = toTypedArray(Int32Array, valueOffsets); } public clone<R extends T>(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<R>; } } diff --git a/js/src/vector/chunked.ts b/js/src/vector/chunked.ts index c0087fd..2eaf99c 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<T extends DataType> implements View<T> { public chunkVectors: Vector<T>[]; public chunkOffsets: Uint32Array; + // @ts-ignore protected _children: Vector<any>[]; constructor(data: ChunkedData<T>) { this.chunkVectors = data.chunkVectors; diff --git a/js/test/unit/table-tests.ts b/js/test/unit/table-tests.ts index 36d2ae9..8dd30de 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'))), - expected: values.filter((row)=>row[F32] <= row[I32]) + expected: values.filter((row) => row[F32] <= row[I32]) } ]; for (let this_test of filter_tests) { -- To stop receiving notification emails like this one, please contact w...@apache.org.