From 8b3edb2a547a5fd8ea35bd02a8d9a3f4312b846f Mon Sep 17 00:00:00 2001 From: Vasil Rimar Date: Tue, 2 Oct 2018 00:11:17 -0400 Subject: [PATCH] mithril: Fix doc comments (#29290) --- types/mithril/index.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/mithril/index.d.ts b/types/mithril/index.d.ts index 79706617e8..32f3976e2e 100644 --- a/types/mithril/index.d.ts +++ b/types/mithril/index.d.ts @@ -36,13 +36,13 @@ declare namespace Mithril { oninit?(this: State, vnode: Vnode): any; /** The oncreate hook is called after a DOM element is created and attached to the document. */ oncreate?(this: State, vnode: VnodeDOM): any; - /** The onbeforeupdate hook is called before a vnode is diffed in a update. */ - onbeforeremove?(this: State, vnode: VnodeDOM): Promise | void; - /** The onupdate hook is called after a DOM element is updated, while attached to the document. */ - onremove?(this: State, vnode: VnodeDOM): any; /** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */ - onbeforeupdate?(this: State, vnode: Vnode, old: VnodeDOM): boolean | void; + onbeforeremove?(this: State, vnode: VnodeDOM): Promise | void; /** The onremove hook is called before a DOM element is removed from the document. */ + onremove?(this: State, vnode: VnodeDOM): any; + /** The onbeforeupdate hook is called before a vnode is diffed in a update. */ + onbeforeupdate?(this: State, vnode: Vnode, old: VnodeDOM): boolean | void; + /** The onupdate hook is called after a DOM element is updated, while attached to the document. */ onupdate?(this: State, vnode: VnodeDOM): any; /** WORKAROUND: TypeScript 2.4 does not allow extending an interface with all-optional properties. */ [_: number]: any; @@ -225,13 +225,13 @@ declare namespace Mithril { oninit?(vnode: Vnode): any; /** The oncreate hook is called after a DOM element is created and attached to the document. */ oncreate?(vnode: VnodeDOM): any; - /** The onbeforeupdate hook is called before a vnode is diffed in a update. */ - onbeforeremove?(vnode: VnodeDOM): Promise | void; - /** The onupdate hook is called after a DOM element is updated, while attached to the document. */ - onremove?(vnode: VnodeDOM): any; /** The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes. */ - onbeforeupdate?(vnode: Vnode, old: VnodeDOM): boolean | void; + onbeforeremove?(vnode: VnodeDOM): Promise | void; /** The onremove hook is called before a DOM element is removed from the document. */ + onremove?(vnode: VnodeDOM): any; + /** The onbeforeupdate hook is called before a vnode is diffed in a update. */ + onbeforeupdate?(vnode: Vnode, old: VnodeDOM): boolean | void; + /** The onupdate hook is called after a DOM element is updated, while attached to the document. */ onupdate?(vnode: VnodeDOM): any; /** Creates a view out of virtual elements. */ view(vnode: Vnode): Children | null | void;