mutoe / vue3-realworld-example-app

Explore the charm of Vue composition API! Vite?
https://vue3-realworld-example-app-mutoe.vercel.app
MIT License
963 stars 344 forks source link

why not just use new URLSearchParams(object).toString() ? #65

Closed orenmizr closed 3 years ago

orenmizr commented 3 years ago

https://github.com/mutoe/vue3-realworld-example-app/blob/2e48d2d516940eba7e8410480ddfee76665ff913/src/utils/params-to-query.ts#L2

love reading your code btw 👍

mutoe commented 3 years ago

Good suggestion, I will update it later :)

mutoe commented 3 years ago

I found it not feasible. The URLSearchParams constuctor only accept Record<string, string>, but I need to pass in Record<string, string | number | boolean>

image