UNPKG

1.22 kBTypeScriptView Raw
1import { IComments, ILikeData, ILikedByInformation, RatingValues } from "./types.js";
2declare module "../items/types" {
3 interface _Item {
4 readonly comments: IComments;
5 getLikedBy(): Promise<ILikeData[]>;
6 like(): Promise<void>;
7 unlike(): Promise<void>;
8 getLikedByInformation(): Promise<ILikedByInformation>;
9 rate(rating: RatingValues): Promise<number>;
10 }
11 interface IItem {
12 readonly comments: IComments;
13 /**
14 * Gets the collection of people who have liked this item
15 */
16 getLikedBy(): Promise<ILikeData[]>;
17 /**
18 * Likes this client-side page as the current user
19 */
20 like(): Promise<void>;
21 /**
22 * Unlikes this client-side page as the current user
23 */
24 unlike(): Promise<void>;
25 /**
26 * Unlikes this item as the current user
27 */
28 getLikedByInformation(): Promise<ILikedByInformation>;
29 /**
30 * Rates this item as the current user
31 * @param rating rating number between 1-5
32 * @returns rating number
33 */
34 rate(rating: RatingValues): Promise<number>;
35 }
36}
37//# sourceMappingURL=item.d.ts.map
\No newline at end of file