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

Nearby view support (types) #681

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,22 @@ export type Place = {
name: string;
networks?: string[];
rentalVehicle?: { network: string };
stop?: Stop;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopCode?: string;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopId?: string;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopIndex?: number;
/**
* @deprecated Only for OTP1 support, removal is immenent
*/
stopSequence?: number;
vertexType: string;
zoneId?: string;
Expand Down Expand Up @@ -473,10 +486,11 @@ export type Stop = {
dist?: number;
geometries?: { geoJson?: GeoJSON.Polygon };
id: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a type alias per https://github.com/opentripplanner/otp-ui/pull/655/files#r1387985351 if we are to avoid breaking compatibility in a whole bunch of packages in #655.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good suggestion, thank you

lat: number;
lon: number;
lat?: number;
lon?: number;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these marked optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added them to make something work I think, but we should probably remove them and just expect these fields to always be there.

name: string;
routes?: Route[];
gtfsId: string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort props

};

export type Agency = {
Expand Down
Loading