mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
fixed connectionoption and .Mongoose travis errors
This commit is contained in:
9
mongoose/mongoose.d.ts
vendored
9
mongoose/mongoose.d.ts
vendored
@@ -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 {}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user