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

Include field string keys on typedefs? #11

Open
kylebarron opened this issue Nov 22, 2023 · 0 comments
Open

Include field string keys on typedefs? #11

kylebarron opened this issue Nov 22, 2023 · 0 comments

Comments

@kylebarron
Copy link
Member

export type Point2 = arrow.FixedSizeList<arrow.Float> & {
  children: [arrow.Field<arrow.Float> & { name: "xy" }];
};

function tmp(x: arrow.DataType) {
  let z = x.children[0].name;
  // string
}
function tmp2(x: Point2) {
  let z = x.children[0].name;
  z
  // "xy"
}

Would provide a distinction between otherwise structurally-equal types (linestring--multipoint and polygon--multilinestring). Right now, if you pass in a multipoint type into a function like mapCoords you'll get linestring back

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

1 participant