-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(badge): allow more data types for badge content #20331
fix(badge): allow more data types for badge content #20331
Conversation
What would you think about just changing the type to |
I was considering it, but I don't think there's much to gain from the addition type safety since we don't do anything with the content anyway. The advantage I see in keeping it |
How about |
0734e7f
to
cef4d95
Compare
Done. |
Currently the badge's content is limited to `string` which excludes other legitimate use cases like numbers. These changes turn it into an `string | number | undefined | null` since we aren't actually doing anything with the value, apart from forwarding it. Fixes angular#20326.
cef4d95
to
cf058f0
Compare
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.
LGTM
Caretaker note: this could be breaking if people are reading out of the badge's content, but I have a hard time imagining why people would do that (maaaaaybe tests). If we find that this breaks anything in Google, we should bump it to major and amend the commit to include a breaking change block. |
Currently the badge's content is limited to `string` which excludes other legitimate use cases like numbers. These changes turn it into an `string | number | undefined | null` since we aren't actually doing anything with the value, apart from forwarding it. Fixes #20326. (cherry picked from commit 75f73ae)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently the badge's content is limited to
string
which excludes other legitimate use cases like numbers. These changes turn it into anstring | number | undefined | null
since we aren't actually doing anything with the value, apart from forwarding it.Fixes #20326.