Yupeng-li opened a new issue, #20671:
URL: https://github.com/apache/echarts/issues/20671

   ### Version
   
   5.6.0
   
   ### Link to Minimal Reproduction
   
   https://codesandbox.io/p/sandbox/v29fdw
   
   ### Steps to Reproduce
   
   Previously with the version 5.4.3, we can import internal types, such as 
`ValueAxisBaseOption`, `DataZoomOption`, `AreaStyleOption` and so on, from 
files where they are defined.
   
   ```ts
   import { ValueAxisBaseOption } from 'echarts/types/src/coord/axisCommonTypes'
   ```
   These types are **useful** when we write unit tests or when we write util 
functions that customise these options based on certain parameters.
   
   However since 5.6.0 we can no longer do this, because you updated the 
`exports` field in `package.json` and those files are no longer recognisable by 
typescript. 
   
   This might not be a bug, but it does break our code base. As a workaround, I 
added a patch to export them from 
`/node_modules/echarts/types/dist/echarts.d.ts`, so I can import in this way: 
   
   ```ts
   import { ValueAxisBaseOption } from 'echarts'
   ```
   
   I wonder if you can export them by default, so we get more precise types? 
   
   
   ### Current Behavior
   
   We can no longer import internal types, such as `ValueAxisBaseOption`, 
`DataZoomOption`, `AreaStyleOption` and so on,
   
   ### Expected Behavior
   
   Be able to import them
   
   ### Environment
   
   ```markdown
   - OS: macOS sequoia
   - Browser: N/A
   - Framework: react, react-native
   ```
   
   
   ### Any additional comments?
   
   Please note that the `moduleResolution` in our `tsconfig` is  set to 
`bundler`.  Those types can still be imported if it's set to `node`. But in our 
case, we have to use `bundler`. 


-- 
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]

Reply via email to