kaine0923 commented on code in PR #19410:
URL: https://github.com/apache/echarts/pull/19410#discussion_r1429209210
##########
src/export/core.ts:
##########
@@ -93,11 +93,17 @@ type GetDependency<DependencyOption extends
ComponentOption> = {
type GetDependencies<MainType extends string> =
GetDependency<Dependencies[Extract<MainType, DependenciesKeys>]>;
+// Retrieves the keys of a type that are not of type string or number.
+// https://github.com/microsoft/TypeScript/issues/25987#issuecomment-870515762
+type KnownKeys<T> = keyof {
+ [K in keyof T as string extends K ? never : number extends K ? never : K]:
never
+};
+
type ComposeUnitOption<OptionUnion extends ComponentOption> =
// Will be never if some component forget to specify mainType.
CheckMainType<GetMainType<OptionUnion>> &
Omit<EChartsCoreOption, 'baseOption' | 'options'> & {
- [key in GetMainType<OptionUnion>]?: Arrayable<
+ [key in KnownKeys<GetMainType<OptionUnion>>]?: Arrayable<
Review Comment:
I wanted to provide an update regarding the PR that addressed the issue with
the `vue-charts` library and the misalignment of EChartsOption with
ComposeOption.
Upon further investigation, I realized that the problem does not originate
from the ECharts library. Instead, it appears to be caused by a logic issue in
another part of the codebase.
I sincerely apologize for any confusion or inconvenience this may have
caused. After carefully considering it, I have decided to close this PR, since
it is unnecessary to modify the ECharts types to resolve the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]