Skip to content

Commit 89bb733

Browse files
committed
add tests
1 parent 44c7a72 commit 89bb733

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/toolkit/src/query/tests/createApi.test-d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,18 +498,23 @@ describe('type tests', () => {
498498
id: number
499499
}>()
500500
expectTypeOf(api.endpoints.query.Types.ResultType).toEqualTypeOf<Post>()
501+
expectTypeOf(api.endpoints.query.Types.RawResultType).toBeAny()
501502

502503
expectTypeOf(api.endpoints.query2.Types.QueryArg).toEqualTypeOf<{
503504
id: number
504505
}>()
505506
expectTypeOf(
506507
api.endpoints.query2.Types.ResultType,
507508
).toEqualTypeOf<Post>()
509+
expectTypeOf(api.endpoints.query2.Types.RawResultType).toBeAny()
508510

509511
expectTypeOf(api.endpoints.query3.Types.QueryArg).toEqualTypeOf<void>()
510512
expectTypeOf(api.endpoints.query3.Types.ResultType).toEqualTypeOf<
511513
EntityState<Post, Post['id']>
512514
>()
515+
expectTypeOf(api.endpoints.query3.Types.RawResultType).toEqualTypeOf<
516+
Post[]
517+
>()
513518
})
514519
})
515520
})

0 commit comments

Comments
 (0)