Skip to content

Commit

Permalink
Allow returning native promise from Core.onConnected()
Browse files Browse the repository at this point in the history
  • Loading branch information
aikoven committed Dec 16, 2016
1 parent 7e045c9 commit 1654b47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class Core {
* resolves a connection object, Iridium will be unable to execute any queries. If you wish
* to run Iridium queries then look at the onConnected method.
*/
protected onConnecting(connection: MongoDB.Db): Bluebird<MongoDB.Db> {
protected onConnecting(connection: MongoDB.Db): PromiseLike<MongoDB.Db> {
return Bluebird.resolve(connection);
}

Expand All @@ -227,7 +227,7 @@ export class Core {
* connection to the database has been established - such as setting up indexes for your
* collections or seeding the database.
*/
protected onConnected(): Bluebird<void> {
protected onConnected(): PromiseLike<void> {
return Bluebird.resolve();
}
}

0 comments on commit 1654b47

Please sign in to comment.