tsdf 8.0.0-beta.5 → 8.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.d.ts +6 -6
  2. package/package.json +1 -1
package/dist/main.d.ts CHANGED
@@ -153,7 +153,7 @@ type TSFDUseListQueryReturn<Selected, ItemPayload, NError> = {
153
153
  hasMore: boolean;
154
154
  isLoading: boolean;
155
155
  };
156
- type TSFDUseItemReturn<Selected, NError, ItemPayload> = {
156
+ type TSFDUseListItemReturn<Selected, NError, ItemPayload> = {
157
157
  data: Selected;
158
158
  status: QueryStatus | 'idle' | 'deleted';
159
159
  payload: ItemPayload | null;
@@ -249,23 +249,23 @@ declare function newTSDFListQueryStore<ItemState extends ValidStoreState, NError
249
249
  loadSize?: number | undefined;
250
250
  }) => TSFDUseListQueryReturn<SelectedItem_1, QueryPayload, NError>;
251
251
  getItemKey: (params: ItemPayload) => string;
252
- useItem: <SelectedItem_2 = ItemState>(itemPayload: ItemPayload | false | null | undefined, options?: {
252
+ useItem: <SelectedItem_2 = ItemState | null>(itemPayload: ItemPayload | false | null | undefined, options?: {
253
253
  selector?: ((data: ItemState | null, id: string) => SelectedItem_2) | undefined;
254
254
  disableRefetchOnMount?: boolean | undefined;
255
255
  returnIdleStatus?: boolean | undefined;
256
256
  returnRefetchingStatus?: boolean | undefined;
257
257
  ensureIsLoaded?: boolean | undefined;
258
- }) => TSFDUseItemReturn<SelectedItem_2, NError, ItemPayload>;
259
- useMultipleItems: <SelectedItem_3 = ItemState>(itemsPayload_: ItemPayload[], { selector, returnIdleStatus, returnRefetchingStatus, disableRefetchOnMount, }?: {
258
+ }) => TSFDUseListItemReturn<SelectedItem_2, NError, ItemPayload>;
259
+ useMultipleItems: <SelectedItem_3 = ItemState | null>(itemsPayload_: ItemPayload[], { selector, returnIdleStatus, returnRefetchingStatus, disableRefetchOnMount, }?: {
260
260
  selector?: ((data: ItemState | null, id: string) => SelectedItem_3) | undefined;
261
261
  disableRefetchOnMount?: boolean | undefined;
262
262
  returnIdleStatus?: boolean | undefined;
263
263
  returnRefetchingStatus?: boolean | undefined;
264
- }) => readonly TSFDUseItemReturn<SelectedItem_3, NError, ItemPayload>[];
264
+ }) => readonly TSFDUseListItemReturn<SelectedItem_3, NError, ItemPayload>[];
265
265
  addItemToState: (itemPayload: ItemPayload, data: ItemState) => void;
266
266
  updateItemState: (itemIds: ItemPayload | ((ItemPayload: ItemPayload, itemState: ItemState) => boolean) | ItemPayload[], produceNewData: (draftData: ItemState, itemPayload: ItemPayload) => void | ItemState, ifNothingWasUpdated?: () => void) => boolean;
267
267
  startItemMutation: (itemId: ItemPayload | ((ItemPayload: ItemPayload, itemState: ItemState) => boolean) | ItemPayload[]) => () => void;
268
268
  };
269
269
  type TSFDListQueryStore<ItemState extends ValidStoreState, NError, QueryPayload extends ValidPayload, ItemPayload extends ValidPayload> = ReturnType<typeof newTSDFListQueryStore<ItemState, NError, QueryPayload, ItemPayload>>;
270
270
 
271
- export { FetchListFnReturn, TSDFCollectionStore, TSDFDocumentStore, TSDFDocumentStoreState, TSDFItemQuery, TSDFStatus, TSDFUseDocumentReturn, TSFDCollectionItem, TSFDCollectionState, TSFDListQuery, TSFDListQueryState, TSFDListQueryStore, TSFDUseCollectionItemReturn, TSFDUseItemReturn, TSFDUseListQueryReturn, ValidPayload, ValidStoreState, newTSDFCollectionStore, newTSDFDocumentStore, newTSDFListQueryStore };
271
+ export { FetchListFnReturn, TSDFCollectionStore, TSDFDocumentStore, TSDFDocumentStoreState, TSDFItemQuery, TSDFStatus, TSDFUseDocumentReturn, TSFDCollectionItem, TSFDCollectionState, TSFDListQuery, TSFDListQueryState, TSFDListQueryStore, TSFDUseCollectionItemReturn, TSFDUseListItemReturn, TSFDUseListQueryReturn, ValidPayload, ValidStoreState, newTSDFCollectionStore, newTSDFDocumentStore, newTSDFListQueryStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdf",
3
- "version": "8.0.0-beta.5",
3
+ "version": "8.0.0-beta.6",
4
4
  "description": "A data fetching solution based on t-state",
5
5
  "license": "MIT",
6
6
  "author": "Lucas Santos",