mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-24 15:19:17 -05:00
Fix TypeScript error
It looks like TypeScript recently updated jQuery definitions from `HTMLElement` to `Element`. There's probably a better long-term solution, but for now, suffice to say these assertions are safe because we don't use any non-HTML elements.
This commit is contained in:
parent
14689a63ad
commit
ba52aab0ef
|
|
@ -244,7 +244,7 @@ class BattleScene {
|
|||
this.updateBgm();
|
||||
if (this.battle.resumeButton) {
|
||||
this.$frame.append('<div class="playbutton"><button data-action="resume"><i class="fa fa-play icon-play"></i> Resume</button></div>');
|
||||
this.$frame.find('div.playbutton button').click(this.battle.resumeButton);
|
||||
this.$frame.find<HTMLElement>('div.playbutton button').click(this.battle.resumeButton);
|
||||
}
|
||||
}
|
||||
resume() {
|
||||
|
|
|
|||
|
|
@ -257,11 +257,11 @@ class BattlePanel extends PSRoomPanel<BattleRoom> {
|
|||
};
|
||||
componentDidMount() {
|
||||
const $elem = $(this.base!);
|
||||
const battle = new Battle($elem.find('.battle'), $elem.find('.battle-log'));
|
||||
const battle = new Battle($elem.find<HTMLElement>('.battle'), $elem.find<HTMLElement>('.battle-log'));
|
||||
this.props.room.battle = battle;
|
||||
battle.endCallback = () => this.forceUpdate();
|
||||
battle.play();
|
||||
(battle.scene as BattleScene).tooltips.listen($elem.find('.battle-controls'));
|
||||
(battle.scene as BattleScene).tooltips.listen($elem.find<HTMLElement>('.battle-controls'));
|
||||
super.componentDidMount();
|
||||
}
|
||||
receiveLine(args: Args) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user