-
Notifications
You must be signed in to change notification settings - Fork 34
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
Nearby view support (types) #681
Conversation
I'm thinking maybe instead of |
packages/types/src/index.ts
Outdated
name: string; | ||
routes?: Route[]; | ||
gtfsId: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort props
@@ -473,10 +486,11 @@ export type Stop = { | |||
dist?: number; | |||
geometries?: { geoJson?: GeoJSON.Polygon }; | |||
id: string; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small fixes, nothing serious
packages/types/src/index.ts
Outdated
@@ -460,6 +473,8 @@ export type StopLayerStop = LayerEntity & { | |||
name: string; | |||
}; | |||
|
|||
export type StopEventHanlder = (stop: Stop | { stopId: string }) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo Handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thnx
packages/types/src/index.ts
Outdated
lat?: number; | ||
lon?: number; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
fb33beb
into
opentripplanner:master
This PR adds the necessary properties to the types for the nearby view.