From 8acdd6fc7d5c61adb47c0ce2f7eaaa670877efcc Mon Sep 17 00:00:00 2001 From: David Fahlander Date: Thu, 23 Apr 2015 22:52:51 +0200 Subject: [PATCH] Fixed errors from npm test --- dexie/dexie-tests.ts | 6 +++--- dexie/dexie.d.ts | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dexie/dexie-tests.ts b/dexie/dexie-tests.ts index 89318f0709..25deb115d4 100644 --- a/dexie/dexie-tests.ts +++ b/dexie/dexie-tests.ts @@ -89,8 +89,8 @@ module AppDb { if (id) this.id = id; } - loadEmailsAndPhones() { - return Dexie.Promise.all( + loadEmailsAndPhones() : Dexie.Promise { + return Dexie.Promise.all( db.emails .where('contactId').equals(this.id) .toArray(emails => this.emails = emails) @@ -99,7 +99,7 @@ module AppDb { .where('contactId').equals(this.id) .toArray(phones => this.phones = phones) - ).then(x => this); + ).then(() => this); } save() { diff --git a/dexie/dexie.d.ts b/dexie/dexie.d.ts index 7d498f4d35..eb6854ce2e 100644 --- a/dexie/dexie.d.ts +++ b/dexie/dexie.d.ts @@ -1,4 +1,8 @@ - +// Type definitions for Dexie v1.1 +// Project: https://github.com/dfahlander/Dexie.js +// Definitions by: David Fahlander +// Definitions: https://github.com/borisyankov/DefinitelyTyped + interface Thenable { then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; then(onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Thenable;