mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Fix some typing errors
This commit is contained in:
parent
312ff057f8
commit
d72b8b8d8e
|
@ -150,7 +150,7 @@ export default class ExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionP
|
|||
}
|
||||
|
||||
topItems() {
|
||||
const items = new ItemList();
|
||||
const items = new ItemList<Mithril.Children>();
|
||||
|
||||
items.add('version', <span className="ExtensionVersion">{this.extension.version}</span>);
|
||||
|
||||
|
@ -181,7 +181,7 @@ export default class ExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionP
|
|||
}
|
||||
|
||||
infoItems() {
|
||||
const items = new ItemList();
|
||||
const items = new ItemList<Mithril.Children>();
|
||||
|
||||
const links = this.extension.links;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ export default class BasicEditorDriver implements EditorDriverInterface {
|
|||
this.build(dom, params);
|
||||
}
|
||||
|
||||
build(dom: HTMLElement, params: EditorDriverParams) {
|
||||
protected build(dom: HTMLElement, params: EditorDriverParams) {
|
||||
this.el.className = params.classNames.join(' ');
|
||||
this.el.disabled = params.disabled;
|
||||
this.el.placeholder = params.placeholder;
|
||||
|
@ -43,8 +43,8 @@ export default class BasicEditorDriver implements EditorDriverInterface {
|
|||
dom.append(this.el);
|
||||
}
|
||||
|
||||
keyHandlers(params: EditorDriverParams): ItemList {
|
||||
const items = new ItemList();
|
||||
protected keyHandlers(params: EditorDriverParams) {
|
||||
const items = new ItemList<(e: KeyboardEvent) => void>();
|
||||
|
||||
items.add('submit', function (e: KeyboardEvent) {
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {
|
||||
|
|
|
@ -238,11 +238,9 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||
|
||||
/**
|
||||
* Build an item list for the contents of the sidebar.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
sidebarItems() {
|
||||
const items = new ItemList();
|
||||
const items = new ItemList<Mithril.Vnode>();
|
||||
|
||||
items.add(
|
||||
'controls',
|
||||
|
|
|
@ -281,8 +281,8 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
|
|||
/**
|
||||
* Build an item list of SearchSources.
|
||||
*/
|
||||
sourceItems(): ItemList {
|
||||
const items = new ItemList();
|
||||
sourceItems(): ItemList<SearchSource> {
|
||||
const items = new ItemList<SearchSource>();
|
||||
|
||||
if (app.forum.attribute('canViewForum')) items.add('discussions', new DiscussionsSearchSource());
|
||||
if (app.forum.attribute('canSearchUsers')) items.add('users', new UsersSearchSource());
|
||||
|
|
Loading…
Reference in New Issue
Block a user