Skip to content

Commit ce5af9f

Browse files
committed
add infinite query option types to public api
1 parent d62edad commit ce5af9f

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

packages/angular-query-experimental/etc/angular-query-experimental.api.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,26 @@ export type DefinedCreateQueryResult<
284284
TDefinedQueryObserver = DefinedQueryObserverResult<TData, TError>,
285285
> = MapToSignals<TDefinedQueryObserver>
286286

287+
// @public (undocumented)
288+
export type DefinedInitialDataInfiniteOptions<
289+
TQueryFnData,
290+
TError = DefaultError,
291+
TData = InfiniteData<TQueryFnData>,
292+
TQueryKey extends QueryKey = QueryKey,
293+
TPageParam = unknown,
294+
> = CreateInfiniteQueryOptions<
295+
TQueryFnData,
296+
TError,
297+
TData,
298+
TQueryFnData,
299+
TQueryKey,
300+
TPageParam
301+
> & {
302+
initialData:
303+
| NonUndefinedGuard_2<InfiniteData<TQueryFnData, TPageParam>>
304+
| (() => NonUndefinedGuard_2<InfiniteData<TQueryFnData, TPageParam>>)
305+
}
306+
287307
// @public (undocumented)
288308
export type DefinedInitialDataOptions<
289309
TQueryFnData = unknown,
@@ -296,8 +316,6 @@ export type DefinedInitialDataOptions<
296316
| (() => NonUndefinedGuard<TQueryFnData>)
297317
}
298318

299-
// Warning: (ae-forgotten-export) The symbol "UndefinedInitialDataInfiniteOptions" needs to be exported by the entry point index.d.ts
300-
//
301319
// @public
302320
export function infiniteQueryOptions<
303321
TQueryFnData,
@@ -323,8 +341,6 @@ export function infiniteQueryOptions<
323341
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>
324342
}
325343

326-
// Warning: (ae-forgotten-export) The symbol "DefinedInitialDataInfiniteOptions" needs to be exported by the entry point index.d.ts
327-
//
328344
// @public
329345
export function infiniteQueryOptions<
330346
TQueryFnData,
@@ -632,6 +648,24 @@ export function queryOptions<
632648
queryKey: DataTag<TQueryKey, TQueryFnData>
633649
}
634650

651+
// @public (undocumented)
652+
export type UndefinedInitialDataInfiniteOptions<
653+
TQueryFnData,
654+
TError = DefaultError,
655+
TData = InfiniteData<TQueryFnData>,
656+
TQueryKey extends QueryKey = QueryKey,
657+
TPageParam = unknown,
658+
> = CreateInfiniteQueryOptions<
659+
TQueryFnData,
660+
TError,
661+
TData,
662+
TQueryFnData,
663+
TQueryKey,
664+
TPageParam
665+
> & {
666+
initialData?: undefined
667+
}
668+
635669
// @public (undocumented)
636670
export type UndefinedInitialDataOptions<
637671
TQueryFnData = unknown,
@@ -646,7 +680,8 @@ export * from '@tanstack/query-core'
646680

647681
// Warnings were encountered during analysis:
648682
//
649-
// src/query-options.ts:27:3 - (ae-forgotten-export) The symbol "NonUndefinedGuard" needs to be exported by the entry point index.d.ts
683+
// build/infinite-query-options.d.ts:16:5 - (ae-forgotten-export) The symbol "NonUndefinedGuard_2" needs to be exported by the entry point index.d.ts
684+
// build/query-options.d.ts:14:5 - (ae-forgotten-export) The symbol "NonUndefinedGuard" needs to be exported by the entry point index.d.ts
650685

651686
// (No @packageDocumentation comment for this package)
652687
```

packages/angular-query-experimental/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export type {
1111
} from './query-options'
1212
export { queryOptions } from './query-options'
1313

14+
export type {
15+
DefinedInitialDataInfiniteOptions,
16+
UndefinedInitialDataInfiniteOptions,
17+
} from './infinite-query-options'
1418
export { infiniteQueryOptions } from './infinite-query-options'
1519

1620
export * from './inject-infinite-query'

0 commit comments

Comments
 (0)