Merge branch 'handleExtraObjectLiteralProperties2' into handleExtraObjectLiteralProperties

Conflicts:
	jquery.uniform/jquery.uniform.d.ts
	log4js/log4js.d.ts
This commit is contained in:
Daniel Rosenwasser
2015-08-17 14:11:10 -07:00
10 changed files with 109 additions and 37 deletions

View File

@@ -5,7 +5,7 @@
/// <reference path="../jquery/jquery.d.ts" />
interface UniformOptions {
interface UniformCoreOptions {
activeClass?: string;
autoHide?: boolean;
buttonClass?: string;
@@ -35,8 +35,8 @@ interface UniformOptions {
wrapperClass?: string;
}
interface UniformOptionsWithExtraParameters extends UniformOptions {
[optionName: string]: any;
interface UniformOptions extends UniformCoreOptions {
[option: string]: any;
}
interface Uniform {
@@ -44,7 +44,7 @@ interface Uniform {
update(elemOrSelector?: any): void;
restore(elemOrSelector?: any): void;
elements: JQuery[];
defaults: UniformOptions;
defaults: UniformOptions;
}
interface JQueryStatic {
uniform: Uniform;

View File

@@ -1670,7 +1670,7 @@ interface JQuery {
sortable(methodName: string): JQuery;
sortable(options: JQueryUI.SortableOptions): JQuery;
sortable(optionLiteral: string, optionName: string): any;
sortable(methodName: 'serialize', options: { key?: string; attribute?: string; expression?: RegExp });
sortable(methodName: 'serialize', options: { key?: string; attribute?: string; expression?: RegExp }): string;
sortable(optionLiteral: string, options: JQueryUI.SortableOptions): any;
sortable(optionLiteral: string, optionName: string, optionValue: any): JQuery;

8
log4js/log4js.d.ts vendored
View File

@@ -233,11 +233,11 @@ declare module "log4js" {
| MultiprocessAppenderConfig
| LogglyAppenderConfig
| ClusteredAppenderConfig
interface UserDefinedAppenderConfig extends AppenderConfigBase {
[prop: string]: any;
interface CustomAppenderConfig extends AppenderConfigBase {
[prop: string]: any;
}
type AppenderConfig = CoreAppenderConfig | UserDefinedAppenderConfig;
type AppenderConfig = CoreAppenderConfig | CustomAppenderConfig;
}

View File

@@ -40,6 +40,10 @@ declare module MCustomScrollbar {
*/
autoHideScrollbar?: boolean;
scrollButtons?: {
/**
* Enable or disable scroll buttons.
*/
enable?: boolean;
/**
* Scroll buttons scroll type, values: "continuous" (scroll continuously while pressing the button), "pixels" (scrolls by a fixed number of pixels on each click")
*/
@@ -47,11 +51,11 @@ declare module MCustomScrollbar {
/**
* Scroll buttons continuous scrolling speed, integer value or "auto" (script calculates and sets the speed according to content length)
*/
scrollSpeed?: any;
scrollSpeed?: number | string;
/**
* Scroll buttons pixels scrolling amount, value in pixels
* Scroll buttons pixels scrolling amount, value in pixels or "auto"
*/
scrollAmount?: number;
scrollAmount?: number | string;
}
advanced?: {
/**
@@ -94,14 +98,24 @@ declare module MCustomScrollbar {
*/
onScroll?: () => void;
/**
* User defined callback function, triggered when scroll end-limit is reached
* A function to call when scrolling is completed and content is scrolled all the way to the end (bottom/right)
*/
onTotalScroll?: () => void;
/**
* A function to call when scrolling is completed and content is scrolled back to the beginning (top/left)
*/
onTotalScrollBack?: () => void;
/**
* Scroll end-limit offset, value in pixels
* Set an offset for which the onTotalScroll callback is triggered.
* Its value is in pixels.
*/
onTotalScrollOffset?: number;
/**
* Set an offset for which the onTotalScrollBack callback is triggered.
* Its value is in pixels
*/
onTotalScrollBackOffset?: number;
/**
* User defined callback function, triggered while scrolling
*/
whileScrolling?: () => void;
@@ -129,12 +143,6 @@ declare module MCustomScrollbar {
}
interface JQuery {
/**
* Creates a new mCustomScrollbar with the specified or default options
*
* @param options Override default options
*/
mCustomScrollbar(options?: MCustomScrollbar.CustomScrollbarOptions): JQuery;
/**
* Calls specified methods on the scrollbar "update", "stop", "disable", "destroy"
*
@@ -149,4 +157,10 @@ interface JQuery {
* @param options Override default options
*/
mCustomScrollbar(scrollTo: string, parameter: any, options?: MCustomScrollbar.ScrollToParameterOptions): JQuery;
/**
* Creates a new mCustomScrollbar with the specified or default options
*
* @param options Override default options
*/
mCustomScrollbar(options?: MCustomScrollbar.CustomScrollbarOptions): JQuery;
}

View File

@@ -47,6 +47,7 @@ declare module MailcheckModule {
export interface IOptions {
domains?: string[];
secondLevelDomains?: string[];
topLevelDomains?: string[];
distanceFunction?: IDistanceFunction;
suggested?: ISuggested | IJQuerySuggested;

View File

@@ -8,7 +8,7 @@ var options: MarkedOptions = {
breaks: false,
pedantic: false,
sanitize: true,
smartLsts: true,
smartLists: true,
silent: false,
highlight: function (code: string, lang: string) {
return '';

View File

@@ -6,10 +6,10 @@
///<reference path="../node/node.d.ts" />
declare module "mongoose" {
function connect(uri: string, options?: ConnectionOption, callback?: (err: any) => void): Mongoose;
function connect(uri: string, options?: ConnectionOptions , callback?: (err: any) => void): Mongoose;
function createConnection(): Connection;
function createConnection(uri: string, options?: ConnectionOption): Connection;
function createConnection(host: string, database_name: string, port?: number, options?: ConnectionOption): Connection;
function createConnection(uri: string, options?: ConnectionOptions): Connection;
function createConnection(host: string, database_name: string, port?: number, options?: ConnectionOptions): Connection;
function disconnect(callback?: (err?: any) => void): Mongoose;
function model<T extends Document>(name: string, schema?: Schema, collection?: string, skipInit?: boolean): Model<T>;
@@ -25,10 +25,10 @@ declare module "mongoose" {
var connection: Connection;
export class Mongoose {
connect(uri: string, options?: ConnectionOption, callback?: (err: any) => void): Mongoose;
connect(uri: string, options?: ConnectOpenOptionsBase, callback?: (err: any) => void): Mongoose;
createConnection(): Connection;
createConnection(uri: string, options?: Object): Connection;
createConnection(host: string, database_name: string, port?: number, options?: ConnectionOption): Connection;
createConnection(host: string, database_name: string, port?: number, options?: ConnectOpenOptionsBase): Connection;
disconnect(callback?: (err?: any) => void): Mongoose;
get(key: string): any;
model<T extends Document>(name: string, schema?: Schema, collection?: string, skipInit?: boolean): Model<T>;
@@ -49,23 +49,66 @@ declare module "mongoose" {
collection(name: string, options?: Object): Collection;
model<T extends Document>(name: string, schema?: Schema, collection?: string): Model<T>;
modelNames(): string[];
open(host: string, database?: string, port?: number, options?: ConnectionOption, callback?: (err: any) => void): Connection;
openSet(uris: string, database?: string, options?: ConnectionSetOption, callback?: (err: any) => void): Connection;
open(host: string, database?: string, port?: number, options?: OpenSetConnectionOptions, callback?: (err: any) => void): Connection;
openSet(uris: string, database?: string, options?: OpenSetConnectionOptions, callback?: (err: any) => void): Connection;
db: any;
collections: {[index: string]: Collection};
readyState: number;
}
export interface ConnectionOption {
export interface ConnectOpenOptionsBase {
db?: any;
server?: any;
replset?: any;
/** Username for authentication if not supplied in the URI. */
user?: string;
/** Password for authentication if not supplied in the URI. */
pass?: string;
/** Options for authentication */
auth?: any;
}
export interface ConnectionSetOption extends ConnectionOption {
mongos?: boolean;
export interface ConnectionOptions extends ConnectOpenOptionsBase {
/** Passed to the underlying driver's Mongos instance. */
mongos?: MongosOptions;
}
interface OpenSetConnectionOptions extends ConnectOpenOptionsBase {
/** If true, enables High Availability support for mongos */
mongos?: boolean;
}
interface MongosOptions {
/** Turn on high availability monitoring. (default: true) */
ha?: boolean;
/** Time between each replicaset status check. (default: 5000) */
haInterval?: number;
/**
* Number of connections in the connection pool for each
* server instance. (default: 5 (for legacy reasons)) */
poolSize?: number;
/**
* Use ssl connection (needs to have a mongod server with
* ssl support). (default: false).
*/
ssl?: boolean;
/**
* Validate mongod server certificate against ca
* (needs to have a mongod server with ssl support, 2.4 or higher)
* (default: true)
*/
sslValidate?: boolean;
/** Turn on high availability monitoring. */
sslCA?: (Buffer|string)[];
sslKey?: Buffer|string;
sslPass?: Buffer|string;
socketOptions?: {
noDelay?: boolean;
keepAlive?: number;
connectionTimeoutMS?: number;
socketTimeoutMS?: number;
};
}
export interface Collection {

View File

@@ -22,7 +22,7 @@ function ResponsePipeline() {
var options = {
compressed: true,
follow: true,
follow: 5,
rejectUnauthorized: true
};

19
needle/needle.d.ts vendored
View File

@@ -15,13 +15,21 @@ declare module Needle {
interface RequestOptions {
timeout?: number;
follow?: any; // number | string
follow?: number;
follow_max?: number;
multipart?: boolean;
proxy?: string;
agent?: string;
headers?: any;
headers?: HttpHeaderOptions;
auth?: string; // auto | digest | basic (default)
json?: boolean;
// These properties are overwritten by those in the 'headers' field
compressed?: boolean;
cookies?: { [name: string]: any; };
// Overwritten if present in the URI
username?: string;
password?: string;
}
interface ResponseOptions {
@@ -31,12 +39,15 @@ declare module Needle {
}
interface HttpHeaderOptions {
cookies?: { [name: string]: any; };
compressed?: boolean;
username?: string;
password?: string;
accept?: string;
connection?: string;
user_agent?: string;
// Overwritten if present in the URI
username?: string;
password?: string;
}
interface TLSOptions {

View File

@@ -10,6 +10,9 @@ declare module "node-gcm" {
delayWhileIdle?: boolean;
timeToLive?: number;
dryRun?: boolean;
data: {
[key: string]: string;
};
}
export class Message {
@@ -20,7 +23,7 @@ declare module "node-gcm" {
dryRun: boolean;
addData(key: string, value: string): void;
addData(data: any): void;
addData(data: { [key: string]: string }): void;
}