TypeScript Type Inference Issue with Record in API Query

wrong type inference with Record :

I don't know if it's normal or no or if it is a feature request but look at this code

const resp = api.folder.getAllFolders.useQuery(
  Record.getSomes({
    filter: Option.some(filter), // filter is string
    expertfilter: expertFilter, // expert filter is Option.Option<string>
  }),
);


I would except the return type of Record.getSomes to be a { filter: string ; expertfilter: string | undefined }
Was this page helpful?