-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hello !
- seem like the type for event.subscribe is wrong ? the correct type
EventListener's
args is Custom Event not event
Lines 164 to 188 in 91cb43d
export interface TurboQuery { | |
/** | |
* Configures the current instance of turbo query. | |
*/ | |
readonly configure: (options?: Partial<TurboQueryConfiguration>) => void | |
/** | |
* Fetches the key information using a fetcher. | |
* The returned promise contains the result item. | |
*/ | |
readonly query: <T = unknown>(key: string, options?: TurboQueryOptions<T>) => Promise<T> | |
/** | |
* Subscribes to a given event on a key. The event handler | |
* does have a payload parameter that will contain relevant | |
* information depending on the event type. | |
*/ | |
readonly subscribe: (key: string, event: TurboQueryEvent, listener: EventListener) => Unsubscriber | |
/** | |
* Mutates the key with a given optimistic value. | |
* The mutated value is considered expired and will be | |
* replaced immediatly if a refetch happens. | |
*/ | |
readonly mutate: <T = unknown>(key: string, item: TurboMutateValue<T>) => void |
- can you export the type for ResolversCacheItem and others ? i can get them through some TS code but it would be helpful too have all types exported to use custom cache or custom resolver
Metadata
Metadata
Assignees
Labels
No labels