diff --git a/index.d.ts b/index.d.ts index a87405d8..d6aae5da 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,7 +7,7 @@ export interface ChildArray extends Array {} export type Children = Child | ChildArray; -export type Child = string | VirtualElement | Component; +export type Child = string | TrustedString | VirtualElement | Component; export interface Static { /** @@ -884,7 +884,7 @@ export interface Component { * * @see m.component */ - controller: ControllerFunction | ControllerConstructor; + controller?: ControllerFunction | ControllerConstructor; /** * Creates a view out of virtual elements. diff --git a/mithril.d.ts b/mithril.d.ts index 9189d3ca..fba1b56a 100644 --- a/mithril.d.ts +++ b/mithril.d.ts @@ -7,7 +7,7 @@ declare namespace Mithril { interface ChildArray extends Array {} type Children = Child | ChildArray; - type Child = string | VirtualElement | Component; + type Child = string | TrustedString | VirtualElement | Component; interface Static { /** @@ -558,7 +558,7 @@ declare namespace Mithril { * * @see m.component */ - controller: ControllerFunction | ControllerConstructor; + controller?: ControllerFunction | ControllerConstructor; /** * Creates a view out of virtual elements.