We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a704adc commit 582fc9aCopy full SHA for 582fc9a
packages/toolkit/src/query/tests/buildHooks.test.tsx
@@ -791,16 +791,24 @@ describe('hooks tests', () => {
791
792
// no-op simply for clearer type assertions
793
res.then((result) => {
794
- expectExactType<
795
- | {
796
- error: { status: number; data: unknown } | SerializedError
+ if (result.isSuccess) {
+ expectType<{
+ data: {
797
+ name: string
798
}
799
- data: {
800
- name: string
801
- }
802
803
- >(result)
+ }>(result)
+ }
+ if (result.isError) {
+ error: { status: number; data: unknown } | SerializedError
804
805
806
+ })
807
+
808
+ res.unwrap().then((result) => {
809
810
811
812
})
813
814
expectType<number>(res.arg)
0 commit comments