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

Expand HDS template types #385

Merged
merged 2 commits into from
Oct 27, 2023
Merged

Expand HDS template types #385

merged 2 commits into from
Oct 27, 2023

Conversation

jeffdaley
Copy link
Contributor

@jeffdaley jeffdaley commented Oct 26, 2023

  • Adds the number type to the text argument of the Hds::BadgeCount and Hds::Badge Glint types. The docs specify string but in reality they both take any value; I'm specifying string | number as an internal type check.
  • Makes the FlightIcon component available in gts files.

@jeffdaley jeffdaley changed the title Tweak HDS types Expand HDS template types Oct 26, 2023
@jeffdaley jeffdaley marked this pull request as ready for review October 26, 2023 01:15
@jeffdaley jeffdaley requested a review from a team as a code owner October 26, 2023 01:15
@jfreda
Copy link
Collaborator

jfreda commented Oct 26, 2023

  • Adds the number type to the text argument of the Hds::BadgeCount and Hds::Badge Glint types. The docs specify string but in reality they both take any value; I'm specifying string | number as an internal type check.

Hmm, wondering how risky it is to diverge from the docs here. It seems reasonable that the any could change to string in the underlying implementation without notice if the docs are considered the API contract. Do we actually need to use number for this?

@jeffdaley
Copy link
Contributor Author

Hmm, wondering how risky it is to diverge from the docs here. It seems reasonable that the any could change to string in the underlying implementation without notice if the docs are considered the API contract. Do we actually need to use number for this?

I wouldn't call it risky since I'm pretty sure all the tests would fail, but it's a fair point; the tradeoff probably isn't worth the minor headache were this to come up.

@jeffdaley jeffdaley merged commit f5d44b1 into main Oct 27, 2023
1 check passed
@jeffdaley jeffdaley deleted the jeffdaley/glint-types branch October 27, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants