From 2d259bd2e8397021eb2b95eb269522b2d6c21eda Mon Sep 17 00:00:00 2001 From: Shubham Parihar Date: Sat, 13 Nov 2021 20:52:59 +0530 Subject: [PATCH] types: fetching rules returns a collection when option is undefined (#68) --- src/typings/Types.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/typings/Types.ts b/src/typings/Types.ts index 1658317..72fd761 100644 --- a/src/typings/Types.ts +++ b/src/typings/Types.ts @@ -92,7 +92,9 @@ export type MutesBookOptions = BookOptions; export type FilteredStreamRuleManagerFetchResult< T extends FetchFilteredStreamRuleOptions | FetchFilteredStreamRulesOptions, -> = T extends FetchFilteredStreamRuleOptions ? FilteredStreamRule : Collection; +> = T extends undefined | FetchFilteredStreamRulesOptions + ? Collection + : FilteredStreamRule; /** * Options used to reply to a tweet