arquero
arquero copied to clipboard
Using Apache Arrow Type as a type is not possible in Typescript
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
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.