Adding requested review changes.

This commit is contained in:
Joel Mueller
2015-01-26 22:59:00 -06:00
parent 73cb5747b3
commit 3429cb03da
+9 -1
View File
@@ -8,7 +8,8 @@
interface MithrilStatic {
(selector: string, attributes: Object, children?: any): MithrilVirtualElement;
(selector: string, children?: any): MithrilVirtualElement;
prop<T>(value?: T): (value?: T) => T;
prop<T>(value?: T): (value?: T) => T;
prop<T>(promise: MithrilPromise<T>): MithrilPromiseProperty<T>;
withAttr(property: string, callback: (value: any) => void): (e: Event) => any;
module(rootElement: Node, module: MithrilModule): void;
trust(html: string): String;
@@ -52,6 +53,13 @@ interface MithrilDeferred<T> {
interface MithrilPromise<T> {
(value?: T): T;
then<R>(successCallback?: (value: T) => R, errorCallback?: (value: any) => any): MithrilPromise<R>;
then<R>(successCallback?: (value: T) => MithrilPromise<R>, errorCallback?: (value: any) => any): MithrilPromise<R>;
}
interface MithrilPromiseProperty<T> extends MithrilPromise<T> {
(): T;
(value: T): T;
toJSON(): T;
}
interface MithrilXHROptions {