apache / apache/echarts

[Bug] Duplicate Type Declaration Files Causing Compatibility Issues in ECharts Dist

Open
#20,836 0 comments 2 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.6.0

### Link to Minimal Reproduction

https://codesandbox.io/p/devbox/serene-shape-forked-9fdkkm?file=%2Fsrc%2FChartOptions.tsx%3A16%2C1&workspaceId=ws_Cu6yPpuirbVPUqy9GZp5AL

### Steps to Reproduce

Check for type errors in the options within src/ChartOptions.tsx

### Current Behavior

TypeScript throws compatibility errors due to duplicate/conflicting type declarations from these two files. This is caused by TypeScript's type compatibility rules for private/protected members ([TS Handbook Reference](https://www.typescriptlang.org/docs/handbook/type-compatibility.html#private-and-protected-members-in-classes)).

### Expected Behavior

1. Merge or partial consolidation of the type declaration files (echart.d.ts and shared.d.ts) to eliminate compatibility conflicts

2. Official documentation clarifying the proper usage pattern for these type definitions

3. An official fix in future ECharts releases if this is confirmed as a packaging issue

### Environment

```markdown
N/A
```

### Any additional comments?

Related discussion: https://github.com/hustcc/echarts-for-react/issues/589#issuecomment-2729226787

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.