Skip to content

Commit 61d2f6d

Browse files
committed
Fix error type inference with conditional queries
Uncommented the error type assertion that was marked as TODO. The error type inference now works correctly, likely due to the queryKey reactive changes in PR #71. The test now properly verifies that error.value has type 'false | null' when using conditional queries with SKIP token and select option. Closes #69
1 parent fb9c689 commit 61d2f6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/openapi-vue-query/test/index.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ describe("client", () => {
195195
);
196196

197197
expectTypeOf(result.data.value).toEqualTypeOf<"select(true)" | undefined>();
198-
// TODO: fix this
199-
// expectTypeOf(result.error.value).toEqualTypeOf<false | null>();
198+
expectTypeOf(result.error.value).toEqualTypeOf<false | null>();
200199
});
201200

202201
it("returns query options without an init", async () => {

0 commit comments

Comments
 (0)