-
Notifications
You must be signed in to change notification settings - Fork 53
chore(types): make Props param in ShorthandValue and ShorthandCollection required #1605
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1605 +/- ##
==========================================
+ Coverage 71.23% 71.24% +0.01%
==========================================
Files 851 851
Lines 7032 7035 +3
Branches 2025 2027 +2
==========================================
+ Hits 5009 5012 +3
Misses 2017 2017
Partials 6 6
Continue to review full report at Codecov.
|
…/stardust-ui/react into chore/type-script # Conflicts: # docs/src/prototypes/chatMessages/MessageReactionsWithPopup/index.tsx # packages/react/src/components/Button/ButtonGroup.tsx # packages/react/src/components/Dialog/Dialog.tsx # packages/react/src/components/Dropdown/Dropdown.tsx # packages/react/src/components/Form/Form.tsx # packages/react/src/components/Input/Input.tsx # packages/react/src/components/Reaction/ReactionGroup.tsx # packages/react/src/lib/factories.ts # packages/react/test/specs/lib/factories-test.tsx
docs/src/examples/components/Chat/Content/ChatExampleReactionGroupMeReacting.shorthand.tsx
Outdated
Show resolved
Hide resolved
|
||
/** Indicates whether the content is positioned at the start or the end. */ | ||
contentPosition?: 'start' | 'end' | ||
|
||
/** Chat items can have a message. */ | ||
message?: ShorthandValue | ||
message?: ShorthandValue<ChatMessageProps> |
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.
Actually this should be BoxProps
, see line 109. We can easily do some miss match here.. :(
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.
Great catch 👍
I am bit disappointed that we don't have strict checks there, but at least we will be able to improve them and catch such cases
…ore/type-script # Conflicts: # docs/src/components/Sidebar/Sidebar.tsx
packages/react/src/components/Dropdown/DropdownSelectedItem.tsx
Outdated
Show resolved
Hide resolved
…/stardust-ui/react into chore/type-script
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.
Don't forget to add changelog with BREAKING CHANGES entry.
BREAKING CHANGES
Only if you have used
ShorthandValue
orShorthandCollection
types.Before
After
This PR makers
P
inShorthandValue<P>
required, this will allow to get better autocomplete, improve types and generate better prop definitions.