mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
fix: Component.component argument typings (#3148)
This commit is contained in:
parent
809df29d29
commit
8c47b197f0
|
@ -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