You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2019/02/04 21:14:00 UTC

[jira] [Resolved] (ARROW-4442) [JS] Overly broad type annotation for Chunked typeId leading to type mismatches in generated typing

     [ https://issues.apache.org/jira/browse/ARROW-4442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes McKinney resolved ARROW-4442.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.13.0

Issue resolved by pull request 3538
[https://github.com/apache/arrow/pull/3538]

> [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
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.13.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)