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

correct typings for voteablecontent #5

Merged
merged 1 commit into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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