Editor TypeScript

This commit is contained in:
Mo Bitar
2020-04-11 19:42:50 -05:00
parent 16bde8d1d4
commit 2bc3658f1a
15 changed files with 794 additions and 614 deletions

View File

@@ -43,6 +43,10 @@ export class PureCtrl {
this.deinit();
}
public get appState() {
return this.application!.getAppState();
}
/** @private */
async resetState() {
this.state = this.getInitialState();
@@ -66,6 +70,10 @@ export class PureCtrl {
});
}
async updateUI(func: () => void) {
this.$timeout(func);
}
initProps(props: CtrlProps) {
if (Object.keys(this.props).length > 0) {
throw 'Already init-ed props.';