Merge pull request #8828 from lanthaler/patch-1

Fix incremental-dom typings
This commit is contained in:
Masahiro Wakame
2016-04-06 19:59:08 +09:00
+4 -3
View File
@@ -1,6 +1,6 @@
// Type definitions for Incremetal DOM
// Project: https://github.com/google/incremental-dom
// Definitions by: Basarat Ali Syed <https://github.com/basarat>
// Definitions by: Basarat Ali Syed <https://github.com/basarat>, Markus Lanthaler <https://github.com/lanthaler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "incremental-dom" {
@@ -8,10 +8,11 @@ declare module "incremental-dom" {
* Patches the document starting at el with the provided function. This function
* may be called during an existing patch operation.
* @param {!Element} el the element to patch
* @param {!function} fn A function containing elementOpen/elementClose/etc.
* @param {!function(T)} fn A function containing elementOpen/elementClose/etc.
* calls that describe the DOM.
* @param {?T} data An argument passed to fn to represent DOM state.
*/
export var patch: (el: Node, fn: Function) => void;
export var patch: <T>(el: Node, fn: (data: T) => void, data?: T) => void;
/**
* Declares a virtual Element at the current location in the document. This