You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Paul Taylor (JIRA)" <ji...@apache.org> on 2019/01/31 21:21:00 UTC
[jira] [Created] (ARROW-4442) [JS] Overly broad type annotation for
Chunked typeId leading to type mismatches in generated typing
Paul Taylor created ARROW-4442:
----------------------------------
Summary: [JS] Overly broad type annotation for Chunked typeId leading to type mismatches in generated typing
Key: ARROW-4442
URL: https://issues.apache.org/jira/browse/ARROW-4442
Project: Apache Arrow
Issue Type: Improvement
Components: JavaScript
Affects Versions: 0.4.0
Reporter: Paul Taylor
Assignee: Paul Taylor
Typescript isĀ generatingĀ an overly broad type for the `typeId` property of the ChunkedVector class, leading to a type mismatch and failure to infer Column<T> is Vector<T>:
{code:actionscript}
let col: Vector<Utf8>;
col = new Chunked(new Utf8());
^
/*
Argument of type 'Chunked<Utf8>' is not assignable to parameter of type 'Vector<Utf8>'.
Type 'Chunked<Utf8>' is not assignable to type 'Vector<Utf8>'.
Types of property 'typeId' are incompatible.
Type 'Type' is not assignable to type 'Type.Utf8'.
*/
{code}
The fix is to add an explicit return annotation to the Chunked typeId getter.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)