TanStackT
TanStack2mo ago
2 replies
thoughtless-moccasin

stripSearchParams type problem

I'm stripping out default values with stripSearchParams but I get a type error:
  search: {
    middlewares: [stripSearchParams(['tab'])], // real life more advanced than this
  },

Type problem:
Type 'SearchMiddleware<unknown>' is not assignable to type 'SearchMiddleware<{ tab: ...}>

Am I missing something or is it just not working the way it should? I'm currently using // @ts-expect-error to get around this.
Was this page helpful?