Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from JamesxX/votablecontent-properties
Browse files Browse the repository at this point in the history
Correct typings for voteablecontent. All credit to @FoxxMD
  • Loading branch information
iMrDJAi authored Jan 24, 2022
2 parents 5602a96 + dc0e571 commit 0562bb5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/objects/Comment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Subreddit from './Subreddit';
import VoteableContent from './VoteableContent';

export default class Comment extends VoteableContent<Comment> {
approved: boolean;
body_html: string;
body: string;
collapsed_reason: any; // ?
Expand Down
1 change: 0 additions & 1 deletion src/objects/Submission.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default class Submission extends VoteableContent<Submission> {
link_flair_text: string | null;
link_flair_text_color: 'dark' | 'light';
link_flair_type: 'text' | 'richtext';
locked: boolean;
media: Media | null;
media_embed: MediaEmbed;
media_only: boolean;
Expand Down
2 changes: 2 additions & 0 deletions src/objects/VoteableContent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type SubredditType =
| 'public';

export default class VoteableContent<T> extends ReplyableContent<T> {
approved?: boolean;
approved_at_utc: number | null;
approved_by: RedditUser | null;
archived: boolean;
Expand All @@ -55,6 +56,7 @@ export default class VoteableContent<T> extends ReplyableContent<T> {
edited: number | boolean;
gilded: number;
gildings: Gildings;
locked: boolean;
/** true = upvoted, false = downvoted, null = hasn't voted */
likes: boolean | null;
mod_note: string;
Expand Down

0 comments on commit 0562bb5

Please sign in to comment.