From 90d29903965a91b50866dfed61d8d164cf27a17f Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 23 Aug 2016 16:06:13 -0400 Subject: [PATCH] fixed connectionoption and .Mongoose travis errors --- mongoose/mongoose.d.ts | 9 +++++---- passport-local-mongoose/passport-local-mongoose.d.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index 50784a9194..89fc9073a4 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -93,6 +93,7 @@ declare module "mongoose" { export var DocumentProvider: any; // recursive constructor export var Mongoose: new(...args: any[]) => typeof mongoose; + type Mongoose = typeof mongoose; export var SchemaTypes: typeof Schema.Types; /** Expose connection states for user-land */ @@ -110,7 +111,7 @@ declare module "mongoose" { * @returns pseudo-promise wrapper around this */ export function connect(uris: string, - options?: ConnectOptions, + options?: ConnectionOptions, callback?: (err: mongodb.MongoError) => void): MongooseThenable; export function connect(uris: string, callback?: (err: mongodb.MongoError) => void): MongooseThenable; @@ -125,10 +126,10 @@ declare module "mongoose" { */ export function createConnection(): Connection; export function createConnection(uri: string, - options?: ConnectOptions + options?: ConnectionOptions ): Connection; export function createConnection(host: string, database_name: string, port?: number, - options?: ConnectOptions + options?: ConnectionOptions ): Connection; /** @@ -381,7 +382,7 @@ declare module "mongoose" { mongos?: boolean; } - interface ConnectOptions extends + interface ConnectionOptions extends ConnectionOpenOptions, ConnectionOpenSetOptions {} diff --git a/passport-local-mongoose/passport-local-mongoose.d.ts b/passport-local-mongoose/passport-local-mongoose.d.ts index 30319afc51..2c189afc6a 100644 --- a/passport-local-mongoose/passport-local-mongoose.d.ts +++ b/passport-local-mongoose/passport-local-mongoose.d.ts @@ -16,7 +16,7 @@ declare module 'mongoose' { } // statics - interface PassportLocalModel extends Model { + interface PassportLocalModel extends Model { authenticate(): (username: string, password: string, cb: (err: any, res: T, error: any) => void) => void; serializeUser(): (user: PassportLocalModel, cb: (err: any) => void) => void; deserializeUser(): (username: string, cb: (err: any) => void) => void;