mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +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
|
||||
*/
|
||||
static component(attrs = {}, children = null): Mithril.Vnode {
|
||||
const componentAttrs = Object.assign({}, attrs) as Record<string, unknown>;
|
||||
static component(attrs: Attrs = {}, children: Mithril.Children = null): Mithril.Vnode {
|
||||
const componentAttrs = { ...attrs };
|
||||
|
||||
return m(this as any, componentAttrs, children);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user