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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions