Skip to content

Commit c22184d

Browse files
author
Letty
committed
chore: export missing types for createQueryKeyStore (#108)
1 parent c0e80e8 commit c22184d

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/export-missing-types.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@lukemorales/query-key-factory": minor
3+
---
4+
5+
Export missing types for createQueryKeyStore (QueryKeyStore, QueryKeyStoreSchema, QueryFactorySchema) to enable proper typing of wrapper functions.

src/create-query-key-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { QueryFactorySchema, QueryKeyFactoryResult } from './create-query-k
33
import type { DefinitionKey } from './types';
44
import { omitPrototype } from './internals';
55

6-
type QueryKeyStoreSchema = Record<string, null | QueryFactorySchema>;
6+
export type QueryKeyStoreSchema = Record<string, null | QueryFactorySchema>;
77

88
export type QueryKeyStore<StoreSchema extends QueryKeyStoreSchema> = {
99
[P in keyof StoreSchema & string]: StoreSchema[P] extends QueryFactorySchema ?

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ export { createQueryKeys } from './create-query-keys';
44
export { mergeQueryKeys } from './merge-query-keys';
55

66
export type { TypedUseQueryOptions, inferQueryKeyStore, inferQueryKeys } from './utility-types';
7+
export type { QueryKeyStore, QueryKeyStoreSchema } from './create-query-key-store';
8+
export type { QueryFactorySchema } from './create-query-keys.types';

0 commit comments

Comments
 (0)