mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-28 09:25:50 +08:00
Fixed errors from npm test
This commit is contained in:
@@ -89,8 +89,8 @@ module AppDb {
|
||||
if (id) this.id = id;
|
||||
}
|
||||
|
||||
loadEmailsAndPhones() {
|
||||
return Dexie.Promise.all(
|
||||
loadEmailsAndPhones() : Dexie.Promise<Contact> {
|
||||
return Dexie.Promise.all<any>(
|
||||
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() {
|
||||
|
||||
6
dexie/dexie.d.ts
vendored
6
dexie/dexie.d.ts
vendored
@@ -1,4 +1,8 @@
|
||||
|
||||
// Type definitions for Dexie v1.1
|
||||
// Project: https://github.com/dfahlander/Dexie.js
|
||||
// Definitions by: David Fahlander <http://github.com/dfahlander>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface Thenable<R> {
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected: (error: any) => Thenable<U>): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected?: (error: any) => U): Thenable<U>;
|
||||
|
||||
Reference in New Issue
Block a user