Skip to content

Include field string keys on typedefs? #11

Description

@kylebarron
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions