You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/12/20 21:37:55 UTC

[GitHub] [incubator-echarts] beyerleinf opened a new issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

beyerleinf opened a new issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850


   ### Version
   5.0.0
   
   ### Steps to reproduce
   So, I wanted to switch to echarts@5.0.0 since the whole codebase had been migrated to TypeScript but it seems that `types/dist/echarts.d.ts` can't be built properly. I've tried it in my Angular 11 project and a simple node project with just TypeScript installed. I also pasted the code of `types/dist/echarts.d.ts` into the TypeScript Playground and get the same errors.
   
   These are some of the errors I'm getting (I left out the ones with long traces):
   ```
   Error: node_modules/echarts/types/dist/echarts.d.ts:1568:46 - error TS2339: Property 'rotate' does not exist on type 'AxisLabelOption | undefined'.
   
   1568         rotate?: AxisBaseOption['axisLabel']['rotate'];
                                                     ~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:2034:5 - error TS2411: Property 'itemId' of type 'string | number | (string | number)[] | undefined' is not assignable to string index type 'OptionEncodeValue'.
   
   2034     [coordDim: string]: OptionEncodeValue;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:2034:5 - error TS2411: Property 'itemName' of type 'string | number | (string | number)[] | undefined' is not assignable to string index type 'OptionEncodeValue'.
   
   2034     [coordDim: string]: OptionEncodeValue;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:2034:5 - error TS2411: Property 'label' of type 'string | number | (string | number)[] | undefined' is not assignable to string index type 'OptionEncodeValue'.
   
   2034     [coordDim: string]: OptionEncodeValue;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:2034:5 - errorm TS2411: Property 'seriesName' of type 'string | number | (string | number)[] | undefined' is not assignable to string index type 'OptionEncodeValue'.
   
   2034     [coordDim: string]: OptionEncodeValue;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:2034:5 - error TS2411: Property 'tooltip' of type 'string | number | (string | number)[] | undefined' is not assignable to string index type 'OptionEncodeValue'.
   
   2034     [coordDim: string]: OptionEncodeValue;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:3318:49 - error TS2339: Property 'focus' does not exist on type '(GraphNodeStateOption & ExtraEmphasisState & { blurScope?: "global" | "series" | "coordinateSystem" | undefined; }) | undefined'.
   
   3318         focus?: GraphNodeItemOption['emphasis']['focus'];
                                                        ~~~~~~~
   3841 interface ToolboxMagicTypeFeatureOption extends ToolboxFeatureOption {
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:4011:9 - error TS2411: Property 'brush' of type 'ToolboxBrushFeatureOption | undefined' is not assignable to string index type 'ToolboxFeatureOption | { [key: string]: any; }'.
   
   4011         brush?: ToolboxBrushFeatureOption;
                ~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:4012:9 - error TS2411: Property 'dataView' of type 'ToolboxDataViewFeatureOption | undefined' is not assignable to string index type 'ToolboxFeatureOption | { [key: string]: any; }'.
   
   4012         dataView?: ToolboxDataViewFeatureOption;
                ~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:4013:9 - error TS2411: Property 'dataZoom' of type 'ToolboxDataZoomFeatureOption | undefined' is not assignable to string index type 'ToolboxFeatureOption | { [key: string]: any; }'.
   
   4013         dataZoom?: ToolboxDataZoomFeatureOption;
                ~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:4014:9 - error TS2411: Property 'magicType' of type 'ToolboxMagicTypeFeatureOption | undefined' is not assignable to string index type 'ToolboxFeatureOption | { [key: string]: any; }'.
   
   4014         magicType?: ToolboxMagicTypeFeatureOption;
                ~~~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:4015:9 - error TS2411: Property 'restore' of type 'ToolboxRestoreFeatureOption | undefined' is not assignable to string index type 'ToolboxFeatureOption | { [key: string]: any; }'.
   
   4015         restore?: ToolboxRestoreFeatureOption;
                ~~~~~~~
   node_modules/echarts/types/dist/echarts.d.ts:4016:9 - error TS2411: Property 'saveAsImage' of type 'ToolboxSaveAsImageFeatureOption | undefined' is not assignable to string index type 'ToolboxFeatureOption | { [key: string]: any; }'.
   
   4016         saveAsImage?: ToolboxSaveAsImageFeatureOption;
                ~~~~~~~~~~~
   ```
   
   Am I missing anything?
   
   ### What is expected?
   There should not to be any compiler errors.
   
   ### What is actually happening?
   There are a lot of compiler errors.
   
   ---
   Node Version: 14.15.1 / 12.16.1
   
   TypeScript Version: 4.0.5
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-748868985


   @beyerleinf Fixed in https://github.com/apache/incubator-echarts/commit/7ad6e1e4da4775bfde59dea00f5ef11b2af4e887 . It will be included in 5.0.1


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-748738657


   Hi @beyerleinf.  Is it because you enabled the strictNullCheck ?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-748674206


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] beyerleinf commented on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
beyerleinf commented on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-748803688


   Hey @pissang, your're right. I'm running Angular 11 in strict mode. Here's my tsconfig
   
   ```json
   /* To learn more about this file see: https://angular.io/config/tsconfig. */
   {
     "compileOnSave": false,
     "compilerOptions": {
       "baseUrl": "./",
       "outDir": "./dist/out-tsc",
       "forceConsistentCasingInFileNames": true,
       "strict": true,
       "noImplicitReturns": true,
       "noFallthroughCasesInSwitch": true,
       "sourceMap": true,
       "declaration": false,
       "downlevelIteration": true,
       "experimentalDecorators": true,
       "moduleResolution": "node",
       "importHelpers": true,
       "target": "es2015",
       "module": "es2020",
       "lib": [
         "es2018",
         "dom"
       ]
     },
     "angularCompilerOptions": {
       "strictInjectionParameters": true,
       "strictInputAccessModifiers": true,
       "strictTemplates": true
     }
   }
   
   ```
   
   From you're comment I assume that this is not supported by 5.0.0 at the moment, right?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang edited a comment on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-748738657


   Hi @beyerleinf.  Is it because you enabled the `strictNullCheck` ?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang closed issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
pissang closed issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-751153117


   @monilyn In one or two weeks


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] monilyn commented on issue #13850: [5.0.0] types/dist/echarts.d.ts is invalid and won't compile

Posted by GitBox <gi...@apache.org>.
monilyn commented on issue #13850:
URL: https://github.com/apache/incubator-echarts/issues/13850#issuecomment-750835595


   Hi I have the same issue. When the new version will be published? Thank you.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org