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

Using Apache Arrow Type as a type is not possible in Typescript #249

Open
stopyransky opened this issue Dec 6, 2021 · 1 comment
Open

Comments

@stopyransky
Copy link

when importing arrow Type from arquero package:
import { Type } from 'arquero';

because the Type is exported as a namespace

export default {
  NONE: 0,
  // ... other types here
}

using Type as a type is not possible, typescript will throw error:
Cannot use namespace 'Type' as a type.ts(2709)

Instead export Type as enum as in original source in Apache Arrow

@jheer
Copy link
Member

jheer commented Dec 16, 2021

Thanks. I'm not a heavy TypeScript user so I didn't run into this earlier. In retrospect, I think having Arquero export the Arrow types was likely a mistake and I might deprecate or remove this in future releases. So ultimately I think the right approach will be to use the types from Arrow itself.

In the meantime, if you have a PR that might address the current issue, I'd be happy to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants