Skip to content

Commit b9f330b

Browse files
authored
Merge pull request #17582 from AviVahl/fix-ts4.8-compatibility
fix: ensure compatibility with typescript@4.8
2 parents 3e068d7 + 8b66bf7 commit b9f330b

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/animation/basicTransition.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
AnimationOption
2727
} from '../util/types';
2828
import { AnimationEasing } from 'zrender/src/animation/easing';
29-
import Element, { ElementAnimateConfig } from 'zrender/src/Element';
29+
import Element, { ElementAnimateConfig, ElementProps } from 'zrender/src/Element';
3030
import Model from '../model/Model';
3131
import {
3232
isFunction,
@@ -216,7 +216,7 @@ function animateOrSetProps<Props>(
216216
* position: [100, 100]
217217
* }, seriesModel, function () { console.log('Animation done!'); });
218218
*/
219-
function updateProps<Props>(
219+
function updateProps<Props extends ElementProps>(
220220
el: Element<Props>,
221221
props: Props,
222222
// TODO: TYPE AnimatableModel
@@ -238,7 +238,7 @@ export {updateProps};
238238
* So do not use this method to one element twice before
239239
* animation starts, unless you know what you are doing.
240240
*/
241-
export function initProps<Props>(
241+
export function initProps<Props extends ElementProps>(
242242
el: Element<Props>,
243243
props: Props,
244244
animatableModel?: Model<AnimationOptionMixin>,
@@ -335,4 +335,4 @@ export function saveOldStyle(el: Displayable) {
335335

336336
export function getOldStyle(el: Displayable) {
337337
return transitionStore(el).oldStyle;
338-
}
338+
}

src/chart/bar/BaseBarSeries.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ import {
2424
SeriesOnCartesianOptionMixin,
2525
SeriesOnPolarOptionMixin,
2626
ScaleDataValue,
27-
DefaultStatesMixin
27+
DefaultStatesMixin,
28+
StatesMixinBase
2829
} from '../../util/types';
2930
import GlobalModel from '../../model/Global';
3031
import Cartesian2D from '../../coord/cartesian/Cartesian2D';
3132
import SeriesData from '../../data/SeriesData';
3233

3334

34-
export interface BaseBarSeriesOption<StateOption, ExtraStateOption = DefaultStatesMixin>
35+
export interface BaseBarSeriesOption<StateOption, ExtraStateOption extends StatesMixinBase = DefaultStatesMixin>
3536
extends SeriesOption<StateOption, ExtraStateOption>,
3637
SeriesOnCartesianOptionMixin,
3738
SeriesOnPolarOptionMixin {
@@ -121,4 +122,4 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
121122

122123
SeriesModel.registerClass(BaseBarSeriesModel);
123124

124-
export default BaseBarSeriesModel;
125+
export default BaseBarSeriesModel;

theme/macarons.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@
8787
},
8888

8989
tooltip: {
90+
borderWidth: 0,
9091
backgroundColor: 'rgba(50,50,50,0.5)',
92+
textStyle: {
93+
color: '#FFF'
94+
},
9195
axisPointer: {
9296
type: 'line',
9397
lineStyle: {

0 commit comments

Comments
 (0)