Fix incremental-dom typings

This commit is contained in:
Markus Lanthaler
2016-04-03 21:07:17 +02:00
parent d969b903d1
commit de2bc3fcdb
+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: 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