Skip to content

refactor: [M3-8285] - Improve getQueryParamsFromQueryString type safety#10645

Merged
hana-akamai merged 5 commits intolinode:developfrom
hana-akamai:M3-8285-improve-getQueryParamsFromQueryString-type
Jul 10, 2024
Merged

refactor: [M3-8285] - Improve getQueryParamsFromQueryString type safety#10645
hana-akamai merged 5 commits intolinode:developfrom
hana-akamai:M3-8285-improve-getQueryParamsFromQueryString-type

Conversation

@hana-akamai
Copy link
Contributor

@hana-akamai hana-akamai commented Jul 3, 2024

Description 📝

Follow up to @jaalah's comment in #10479 about improving the type safety of getQueryParamsFromQueryString and removing the casting. The big diff is mostly from ESLint shuffling imports and code around

Changes 🔄

List any change relevant to the reviewer.

  • Type safe getQueryParamsFromQueryString
  • Added dom.iterable to tsconfig.json

How to test 🧪

Verification steps

(How to verify changes)

  • There should be no UI changes or regressions compared to prod

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@hana-akamai hana-akamai self-assigned this Jul 3, 2024
super(props);

/** Get the query params as an object, excluding the "?" */
const queryParams = getQueryParamsFromQueryString<LinodeCreateQueryParams>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the change, everything else was basically ESLint

/* Language and Environment */
"jsx": "react",
"lib": ["dom", "es2020"],
"lib": ["dom", "dom.iterable", "es2020"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hana-akamai hana-akamai marked this pull request as ready for review July 3, 2024 22:13
@hana-akamai hana-akamai requested a review from a team as a code owner July 3, 2024 22:13
@hana-akamai hana-akamai requested review from cpathipa, jaalah-akamai and jdamore-linode and removed request for a team July 3, 2024 22:13
@github-actions
Copy link

github-actions bot commented Jul 8, 2024

Coverage Report:
Base Coverage: 82.23%
Current Coverage: 82.25%

@bnussman-akamai bnussman-akamai added Add'tl Approval Needed Waiting on another approval! and removed Clean Up labels Jul 9, 2024
@hana-akamai hana-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Jul 10, 2024
@hana-akamai hana-akamai merged commit 79136c5 into linode:develop Jul 10, 2024
@hana-akamai hana-akamai deleted the M3-8285-improve-getQueryParamsFromQueryString-type branch July 10, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge!

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants