fixed connectionoption and .Mongoose travis errors

This commit is contained in:
Simon
2016-08-23 16:06:13 -04:00
parent 9e897a190c
commit 90d2990396
2 changed files with 6 additions and 5 deletions

View File

@@ -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 {}

View File

@@ -16,7 +16,7 @@ declare module 'mongoose' {
}
// statics
interface PassportLocalModel<T extends PassportLocalDocument> extends Model<T> {
interface PassportLocalModel<T extends Document> extends Model<T> {
authenticate(): (username: string, password: string, cb: (err: any, res: T, error: any) => void) => void;
serializeUser(): (user: PassportLocalModel<T>, cb: (err: any) => void) => void;
deserializeUser(): (username: string, cb: (err: any) => void) => void;