Open jamesrswift opened 2 years ago
Nice catch! The interface SubmitLinkOptions
is meant to be for snoowrap#submitLink
and not Subreddit#submitLink
. That means the shortcuts for the submit functions on the Subreddit
class need separate interfaces. Probably it's enough to just use Omit
:
submitLink (options: Omit<SubmitLinkOptions, 'subredditName'>) {
return this._r.submitLink({...options, subredditName: this.display_name})
}
https://github.com/not-an-aardvark/snoowrap/blob/498a8d5cb83181c53209a7c60de1c45b36358114/src/snoowrap.d.ts#L225
Marked without optional qualifier, however, in the javascript source, this member is autofilled to be equal to the parent object's display name: