mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +08:00
fix: Component.component argument typings (#3148)
This commit is contained in:
parent
9a275e8e1b
commit
64b9c818d6
|
@ -121,8 +121,8 @@ export default abstract class Component<Attrs extends ComponentAttrs = Component
|
||||||
*
|
*
|
||||||
* @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children
|
* @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children
|
||||||
*/
|
*/
|
||||||
static component(attrs = {}, children = null): Mithril.Vnode {
|
static component(attrs: Attrs = {}, children: Mithril.Children = null): Mithril.Vnode {
|
||||||
const componentAttrs = Object.assign({}, attrs) as Record<string, unknown>;
|
const componentAttrs = { ...attrs };
|
||||||
|
|
||||||
return m(this as any, componentAttrs, children);
|
return m(this as any, componentAttrs, children);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user