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

[Bug]: TypeScript SetURLSearchParams type is not exported #10212

Closed
thibaut-decherit opened this issue Mar 16, 2023 · 3 comments · Fixed by #10444
Closed

[Bug]: TypeScript SetURLSearchParams type is not exported #10212

thibaut-decherit opened this issue Mar 16, 2023 · 3 comments · Fixed by #10444
Labels

Comments

@thibaut-decherit
Copy link

thibaut-decherit commented Mar 16, 2023

What version of React Router are you using?

6.9.0

Steps to Reproduce

I have an utility class with the following function:

static updateSearchParams(
  data: {
    [key: string]: string
  },
  searchParams: URLSearchParams,
  setSearchParams: (
    nextInit?: URLSearchParamsInit | ((prev: URLSearchParams) => URLSearchParamsInit),
    navigateOpts?: NavigateOptions
  ) => void
) {
  setSearchParams({
    ...Object.fromEntries([...searchParams]),
    ...data
  });
}

Expected Behavior

Be able to type setSearchParams as SetURLSearchParams.

Actual Behavior

SetURLSearchParams type is not exported, I have to duplicate it.

@brophdawg11
Copy link
Contributor

This is exported in #10444 and will be available once 6.11.2 is released

@brophdawg11 brophdawg11 added the awaiting release This issue have been fixed and will be released soon label May 15, 2023
@MichaelDeBoey MichaelDeBoey linked a pull request May 15, 2023 that will close this issue
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 6.11.2-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 6.11.2 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

thibaut-decherit added a commit to thibaut-decherit/symfony-react-api-platform that referenced this issue May 22, 2023
@brophdawg11 brophdawg11 removed the awaiting release This issue have been fixed and will be released soon label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants