-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
URLSearchParams needs size #54466
Comments
Quick workaround is to extend
interface URLSearchParams {
size: number;
} |
Makes sense, according to MDN it seems like this only landed in Chrome this month. TS tends to wait until at least 2 browser engines support an API before adding it to |
This has rolled out to Chrome and Firefox since (Safari is in experimental) https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/size#browser_compatibility Interestingly it looks like it's showing up in |
Closes #49774 (and my dupe #53141), where there's a type error when attempting to construct URLSearchParams from ReadonlyURLSearchParams, [as recommended in the Next docs here](https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams) and breaks `next build` on Node v18.16.0+, including on Vercel. This is blocked by TS publishing the new `dom` types (microsoft/TypeScript#54466). The [URL Standard](https://url.spec.whatwg.org/#dom-urlsearchparams-size) added the size property to URLSearchParams (whatwg/url#734) and this now has wide [browser support](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/size).
Add popup dialog and pieces needed for development environment Add URL encoding/decoding for korrel8r queries and unit testing Autofill query input with the page information Remove state being saved in URL's since other plugins may be using it Retrieve the graph of nearby Korrel8ted items. Limiting to 5 for now to prevent excess growth, can be revisited later. Filtering labels down to what is needed and used Remove sliding out the panel Remove unused Korrel8r Page Set query and response in redux state Add more specific setup instructions to help people test the troubleshooting panel Filter out unused nodes and edges Convert query response to nodes and edges in topology Fix CSS to not cause overflow of topology SVG past page length Update korrel8r installation instructions to bypass current permission bug Remove excess console logs Finish removing korrel8r page Swap to breadth first node sorting to align with the figma design Finalize CSS changes Migrate custom CSS to patternfly components and variables Clear query when closing troubleshooting panel Edges are omitted when blank Immediately send query when opening panel Use design icon for topology nodes Update topology node labels Clean up fetch functions Remove some copied boilerplate that isn't needed. abort any still pending requests when unmounting Alert and Log query <==> URL conversions Add testing, add factory, add first pass at integrating with topology Fix and test log corner cases Add cyclical parsing to ensure no data is lost Add metric url/query conversions Add netflow query/url conversions Remove the "or null" from static constructor return types since the functions now throw Filter out 0 count queries Move logic back into native JS URL functionality Add type polyfill to prevent typescript errors microsoft/TypeScript#54466 Incomplete progress on k8s query and url conversion. No testing and errors possible currently Fix base alert URL Fix testing verbiage Add default k8 and event URL and query adjustment. Update factory, and start using it in the topology on click Fix query to alert to fill in name as well to filter down the results Korrel8r just updated to 0.1.2, so define which version this works with Update the topology to show the selected node based on the URL and show a blank canvas on first load Add Troubleshooting Panel
Add popup dialog and pieces needed for development environment Add URL encoding/decoding for korrel8r queries and unit testing Autofill query input with the page information Remove state being saved in URL's since other plugins may be using it Retrieve the graph of nearby Korrel8ted items. Limiting to 5 for now to prevent excess growth, can be revisited later. Filtering labels down to what is needed and used Remove sliding out the panel Remove unused Korrel8r Page Set query and response in redux state Add more specific setup instructions to help people test the troubleshooting panel Filter out unused nodes and edges Convert query response to nodes and edges in topology Fix CSS to not cause overflow of topology SVG past page length Update korrel8r installation instructions to bypass current permission bug Remove excess console logs Finish removing korrel8r page Swap to breadth first node sorting to align with the figma design Finalize CSS changes Migrate custom CSS to patternfly components and variables Clear query when closing troubleshooting panel Edges are omitted when blank Immediately send query when opening panel Use design icon for topology nodes Update topology node labels Clean up fetch functions Remove some copied boilerplate that isn't needed. abort any still pending requests when unmounting Alert and Log query <==> URL conversions Add testing, add factory, add first pass at integrating with topology Fix and test log corner cases Add cyclical parsing to ensure no data is lost Add metric url/query conversions Add netflow query/url conversions Remove the "or null" from static constructor return types since the functions now throw Filter out 0 count queries Move logic back into native JS URL functionality Add type polyfill to prevent typescript errors microsoft/TypeScript#54466 Incomplete progress on k8s query and url conversion. No testing and errors possible currently Fix base alert URL Fix testing verbiage Add default k8 and event URL and query adjustment. Update factory, and start using it in the topology on click Fix query to alert to fill in name as well to filter down the results Korrel8r just updated to 0.1.2, so define which version this works with Update the topology to show the selected node based on the URL and show a blank canvas on first load Add Troubleshooting Panel Move files to web folder, fix most of the feedback, fix topology bug Move files to web folder, address some of the feedback, and fix the topology bug
Add popup dialog and pieces needed for development environment Add URL encoding/decoding for korrel8r queries and unit testing Autofill query input with the page information Remove state being saved in URL's since other plugins may be using it Retrieve the graph of nearby Korrel8ted items. Limiting to 5 for now to prevent excess growth, can be revisited later. Filtering labels down to what is needed and used Remove sliding out the panel Remove unused Korrel8r Page Set query and response in redux state Add more specific setup instructions to help people test the troubleshooting panel Filter out unused nodes and edges Convert query response to nodes and edges in topology Fix CSS to not cause overflow of topology SVG past page length Update korrel8r installation instructions to bypass current permission bug Remove excess console logs Finish removing korrel8r page Swap to breadth first node sorting to align with the figma design Finalize CSS changes Migrate custom CSS to patternfly components and variables Clear query when closing troubleshooting panel Edges are omitted when blank Immediately send query when opening panel Use design icon for topology nodes Update topology node labels Clean up fetch functions Remove some copied boilerplate that isn't needed. abort any still pending requests when unmounting Alert and Log query <==> URL conversions Add testing, add factory, add first pass at integrating with topology Fix and test log corner cases Add cyclical parsing to ensure no data is lost Add metric url/query conversions Add netflow query/url conversions Remove the "or null" from static constructor return types since the functions now throw Filter out 0 count queries Move logic back into native JS URL functionality Add type polyfill to prevent typescript errors microsoft/TypeScript#54466 Incomplete progress on k8s query and url conversion. No testing and errors possible currently Fix base alert URL Fix testing verbiage Add default k8 and event URL and query adjustment. Update factory, and start using it in the topology on click Fix query to alert to fill in name as well to filter down the results Korrel8r just updated to 0.1.2, so define which version this works with Update the topology to show the selected node based on the URL and show a blank canvas on first load Add Troubleshooting Panel Move files to web folder, fix most of the feedback, fix topology bug Move files to web folder, address some of the feedback, and fix the topology bug Finish correcting review items, i18n and testing locations Fix spacing Use npm rather than yarn Update tests to loop through inputs. Also remove already covered test cases
Bug Report
🔎 Search Terms
URLSearchParams
🕗 Version & Regression Information
TypeScript Version:
typescript@4.9.5
URLSearchParams.size
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
🙂 Expected behavior
No error
Related bug:
#38139
Note: Adding
{ "lib": ["dom.iterable"] }
to mycompilerOptions
does not help.The text was updated successfully, but these errors were encountered: