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

ref(pageFilters): Constrict types on updateParams better #31073

Commits on Jan 14, 2022

  1. ref(pageFilters): Constrict types on updateParams better

    This narrows the types on the updateParams function call to better
    reflect what is actually going on
    
     - The UrlParams type has been renamed to  `UpdateParams` and
       `PageFilterQuery`, which better reflect how the parameters are
       transformed when being shuttled between query parameters and more
       structured 'state' objects.
    
       This is especially important when passing these parameters to the
       `setPageFiltersStorage` function which now specifically always wants
       the `project` parameters to be a string array.
    
     - Add a test case to cover the regression that occurred in 0bbbfab,
       where we could not call `.map` on a string, which typescript failed
       to catch since the types in the pageFilters actionCreators were too
       wide and in some cases incorrect.
    
       This test would have failed in 0bbbfab.
    evanpurkhiser committed Jan 14, 2022
    Configuration menu
    Copy the full SHA
    1bb3d6d View commit details
    Browse the repository at this point in the history