mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
forum: create app.ts file that exports Forum instance
This file can now be imported so 'app' is an instance of Forum instead of just Application - for typings
This commit is contained in:
parent
d73f1d8a67
commit
88aa9fc038
|
@ -32,8 +32,8 @@ export default class Forum extends Application {
|
|||
// discussionRenamed: DiscussionRenamedPost
|
||||
};
|
||||
|
||||
previous: Page;
|
||||
current: Page;
|
||||
previous?: Page;
|
||||
current?: Page;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
|
8
js/src/forum/app.ts
Normal file
8
js/src/forum/app.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import Forum from './Forum';
|
||||
|
||||
const app = new Forum();
|
||||
|
||||
// @ts-ignore
|
||||
window.app = app;
|
||||
|
||||
export default app;
|
|
@ -1,3 +1,5 @@
|
|||
import app from '../app';
|
||||
|
||||
import Component from '../../common/Component';
|
||||
import listItems from '../../common/helpers/listItems';
|
||||
import Button from '../../common/components/Button';
|
||||
|
|
|
@ -6,7 +6,7 @@ import ReplyPlaceholder from './ReplyPlaceholder';
|
|||
import Button from '../../common/components/Button';
|
||||
import Discussion from '../../common/models/Discussion';
|
||||
import Post from '../../common/models/Post';
|
||||
import Evented from '../../common/utils/evented';
|
||||
import Evented from '../../common/utils/Evented';
|
||||
import { DiscussionProp } from '../../common/concerns/ComponentProps';
|
||||
import { Attributes } from 'mithril';
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import Forum from './Forum';
|
||||
|
||||
const app = new Forum();
|
||||
|
||||
// @ts-ignore
|
||||
window.app = app;
|
||||
import app from './app';
|
||||
|
||||
export { app };
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user