diff --git a/types/snoowrap/index.d.ts b/types/snoowrap/index.d.ts index 05dfc821fd..e80814d6f9 100644 --- a/types/snoowrap/index.d.ts +++ b/types/snoowrap/index.d.ts @@ -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>; getLivethread(threadId: string): _LiveThread; getMe(): _RedditUser; @@ -73,7 +73,7 @@ declare class Snoowrap { getMyTrophies(): Promise; getNew(subredditName?: string, options?: ListingOptions): _Listing<_Submission>; getNewCaptchaIdentifier(): Promise; - getNewComments(subredditName?: string, options?: ListingOptions): _Listing; + 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>; diff --git a/types/snoowrap/snoowrap-tests.ts b/types/snoowrap/snoowrap-tests.ts index 7c0588372c..dfea881a8b 100644 --- a/types/snoowrap/snoowrap-tests.ts +++ b/types/snoowrap/snoowrap-tests.ts @@ -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 { + return r.getNewComments(subreddit); +}