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


   ### Version
   
   5.0.0-beta.2
   
   ### Steps to reproduce
   
   ```bash
   
   $ ng new echarts-test
   
   $ cd echarts-test
   
   $ npm install [email protected]
   
   $ npm install ngx-echarts --force
   
   ```
   
   Replace the contents of `src/app/app.module.ts` with:
   
   ```typescript
   
   import { BrowserModule } from '@angular/platform-browser';
   
   import { NgModule } from '@angular/core';
   
   import * as echarts from 'echarts';
   
   import { NgxEchartsModule } from 'ngx-echarts';
   
   import { AppComponent } from './app.component';
   
   @NgModule({
   
   declarations: [
   
   AppComponent
   
   ],
   
   imports: [
   
   BrowserModule,
   
   NgxEchartsModule.forRoot({echarts}),
   
   ],
   
   providers: [],
   
   bootstrap: [AppComponent]
   
   })
   
   export class AppModule { }
   
   ```
   
   Make a release build:
   
   ```
   
   $ ng build --prod
   
   ```
   
   ### What is expected?
   
   App builds successfully
   
   ### What is actually happening?
   
   ```bash
   
   chunk {} runtime.e227d1a0e31cbccbf8ec.js (runtime) 1.45 kB [entry] [rendered]
   
   chunk {1} main.a5ec3f9d8dbc8e76265b.js (main) 128 bytes [initial] [rendered]
   
   chunk {2} polyfills.9d537a0142c2c00df491.js (polyfills) 130 bytes [initial] 
[rendered]
   
   chunk {3} styles.3ff695c00d717f2d2a11.css (styles) 0 bytes [initial] 
[rendered]
   
   Date: 2020-11-04T10:06:20.548Z - Hash: a8756b0bf37aa6ef1bb5 - Time: 4626ms
   
   ERROR in node_modules/echarts/types/src/coord/polar/AngleAxis.d.ts:5:11 - 
error TS2430: Interface 'AngleAxis' incorrectly extends interface 'Axis'.
   
   The types of 'model.getDefaultOption().axisLabel.rotate' are incompatible 
between these types.
   
   Type 'number | false' is not assignable to type 'number'.
   
   Type 'false' is not assignable to type 'number'.
   
   5 interface AngleAxis {
   
   ~~~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/AngleAxis.d.ts:11:5 - error 
TS2416: Property 'model' in type 'AngleAxis' is not assignable to the same 
property in base type 'Axis'.
   
   Type 'AngleAxisModel' is not assignable to type 
'AxisBaseModel<AxisBaseOption>'.
   
   11 model: AngleAxisModel;
   
   ~~~~~
   
   node_modules/echarts/types/src/coord/polar/AxisModel.d.ts:8:18 - error 
TS2430: Interface 'AngleAxisOption' incorrectly extends interface 
'AxisBaseOption'.
   
   8 export interface AngleAxisOption extends AxisBaseOption {
   
   ~~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/AxisModel.d.ts:23:126 - error 
TS2344: Type 'T' does not satisfy the constraint 'AxisBaseOption'.
   
   Type 'PolarAxisOption' is not assignable to type 'AxisBaseOption'.
   
   Type 'AngleAxisOption' is not assignable to type 'AxisBaseOption'.
   
   23 declare class PolarAxisModel<T extends PolarAxisOption = PolarAxisOption> 
extends ComponentModel<T> implements AxisBaseModel<T> {
   
   ~
   
   node_modules/echarts/types/src/coord/polar/AxisModel.d.ts:25:5 - error 
TS2416: Property 'axis' in type 'PolarAxisModel<T>' is not assignable to the 
same property in base type 'AxisBaseModel<T>'.
   
   Type 'AngleAxis | RadiusAxis' is not assignable to type 'Axis'.
   
   Type 'AngleAxis' is not assignable to type 'Axis'.
   
   Types of property 'model' are incompatible.
   
   Type 'AngleAxisModel' is not assignable to type 
'AxisBaseModel<AxisBaseOption>'.
   
   25 axis: AngleAxis | RadiusAxis;
   
   ~~~~
   
   node_modules/echarts/types/src/coord/polar/AxisModel.d.ts:28:11 - error 
TS2430: Interface 'PolarAxisModel<T>' incorrectly extends interface 
'AxisModelCommonMixin<T>'.
   
   Types of property 'axis' are incompatible.
   
   Type 'AngleAxis | RadiusAxis' is not assignable to type 'Axis'.
   
   Type 'AngleAxis' is not assignable to type 'Axis'.
   
   28 interface PolarAxisModel<T extends PolarAxisOption = PolarAxisOption> 
extends AxisModelCommonMixin<T>, AxisModelExtendedInCreator<T> {
   
   ~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/AxisModel.d.ts:28:100 - error 
TS2344: Type 'T' does not satisfy the constraint 'AxisBaseOption'.
   
   28 interface PolarAxisModel<T extends PolarAxisOption = PolarAxisOption> 
extends AxisModelCommonMixin<T>, AxisModelExtendedInCreator<T> {
   
   ~
   
   node_modules/echarts/types/src/coord/polar/AxisModel.d.ts:28:131 - error 
TS2344: Type 'T' does not satisfy the constraint 'AxisBaseOption'.
   
   28 interface PolarAxisModel<T extends PolarAxisOption = PolarAxisOption> 
extends AxisModelCommonMixin<T>, AxisModelExtendedInCreator<T> {
   
   ~
   
   node_modules/echarts/types/src/coord/polar/Polar.d.ts:25:5 - error TS2416: 
Property 'getAxis' in type 'Polar' is not assignable to the same property in 
base type 'CoordinateSystem'.
   
   Type '(dim: "radius" | "angle") => AngleAxis | RadiusAxis' is not assignable 
to type '(dim?: string) => Axis'.
   
   Type 'AngleAxis | RadiusAxis' is not assignable to type 'Axis'.
   
   Type 'AngleAxis' is not assignable to type 'Axis'.
   
   25 getAxis(dim: 'radius' | 'angle'): AngleAxis | RadiusAxis;
   
   ~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/Polar.d.ts:26:5 - error TS2416: 
Property 'getAxes' in type 'Polar' is not assignable to the same property in 
base type 'CoordinateSystemMaster'.
   
   Type '() => (AngleAxis | RadiusAxis)[]' is not assignable to type '() => 
Axis[]'.
   
   Type '(AngleAxis | RadiusAxis)[]' is not assignable to type 'Axis[]'.
   
   26 getAxes(): (AngleAxis | RadiusAxis)[];
   
   ~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/Polar.d.ts:27:5 - error TS2416: 
Property 'getAxesByScale' in type 'Polar' is not assignable to the same 
property in base type 'CoordinateSystem'.
   
   Type '(scaleType: "time" | "ordinal" | "log" | "interval") => (AngleAxis | 
RadiusAxis)[]' is not assignable to type '(scaleType: string) => Axis[]'.
   
   Type '(AngleAxis | RadiusAxis)[]' is not assignable to type 'Axis[]'.
   
   Type 'AngleAxis | RadiusAxis' is not assignable to type 'Axis'.
   
   Type 'AngleAxis' is not assignable to type 'Axis'.
   
   27 getAxesByScale(scaleType: 'ordinal' | 'interval' | 'time' | 'log'): 
(AngleAxis | RadiusAxis)[];
   
   ~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/Polar.d.ts:30:5 - error TS2416: 
Property 'getOtherAxis' in type 'Polar' is not assignable to the same property 
in base type 'CoordinateSystem'.
   
   Type '(axis: AngleAxis | RadiusAxis) => AngleAxis | RadiusAxis' is not 
assignable to type '(baseAxis: Axis) => Axis'.
   
   Types of parameters 'axis' and 'baseAxis' are incompatible.
   
   Type 'Axis' is not assignable to type 'AngleAxis | RadiusAxis'.
   
   Type 'Axis' is missing the following properties from type 'RadiusAxis': 
dataToRadius, radiusToData, polar
   
   30 getOtherAxis(axis: AngleAxis | RadiusAxis): AngleAxis | RadiusAxis;
   
   ~~~~~~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/Polar.d.ts:31:5 - error TS2416: 
Property 'getBaseAxis' in type 'Polar' is not assignable to the same property 
in base type 'CoordinateSystem'.
   
   Type '() => AngleAxis | RadiusAxis' is not assignable to type '() => Axis'.
   
   Type 'AngleAxis | RadiusAxis' is not assignable to type 'Axis'.
   
   Type 'AngleAxis' is not assignable to type 'Axis'.
   
   31 getBaseAxis(): AngleAxis | RadiusAxis;
   
   ~~~~~~~~~~~
   
   node_modules/echarts/types/src/coord/polar/Polar.d.ts:32:5 - error TS2416: 
Property 'getTooltipAxes' in type 'Polar' is not assignable to the same 
property in base type 'CoordinateSystemMaster'.
   
   Type '(dim: "auto" | "radius" | "angle") => { baseAxes: (AngleAxis | 
RadiusAxis)[]; otherAxes: (AngleAxis | RadiusAxis)[]; }' is not assignable to 
type '(dim: string) => { baseAxes: Axis[]; otherAxes: Axis[]; }'.
   
   Call signature return types '{ baseAxes: (AngleAxis | RadiusAxis)[]; 
otherAxes: (AngleAxis | RadiusAxis)[]; }' and '{ baseAxes: Axis[]; otherAxes: 
Axis[]; }' are incompatible.
   
   The types of 'baseAxes' are incompatible between these types.
   
   Type '(AngleAxis | RadiusAxis)[]' is not assignable to type 'Axis[]'.
   
   32 getTooltipAxes(dim: 'radius' | 'angle' | 'auto'): {
   
   ~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/chart/bar/BarSeries.d.ts:33:5 - error TS2416: 
Property 'coordinateSystem' in type 'BarSeriesModel' is not assignable to the 
same property in base type 'BaseBarSeriesModel<BarSeriesOption>'.
   
   Type 'Cartesian2D | Polar' is not assignable to type 'CoordinateSystem'.
   
   Type 'Polar' is not assignable to type 'CoordinateSystem'.
   
   The types returned by 'getAxis(...)' are incompatible between these types.
   
   Type 'AngleAxis | RadiusAxis' is not assignable to type 'Axis'.
   
   Type 'AngleAxis' is not assignable to type 'Axis'.
   
   33 coordinateSystem: Cartesian2D | Polar;
   
   ~~~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/model/Model.d.ts:7:15 - error TS2428: All 
declarations of 'Model' must have identical type parameters.
   
   7 declare class Model<Opt extends ModelOption = ModelOption> {
   
   ~~~~~
   
   node_modules/echarts/types/src/model/Model.d.ts:32:11 - error TS2428: All 
declarations of 'Model' must have identical type parameters.
   
   32 interface Model extends LineStyleMixin, ItemStyleMixin, TextStyleMixin, 
AreaStyleMixin {
   
   ~~~~~
   
   node_modules/echarts/types/src/chart/line/LineSeries.d.ts:56:5 - error 
TS2416: Property 'coordinateSystem' in type 'LineSeriesModel' is not assignable 
to the same property in base type 'SeriesModel<LineSeriesOption>'.
   
   Type 'Cartesian2D | Polar' is not assignable to type 'CoordinateSystem'.
   
   Type 'Polar' is not assignable to type 'CoordinateSystem'.
   
   56 coordinateSystem: Cartesian2D | Polar;
   
   ~~~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/chart/bar/BarView.d.ts:19:5 - error TS2416: 
Property 'render' in type 'BarView' is not assignable to the same property in 
base type 'ChartView'.
   
   Type '(seriesModel: BarSeriesModel, ecModel: GlobalModel, api: ExtensionAPI, 
payload: Payload) => void' is not assignable to type '(seriesModel: 
SeriesModel<SeriesOption<any, unknown>>, ecModel: GlobalModel, api: 
ExtensionAPI, payload: Payload) => void'.
   
   Types of parameters 'seriesModel' and 'seriesModel' are incompatible.
   
   Type 'SeriesModel<SeriesOption<any, unknown>>' is not assignable to type 
'BarSeriesModel'.
   
   Types of property 'coordinateSystem' are incompatible.
   
   Type 'CoordinateSystem' is not assignable to type 'Cartesian2D | Polar'.
   
   Type 'CoordinateSystem' is missing the following properties from type 
'Cartesian2D': _transform, _invTransform, calcAffineTransform, containData, and 
5 more.
   
   19 render(seriesModel: BarSeriesModel, ecModel: GlobalModel, api: 
ExtensionAPI, payload: Payload): void;
   
   ~~~~~~
   
   node_modules/echarts/types/src/chart/bar/BarView.d.ts:20:5 - error TS2416: 
Property 'incrementalPrepareRender' in type 'BarView' is not assignable to the 
same property in base type 'ChartView'.
   
   Type '(seriesModel: BarSeriesModel) => void' is not assignable to type 
'(seriesModel: SeriesModel<SeriesOption<any, unknown>>, ecModel: GlobalModel, 
api: ExtensionAPI, payload: Payload) => void'.
   
   Types of parameters 'seriesModel' and 'seriesModel' are incompatible.
   
   Type 'SeriesModel<SeriesOption<any, unknown>>' is not assignable to type 
'BarSeriesModel'.
   
   20 incrementalPrepareRender(seriesModel: BarSeriesModel): void;
   
   ~~~~~~~~~~~~~~~~~~~~~~~~
   
   node_modules/echarts/types/src/chart/bar/BarView.d.ts:21:5 - error TS2416: 
Property 'incrementalRender' in type 'BarView' is not assignable to the same 
property in base type 'ChartView'.
   
   Type '(params: TaskProgressParams, seriesModel: BarSeriesModel) => void' is 
not assignable to type '(params: TaskProgressParams, seriesModel: 
SeriesModel<SeriesOption<any, unknown>>, ecModel: GlobalModel, api: 
ExtensionAPI, payload: Payload) => void'.
   
   Types of parameters 'seriesModel' and 'seriesModel' are incompatible.
   
   Type 'SeriesModel<SeriesOption<any, unknown>>' is not assignable to type 
'BarSeriesModel'.
   
   21 incrementalRender(params: StageHandlerProgressParams, seriesModel: 
BarSeriesModel): void;
   
   ~~~~~~~~~~~~~~~~~
   
   
node_modules/echarts/types/src/component/axisPointer/PolarAxisPointer.d.ts:7:5 
- error TS2416: Property 'makeElOption' in type 'PolarAxisPointer' is not 
assignable to the same property in base type 'BaseAxisPointer'.
   
   Type '(elOption: AxisPointerElementOptions, value: string | number | Date, 
axisModel: PolarAxisModel<PolarAxisOption>, axisPointerModel: Model<...>, api: 
ExtensionAPI) => void' is not assignable to type '(elOption: 
AxisPointerElementOptions, value: string | number | Date, axisModel: 
AxisBaseModel<AxisBaseOption>, axisPointerModel: AxisPointerModel, api: 
ExtensionAPI) => void'.
   
   Types of parameters 'axisModel' and 'axisModel' are incompatible.
   
   Type 'AxisBaseModel<AxisBaseOption>' is not assignable to type 
'PolarAxisModel<PolarAxisOption>'.
   
   Types of property 'axis' are incompatible.
   
   Type 'Axis' is not assignable to type 'AngleAxis | RadiusAxis'.
   
   Type 'Axis' is not assignable to type 'RadiusAxis'.
   
   7 makeElOption(elOption: AxisPointerElementOptions, value: OptionDataValue, 
axisModel: PolarAxisModel, axisPointerModel: Model<CommonAxisPointerOption>, 
api: ExtensionAPI): void;
   
   ~~~~~~~~~~~~
   
   ```
   
   ---
   
   Ran into this when my branch that used `echarts 5.0.0-beta.2` stopped 
working due to typescript errors.
   
   <!-- 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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to