Skip to content
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

Closed

Conversation

Wxh16144
Copy link

@Wxh16144 Wxh16144 commented Dec 7, 2023

No description provided.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1703b9b) 98.26% compared to head (792c6dc) 98.27%.

❗ Current head 792c6dc differs from pull request most recent head 6e8022a. Consider uploading reports for the commit 6e8022a to get more accurate results

Files Patch % Lines
src/index.tsx 94.59% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Comment on lines +87 to +89
"resolutions": {
"types-ramda": "0.29.4"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是什么原因

Copy link
Author

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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options 也得接受泛型吧

@Wxh16144
Copy link
Author

Wxh16144 commented Dec 8, 2023

Duplicate of #181

@Wxh16144 Wxh16144 closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants