-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore (types): small refactorings and two new helper types #1823
Conversation
…ching towards tackling breaking changes / prep for major release of types.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1823 +/- ##
=======================================
Coverage 81.76% 81.76%
=======================================
Files 35 35
Lines 7745 7745
Branches 317 317
=======================================
Hits 6333 6333
Misses 1400 1400
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All great changes and great improvements 🪄 The docs are solid too - LGTM! 🚀
@@ -50,6 +50,7 @@ export interface Block { | |||
*/ | |||
export type KnownBlock = ImageBlock | ContextBlock | ActionsBlock | DividerBlock | | |||
SectionBlock | InputBlock | FileBlock | HeaderBlock | VideoBlock | RichTextBlock; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌 🙌
/** | ||
* Re-usable labels for common color schemes present in Slack. `danger` displays with a red background (red text on | ||
* mobile), while `primary` displays with a green background (green text on mobile). | ||
*/ | ||
export type ColorScheme = 'primary' | 'danger'; | ||
|
||
/** The conversation type as available within the Slack UI. */ | ||
export type Conversation = 'im' | 'mpim' | 'private' | 'public'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicee 👏
interface BaseConversationFilter { | ||
/** | ||
* @description Indicates which type of conversations should be included in the list. When this field is provided, any | ||
* conversations that do not match will be excluded. You should provide an array of strings from the following options: | ||
* `im`, `mpim`, `private`, and `public`. The array cannot be empty. | ||
*/ | ||
include?: [Conversation, ...Conversation[]]; // TS gymnastics for "at least one item" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL! This is interesting 😳
@@ -182,6 +180,7 @@ export interface Confirmation { | |||
title?: string; | |||
} | |||
|
|||
// Used in web-api chat.* API method request parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ColorScheme
,MaxItemsSelectable
,RichTextBorderable
,URLRespondable
, andConversation