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

feat(router): Add reusable types for router guards #54580

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Feb 22, 2024

This refactor makes it easier to update the return types of guards. Rather than having to track what types guards can return, which may change with new features over time, MaybeAsync<GuardResult> can be used instead.

Reviewer note: This is a separate feat commit from #45023. Doing this in a commit ahead of time makes it possible to adjust internal code ahead of the breaking change that adds a type to the GuardResult. This means code can be made forward-compatible first and #45023 can be merged without needing to include updates to internal code at the same time the sync happens.

@atscott atscott added area: router target: minor This PR is targeted for the next minor release labels Feb 22, 2024
@ngbot ngbot bot modified the milestone: Backlog Feb 22, 2024
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Feb 22, 2024
This refactor makes it easier to update the return types of guards.
Rather than having to track what types guards can return, which may
change with new features over time, `MaybeAsync<GuardResult>` can be
used instead.
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Copy link
Contributor

@dylhunn dylhunn left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Feb 28, 2024
@pkozlowski-opensource pkozlowski-opensource added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Feb 28, 2024
@pkozlowski-opensource
Copy link
Member

caretaker note: pullapprove is wrong here, this PR has necessary approvals, merging.

@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit c1c7384.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: router detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants