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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: remove ts-nocheck comments in select-v2 #16746
base: dev
Are you sure you want to change the base?
chore: remove ts-nocheck comments in select-v2 #16746
Conversation
馃憢 @makedopamine, thank you for contributing element-plus. |
Hello @makedopamine, thank you for contributing to element-plus, please see our guideline to see how to make contribution |
馃И Playground Preview: https://element-plus.run/?pr=16746 |
Found hundreds of |
I actually notice the problem what you say, however, its workload is somewhat heavy to address it completely in a single PR. And I think a large PR is hard for reviewers to review, so I prefer to split the task into separate PRs. |
Thanks for your review. There's been a modification, please take a look. |
I pushed a new commit, kindly take note. |
b10e785
to
31abd48
Compare
76950f3
to
595ea25
Compare
index: Number, | ||
index: { | ||
type: Number, | ||
required: true, |
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.
Is setting required
required here?
}, | ||
height: { | ||
type: Number, | ||
required: true, |
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.
required
is necessary ?
loading: Boolean, | ||
data: { | ||
type: Array, | ||
required: true as const, |
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.
as const
seems unnecessary.
} | ||
export const optionEmits = { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
hover: (index: number) => true, |
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.
hover: (index: number) => true, | |
hover: (index: number) => isNumber(index), |
visibleChange: (visible: boolean) => true, | ||
clear: () => true, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
focus: (event: FocusEvent) => true, |
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.
focus: (event: FocusEvent) => true, | |
focus: (event: FocusEvent) => event instanceof FocusEvent, |
// eslint-disable-next-line vue/return-in-computed-property | ||
const validateIcon = computed(() => { | ||
if (!validateState.value) return | ||
return ValidateComponentsMap[validateState.value] |
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 seems to be no need to add additional judgment here. If validateState.value
does not exist, the returned value should also be undefined
.
__: any, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
___: any | ||
): Record<string, T> => ({}) |
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.
It seems that there is no need to add so many comments here, using as
should be fine.
const _getItemStyleCache = (_: any, __: any, ___: any) =>
({} as Record<string, T>)
No description provided.