@livetiles/reach-plugin-types 0.5.0-preview.685 → 0.5.0-preview.686

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/lib/index.d.ts +4 -7
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -7699,9 +7699,6 @@ declare module "libs/reach/feature/content/src/comments/ThreadContext" {
7699
7699
  }
7700
7700
  declare module "libs/reach/feature/content/src/comments/useCommentsPageLoader" {
7701
7701
  import { Comment, ConversationScope, ItemResourceTypes, PaginatedList } from "libs/reach/util/common/src/index";
7702
- export type commentType = Comment & {
7703
- isNewComment?: boolean;
7704
- };
7705
7702
  type nextPageInfosType = {
7706
7703
  token: string;
7707
7704
  hasMoreUnreadComments?: boolean;
@@ -7709,14 +7706,14 @@ declare module "libs/reach/feature/content/src/comments/useCommentsPageLoader" {
7709
7706
  type isLoadingType = boolean;
7710
7707
  type hasNextPageType = boolean;
7711
7708
  type loadNextPageType = (nextPageTokenOverride?: string, pageSizeOverride?: number, doNotSetIsLoading?: boolean) => unknown;
7712
- type setCommentsType = (updateComments: (prevComments: commentType[]) => commentType[], updateNextPageInfos?: (prevNextPageInfos: nextPageInfosType) => nextPageInfosType) => unknown;
7709
+ type setCommentsType<T extends Comment = Comment> = (updateComments: (prevComments: T[]) => T[], updateNextPageInfos?: (prevNextPageInfos: nextPageInfosType) => nextPageInfosType) => unknown;
7713
7710
  type hasMoreUnreadCommentsType = boolean;
7714
- export function useCommentsPageLoader(type: ItemResourceTypes, scope: ConversationScope, itemId: string, pageSize: number, initialPageSize: number, initialComments?: PaginatedList<commentType>, preventLoading?: boolean, threadId?: string, shouldNotRefreshUserDetails?: boolean, shouldNotReverseOrder?: boolean): [
7715
- commentType[],
7711
+ export function useCommentsPageLoader<T extends Comment = Comment>(type: ItemResourceTypes, scope: ConversationScope, itemId: string, pageSize: number, initialPageSize: number, initialComments?: PaginatedList<T>, preventLoading?: boolean, threadId?: string, shouldNotRefreshUserDetails?: boolean, shouldNotReverseOrder?: boolean): [
7712
+ T[],
7716
7713
  isLoadingType,
7717
7714
  hasNextPageType,
7718
7715
  loadNextPageType,
7719
- setCommentsType,
7716
+ setCommentsType<T>,
7720
7717
  hasMoreUnreadCommentsType
7721
7718
  ];
7722
7719
  }
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.5.0-preview.685",
7
+ "version": "0.5.0-preview.686",
8
8
  "dependencies": {}
9
9
  }