1
0
mirror of https://github.com/flarum/core.git synced 2025-10-14 00:15:51 +02:00

chore: rewrite ModalManager and state to Typescript (#3007)

* Rewrite ModalManagerState into Typescript

- Fixes `attrs` parameter being marked as required
- Add `isModalOpen` method

* Rewrite ModalManager into Typescript

* Fix incorrect type

* Continue modal rewrite

* Update attr typings

* Fix correctly cast `this.constructor` calls

* Cast to bool

* Don't extend ModalAttrs by Record

* Prevent missing abstract methods in child Modals from bricking frontend

* Add missing `app` import

* Address review comment

Co-authored-by: David Sevilla Martin <6401250+datitisev@users.noreply.github.com>

Co-authored-by: David Sevilla Martin <6401250+datitisev@users.noreply.github.com>
This commit is contained in:
David Wheatley
2021-10-31 00:29:10 +02:00
committed by GitHub
parent a0a06973c0
commit 7db2d0f697
8 changed files with 273 additions and 214 deletions

View File

@@ -1,3 +1,5 @@
import app from '../app';
/**
* Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.
*