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

front: remove PathStep casts #10167

Merged
merged 5 commits into from
Jan 3, 2025
Merged

front: remove PathStep casts #10167

merged 5 commits into from
Jan 3, 2025

Conversation

emersion
Copy link
Member

See individual commits.

Instead use a null assertion. This is safer in case the return type
of useSelector(getPathSteps) changes.

Signed-off-by: Simon Ser <[email protected]>
We don't need to do anything special wrt secondary_code here.

Signed-off-by: Simon Ser <[email protected]>
With the refactoring in the previous commit, TypeScript is smart
enough to figure out that the value we return has the correct shape.

Signed-off-by: Simon Ser <[email protected]>
…ducer

This is safer in case the type of state.pathSteps is changed to
something else.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion requested review from clarani and Akctarus December 23, 2024 11:44
@emersion emersion requested a review from a team as a code owner December 23, 2024 11:44
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Dec 23, 2024
@emersion emersion force-pushed the emr/rm-path-step-casts branch from 7d46735 to be0acbb Compare December 23, 2024 11:56
TypeScript is not smart enough to understand that the result of
omit() is a PathItemLocation. Use standard JavaScript destructuring
instead.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion force-pushed the emr/rm-path-step-casts branch from be0acbb to 6e4f7ee Compare December 23, 2024 12:07
@emersion emersion self-assigned this Dec 23, 2024
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@emersion emersion added this pull request to the merge queue Jan 3, 2025
Merged via the queue into dev with commit 31b135a Jan 3, 2025
27 checks passed
@emersion emersion deleted the emr/rm-path-step-casts branch January 3, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants