Skip to content

Commit

Permalink
Merge pull request #312 from hannojg/fix/ts-callback-key-param-undefined
Browse files Browse the repository at this point in the history
fix callback key param when not waiting for collection callback
  • Loading branch information
grgia authored Aug 28, 2023
2 parents 94be0c7 + 79767ad commit 2fc6af8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Onyx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ type ConnectOptions<TKey extends OnyxKey> = BaseConnectOptions &
(
| {
key: TKey extends CollectionKey ? TKey : never;
callback?: (value: OnyxCollection<KeyValueMapping[TKey]>, key?: TKey) => void;
callback?: (value: OnyxCollection<KeyValueMapping[TKey]>) => void;
waitForCollectionCallback: true;
}
| {
key: TKey;
callback?: (value: OnyxEntry<KeyValueMapping[TKey]>, key?: TKey) => void;
callback?: (value: OnyxEntry<KeyValueMapping[TKey]>, key: TKey) => void;
waitForCollectionCallback?: false;
}
);
Expand Down

0 comments on commit 2fc6af8

Please sign in to comment.