Fix snoowrap typedefs to refer to _Comment instead of Comment

This commit is contained in:
Mayank Mandava
2017-11-02 09:03:33 -07:00
parent b67c928904
commit 27c18cb3ea
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ declare class Snoowrap {
getFriends(): Promise<_RedditUser[]>;
getGoldSubreddits(options?: ListingOptions): _Listing<_Subreddit>;
getHot(subredditName?: string, options?: ListingOptions): _Listing<_Submission>;
getInbox(options?: { filter?: string }): _Listing<_PrivateMessage | Comment>;
getInbox(options?: { filter?: string }): _Listing<_PrivateMessage | _Comment>;
getKarma(): Promise<Array<{ sr: _Subreddit; comment_karma: number; link_karma: number; }>>;
getLivethread(threadId: string): _LiveThread;
getMe(): _RedditUser;
@@ -73,7 +73,7 @@ declare class Snoowrap {
getMyTrophies(): Promise<Snoowrap.Trophy[]>;
getNew(subredditName?: string, options?: ListingOptions): _Listing<_Submission>;
getNewCaptchaIdentifier(): Promise<string>;
getNewComments(subredditName?: string, options?: ListingOptions): _Listing<Comment>;
getNewComments(subredditName?: string, options?: ListingOptions): _Listing<_Comment>;
getNewSubreddits(options?: ListingOptions): _Listing<_Subreddit>;
getOauthScopeList(): Promise<{ [key: string]: { description: string; id: string; name: string } }>;
getPopularSubreddit(options?: ListingOptions): _Listing<_Subreddit>;
+5
View File
@@ -1,6 +1,7 @@
import * as Snoowrap from 'snoowrap';
import {
Comment,
Listing,
LiveThread,
MultiReddit,
PrivateMessage,
@@ -45,3 +46,7 @@ export function subreddit(name: string): Subreddit {
export function wiki(subreddit: string, page: string): WikiPage {
return r.getSubreddit(subreddit).getWikiPage(page);
}
export function getNewComments(subreddit: string): Listing<Comment> {
return r.getNewComments(subreddit);
}