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: replace casts with assertions #10087

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

emersion
Copy link
Member

@emersion emersion commented Dec 16, 2024

This is safer (we get a type error if a type is changed), and more readable.

Enable @typescript-eslint/non-nullable-type-assertion-style to make sure we don't introduce more of these.

@emersion emersion requested a review from a team as a code owner December 16, 2024 10:30
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Dec 16, 2024
@emersion emersion force-pushed the emr/asserts-instead-of-cast branch from fdb9e2e to 600f190 Compare December 16, 2024 11:40
@emersion emersion changed the title front: replace casts with assertions in preparePathPropertiesData() front: replace casts with assertions Dec 16, 2024
@emersion emersion self-assigned this Dec 16, 2024
This is safer (we get a type error if a type is changed), and more
readable.

Enable @typescript-eslint/non-nullable-type-assertion-style to make
sure we don't introduce more of these.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion force-pushed the emr/asserts-instead-of-cast branch from 600f190 to 5aa3aa7 Compare December 16, 2024 11:44
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Lgtm and tested, thank you for this

@emersion emersion added this pull request to the merge queue Dec 20, 2024
Merged via the queue into dev with commit bf0ab67 Dec 20, 2024
27 checks passed
@emersion emersion deleted the emr/asserts-instead-of-cast branch December 20, 2024 11:28
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