Skip to content

Commit c3fa48b

Browse files
committed
refactor: missing fixes in types
1 parent ca6a04f commit c3fa48b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/data-loaders/defineColadaLoader.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ export const joinKeys = (keys: string[]): string => keys.join('|')
512512
export interface _DefineDataColadaLoaderOptions_Common<
513513
Name extends keyof RouteMap,
514514
Data,
515-
> extends Omit<UseQueryOptions<Data>, 'query' | 'key'> {
515+
> extends Omit<UseQueryOptions<Data, ErrorDefault, Data>, 'query' | 'key'> {
516516
/**
517517
* Key associated with the data and passed to pinia colada
518518
* @param to - Route to load the data
@@ -620,8 +620,8 @@ export interface UseDataLoaderColada_LaxData<Data>
620620
/**
621621
* Data Loader composable returned by `defineColadaLoader()`.
622622
*/
623-
export interface UseDataLoaderColada_DefinedData<Data>
624-
extends UseDataLoader<Data, ErrorDefault> {
623+
export interface UseDataLoaderColada_DefinedData<TData>
624+
extends UseDataLoader<TData, ErrorDefault> {
625625
/**
626626
* Data Loader composable returned by `defineColadaLoader()`.
627627
*
@@ -646,9 +646,13 @@ export interface UseDataLoaderColada_DefinedData<Data>
646646
// we can await the raw data
647647
// excluding NavigationResult allows to ignore it in the type of Data when doing
648648
// `return new NavigationResult()` in the loader
649-
Exclude<Data, NavigationResult | undefined>,
649+
Exclude<TData, NavigationResult | undefined>,
650650
// or use it as a composable
651-
UseDataLoaderColadaResult<Exclude<Data, NavigationResult>>
651+
UseDataLoaderColadaResult<
652+
Exclude<TData, NavigationResult>,
653+
ErrorDefault,
654+
Exclude<TData, NavigationResult>
655+
>
652656
>
653657
}
654658

0 commit comments

Comments
 (0)