Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed May 16, 2024
1 parent 7378f0e commit 8664882
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions sync-map-template/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import type { Action, Meta } from '@logux/core'
import type { MapCreator, MapStore, StoreValue } from 'nanostores'

import type { Client } from '../client/index.js'
import type {
FilterStore,
FilterValue,
LoadedFilterValue
} from '../create-filter/index.js'
import type { FilterValue, LoadedFilterValue } from '../create-filter/index.js'

interface SyncMapStoreExt {
/**
Expand Down Expand Up @@ -311,9 +307,9 @@ type LoadableStore = ReadableStore<{ isLoading: boolean }> & {
*
* @param store Store to load.
*/
export function loadValue<Store extends FilterStore>(
export function loadValue<Store extends SyncMapStore>(
store: Store
): Promise<LoadedValue<StoreValue<Store>>>
): Promise<LoadedValue<StoreValue<Store>> | undefined>
export function loadValue<Store extends LoadableStore>(
store: Store
): Promise<LoadedValue<StoreValue<Store>> | undefined>
): Promise<LoadedValue<StoreValue<Store>>>

0 comments on commit 8664882

Please sign in to comment.