diff --git a/mithril.d.ts b/mithril.d.ts index f023b25a..46cb7e63 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -3,7 +3,7 @@ /** * This is the module containing all the types/declarations/etc. for Mithril */ -declare module _mithril { +declare namespace _mithril { interface MithrilStatic { /** * Creates a virtual element for use with m.render, m.mount, etc. @@ -24,9 +24,9 @@ declare module _mithril { selector: string, attributes: MithrilAttributes, ...children: Array | + MithrilVirtualElement | MithrilComponent> - ): MithrilVirtualElement; + ): MithrilVirtualElement; /** * Initializes a component for use with m.render, m.mount, etc. @@ -59,9 +59,9 @@ declare module _mithril { ( selector: string, ...children: Array | + MithrilVirtualElement | MithrilComponent> - ): MithrilVirtualElement; + ): MithrilVirtualElement; /** * Initializes a component for use with m.render, m.mount, etc. @@ -195,7 +195,7 @@ declare module _mithril { */ render( rootElement: Element, - children: MithrilVirtualElement|MithrilVirtualElement[], + children: MithrilVirtualElement|MithrilVirtualElement[], forceRecreation?: boolean ): void; @@ -280,7 +280,7 @@ declare module _mithril { element: Element, isInitialized: boolean, context?: MithrilContext, - vdom?: MithrilVirtualElement + vdom?: MithrilVirtualElement ): void; /** @@ -444,7 +444,7 @@ declare module _mithril { * * @see m */ - interface MithrilVirtualElement { + interface MithrilVirtualElement { /** * A key to optionally associate with this element. */ @@ -463,7 +463,7 @@ declare module _mithril { /** * The children of this element. */ - children?: Array|MithrilComponent>; + children?: Array>; } /** @@ -519,7 +519,7 @@ declare module _mithril { element: Element, isInitialized: boolean, context: MithrilContext, - vdom: MithrilVirtualElement + vdom: MithrilVirtualElement ): void; } @@ -593,7 +593,7 @@ declare module _mithril { /** * Creates a view out of virtual elements. */ - (ctrl: T): MithrilVirtualElement; + (ctrl: T): MithrilVirtualElement; } /** @@ -616,7 +616,7 @@ declare module _mithril { * * @see m.component */ - view(ctrl?: T, opts?: any): MithrilVirtualElement; + view(ctrl?: T, opts?: any): MithrilVirtualElement; } /**