Fix definition of MithrilPromise

MithrilPromise returns the value it holds and not another promise that
holds the value. MithrilPromiseProperty was adjusted to act as a nested
MithrilPromise.
This commit is contained in:
Alexander Lindsay 2016-02-21 10:45:13 -08:00
parent 8d06cb8142
commit b0b727ff73

4
mithril.d.ts vendored
View file

@ -658,7 +658,7 @@ declare module _mithril {
*
* @see m.prop which returns objects that implement this interface.
*/
interface MithrilPromiseProperty<T> extends MithrilPromise<T>,
interface MithrilPromiseProperty<T> extends MithrilPromise<MithrilPromise<T>>,
MithrilProperty<MithrilPromise<T>> {
/**
* Gets the contained promise.
@ -747,7 +747,7 @@ declare module _mithril {
/**
* This represents a Mithril promise object.
*/
interface MithrilPromise<T> extends Thennable<T>, MithrilProperty<MithrilPromise<T>> {
interface MithrilPromise<T> extends Thennable<T>, MithrilProperty<T> {
/**
* Chain this promise with a simple success callback, propogating
* rejections.