diff --git a/mithril.d.ts b/mithril.d.ts index 2952d92a..c7d2c6b6 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -20,13 +20,13 @@ declare module _mithril { * @see m.mount * @see m.component */ - ( + ( selector: string, attributes: MithrilAttributes, ...children: Array | - MithrilComponent> - ): MithrilVirtualElement; + MithrilVirtualElement | + MithrilComponent> + ): MithrilVirtualElement; /** * Creates a virtual element for use with m.render, m.mount, etc. @@ -40,12 +40,12 @@ declare module _mithril { * @see m.mount * @see m.component */ - ( + ( selector: string, ...children: Array | - MithrilComponent> - ): MithrilVirtualElement; + MithrilVirtualElement | + MithrilComponent> + ): MithrilVirtualElement; /** * Initializes a component for use with m.render, m.mount, etc. @@ -364,9 +364,9 @@ declare module _mithril { * @param forceRecreation If true, overwrite the entire tree without * diffing against it. */ - render( + render( rootElement: Element, - children: MithrilVirtualElement|MithrilVirtualElement[], + children: MithrilVirtualElement|MithrilVirtualElement[], forceRecreation?: boolean ): void; @@ -451,7 +451,7 @@ declare module _mithril { element: Element, isInitialized: boolean, context?: MithrilContext, - vdom?: MithrilVirtualElement + vdom?: MithrilVirtualElement ): void; /** @@ -615,7 +615,7 @@ declare module _mithril { * * @see m */ - interface MithrilVirtualElement { + interface MithrilVirtualElement { /** * A key to optionally associate with this element. */ @@ -634,7 +634,7 @@ declare module _mithril { /** * The children of this element. */ - children?: Array|MithrilComponent>; + children?: Array>; } /** @@ -686,11 +686,11 @@ declare module _mithril { * @param context The associated context for this element. * @param vdom The associated virtual element. */ - ( + ( element: Element, isInitialized: boolean, context: MithrilContext, - vdom: MithrilVirtualElement + vdom: MithrilVirtualElement ): void; } @@ -758,7 +758,7 @@ declare module _mithril { /** * Creates a view out of virtual elements. */ - (ctrl: T): MithrilVirtualElement; + (ctrl: T): MithrilVirtualElement; } /** @@ -781,7 +781,7 @@ declare module _mithril { * * @see m.component */ - view(ctrl: T): MithrilVirtualElement; + view(ctrl: T): MithrilVirtualElement; } /** @@ -805,7 +805,7 @@ declare module _mithril { * * @see m.component */ - view(ctrl: TController, arg1: T1, arg2: T2, arg3: T3, arg4: T4, ...args:any[]): MithrilVirtualElement; + view(ctrl: TController, arg1: T1, arg2: T2, arg3: T3, arg4: T4, ...args:any[]): MithrilVirtualElement; } /**