diff --git a/types/snoowrap/index.d.ts b/types/snoowrap/index.d.ts index a2a36ff58e..cd2e3171d6 100644 --- a/types/snoowrap/index.d.ts +++ b/types/snoowrap/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for snoowrap 1.15 +// Type definitions for snoowrap 1.16 // Project: https://github.com/not-an-aardvark/snoowrap // Definitions by: Vito Samson // TheAppleFreak @@ -49,7 +49,7 @@ declare class Snoowrap { checkCaptchaRequirement(): Promise; checkUsernameAvailability(name: string): Promise; composeMessage(options: Snoowrap.ComposeMessageParams): Promise; - config(opts: Snoowrap.ConfigOptions): Snoowrap.ConfigOptions; + config(opts?: Snoowrap.ConfigOptions): Snoowrap.ConfigOptions; createLivethread(options: LiveThreadSettings): Promise<_LiveThread>; createMultireddit(options: MultiRedditProperties & { name: string; subreddits: _Subreddit[] | string[]}): Promise<_MultiReddit>; createSubreddit(options: SubredditSettings): Promise<_Subreddit>; diff --git a/types/snoowrap/snoowrap-tests.ts b/types/snoowrap/snoowrap-tests.ts index dac5233653..5f83d5dfa2 100644 --- a/types/snoowrap/snoowrap-tests.ts +++ b/types/snoowrap/snoowrap-tests.ts @@ -54,3 +54,11 @@ export function getNewComments(subreddit: string): Listing { export function thenable(): Promise { return r.getMe().then(me => me.name); } + +export function getConfig(): Snoowrap.ConfigOptions { + return r.config(); +} + +export function setConfig(options: Snoowrap.ConfigOptions): Snoowrap.ConfigOptions { + return r.config(options); +}