React Query extension type helpers?
I'm building an SDK that will provide hooks that wrap react-query v5 hooks. I'd like to customize some of the parameter and result shapes, but keep the amazing DX react-query provides, so I'm looking for a development library that would make that easier.
I've found that it's super easy to break some of the more intricate parts of react-query types. For example, it turns out you can't use
Omit
over a type union like UseMutationResult
, otherwise it'll break the isSuccess
<-> data: TData
coherence (see: https://stackoverflow.com/a/57103940/215024).
To spare myself some future headaches, I'd love to find something that would have utilities for building on top of React Query hooks. Does anyone have any suggestions?Stack Overflow
Typescript: Omit a property from all interfaces in a union, but kee...
I'm new to typescript and I have a few interfaces defined like so:
interface A {
toRemove: string;
key1: "this1";
key2: number;
}
interface B {
toRemove: string;
key1: "this2";
key3: s...
0 Replies