Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS] Overly broad type annotation for Chunked typeId leading to type mismatches in generated typing #21001

Closed
asfimport opened this issue Jan 31, 2019 · 1 comment

Comments

@asfimport
Copy link
Collaborator

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 is Vector:

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'.
*/

The fix is to add an explicit return annotation to the Chunked typeId getter.

Reporter: Paul Taylor / @trxcllnt
Assignee: Paul Taylor / @trxcllnt

PRs and other links:

Note: This issue was originally created as ARROW-4442. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Wes McKinney / @wesm:
Issue resolved by pull request 3538
#3538

@asfimport asfimport added this to the 0.13.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants