-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(type): value supports generic definition #180
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #180 +/- ##
==========================================
+ Coverage 98.26% 98.27% +0.01%
==========================================
Files 2 2
Lines 115 116 +1
Branches 27 27
==========================================
+ Hits 113 114 +1
Misses 2 2 ☔ View full report in Codecov by Sentry. |
"resolutions": { | ||
"types-ramda": "0.29.4" | ||
}, |
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.
这个是什么原因
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.
貌似跑 tsc 会挂,但是今天看 181 pr 又是好的,估计是 tsconfig include有点问题吧
src/index.tsx
Outdated
@@ -65,7 +68,7 @@ function normalizeOptions(options: SegmentedOptions): SegmentedLabeledOption[] { | |||
}); | |||
} | |||
|
|||
const InternalSegmentedOption: React.FC<{ | |||
interface _InternalSegmentedOptionProps { |
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.
interface _InternalSegmentedOptionProps { | |
interface InternalSegmentedOptionProps { |
src/index.tsx
Outdated
/** | ||
* Generic parameter `Value` is supported since 2.3.0 | ||
*/ | ||
export interface SegmentedProps<Value extends SegmentedValue = SegmentedValue> | ||
extends Omit<React.HTMLProps<HTMLDivElement>, 'onChange'> { | ||
options: SegmentedOptions; |
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.
options 也得接受泛型吧
Duplicate of #181 |
No description provided.