Skip to content

Commit

Permalink
types: fetching rules returns a collection when option is undefined (#68
Browse files Browse the repository at this point in the history
)
  • Loading branch information
iShibi authored Nov 13, 2021
1 parent d5d8e7d commit 2d259bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/typings/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export type MutesBookOptions = BookOptions;

export type FilteredStreamRuleManagerFetchResult<
T extends FetchFilteredStreamRuleOptions | FetchFilteredStreamRulesOptions,
> = T extends FetchFilteredStreamRuleOptions ? FilteredStreamRule : Collection<Snowflake, FilteredStreamRule>;
> = T extends undefined | FetchFilteredStreamRulesOptions
? Collection<Snowflake, FilteredStreamRule>
: FilteredStreamRule;

/**
* Options used to reply to a tweet
Expand Down

0 comments on commit 2d259bd

Please sign in to comment.