Skip to content

Commit

Permalink
add infinite query option types to public api
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoud-dv committed May 7, 2024
1 parent d62edad commit ce5af9f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,26 @@ export type DefinedCreateQueryResult<
TDefinedQueryObserver = DefinedQueryObserverResult<TData, TError>,
> = MapToSignals<TDefinedQueryObserver>

// @public (undocumented)
export type DefinedInitialDataInfiniteOptions<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
> = CreateInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryFnData,
TQueryKey,
TPageParam
> & {
initialData:
| NonUndefinedGuard_2<InfiniteData<TQueryFnData, TPageParam>>
| (() => NonUndefinedGuard_2<InfiniteData<TQueryFnData, TPageParam>>)
}

// @public (undocumented)
export type DefinedInitialDataOptions<
TQueryFnData = unknown,
Expand All @@ -296,8 +316,6 @@ export type DefinedInitialDataOptions<
| (() => NonUndefinedGuard<TQueryFnData>)
}

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

// Warning: (ae-forgotten-export) The symbol "DefinedInitialDataInfiniteOptions" needs to be exported by the entry point index.d.ts
//
// @public
export function infiniteQueryOptions<
TQueryFnData,
Expand Down Expand Up @@ -632,6 +648,24 @@ export function queryOptions<
queryKey: DataTag<TQueryKey, TQueryFnData>
}

// @public (undocumented)
export type UndefinedInitialDataInfiniteOptions<
TQueryFnData,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
> = CreateInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryFnData,
TQueryKey,
TPageParam
> & {
initialData?: undefined
}

// @public (undocumented)
export type UndefinedInitialDataOptions<
TQueryFnData = unknown,
Expand All @@ -646,7 +680,8 @@ export * from '@tanstack/query-core'

// Warnings were encountered during analysis:
//
// src/query-options.ts:27:3 - (ae-forgotten-export) The symbol "NonUndefinedGuard" needs to be exported by the entry point index.d.ts
// 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
// build/query-options.d.ts:14:5 - (ae-forgotten-export) The symbol "NonUndefinedGuard" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)
```
4 changes: 4 additions & 0 deletions packages/angular-query-experimental/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export type {
} from './query-options'
export { queryOptions } from './query-options'

export type {
DefinedInitialDataInfiniteOptions,
UndefinedInitialDataInfiniteOptions,
} from './infinite-query-options'
export { infiniteQueryOptions } from './infinite-query-options'

export * from './inject-infinite-query'
Expand Down

0 comments on commit ce5af9f

Please sign in to comment.