[ https://issues.apache.org/jira/browse/ARROW-4442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17661464#comment-17661464 ]
Rok Mihevc commented on ARROW-4442: ----------------------------------- This issue has been migrated to [issue #21001|https://github.com/apache/arrow/issues/21001] on GitHub. Please see the [migration documentation|https://github.com/apache/arrow/issues/14542] for further details. > [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: 20m > 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 (v8.20.10#820010)