You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/31 21:29:00 UTC

[jira] [Updated] (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 ]

ASF GitHub Bot updated ARROW-4442:
----------------------------------
    Labels: pull-request-available  (was: )

> [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
>
> 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)