Merge pull request #5346 from DanielRosenwasser/handleExtraObjectLiteralProperties

Handle extra object literal properties (Part III)
This commit is contained in:
John Reilly
2015-08-20 05:47:51 +01:00
54 changed files with 715 additions and 332 deletions
+1
View File
@@ -29,6 +29,7 @@ interface amplifyDecoders {
interface amplifyAjaxSettings extends JQueryAjaxSettings {
cache?: any;
dataMap?: {} | ((data: any) => {});
decoder?: any /* string or amplifyDecoder */;
}
@@ -135,7 +135,7 @@ testApp.config((
popupDelay: 1000,
appendToBody: true,
trigger: 'mouseenter hover',
useContentExp: true
useContentExp: true,
});
$tooltipProvider.setTriggers({
'customOpenTrigger': 'customCloseTrigger'
+1
View File
@@ -11,6 +11,7 @@ declare module Backbone {
interface LayoutOptions<TModel extends Model> extends ViewOptions<TModel> {
template?: string;
views?: { [viewName: string]: View<TModel> };
}
interface LayoutManagerOptions {
+6 -4
View File
@@ -10,10 +10,10 @@ declare module Backgrid {
interface GridOptions {
columns: Column[];
collection: Backbone.Collection<Backbone.Model>;
header: Header;
body: Body;
row: Row;
footer: Footer;
header?: Header;
body?: Body;
row?: Row;
footer?: Footer;
}
class Header extends Backbone.View<Backbone.Model> {
@@ -109,6 +109,8 @@ declare module Backgrid {
header: any;
tagName: string;
constructor(options: GridOptions);
initialize(options: any);
getSelectedModels(): Backbone.Model[];
insertColumn(...options: any[]): Grid;
-4
View File
@@ -60,10 +60,6 @@ function bookmarksExample() {
resizable: false,
height: 140,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Yes, Delete It!': function () {
chrome.bookmarks.remove(String(bookmarkNode.id));
-1
View File
@@ -282,7 +282,6 @@ function test_adding_dialog_by_definition() {
function test_adding_plugin() {
CKEDITOR.plugins.add( 'abbr', {
icons: 'abbr',
init: function( editor: CKEDITOR.editor ) {
// empty logic
}
+9 -9
View File
@@ -628,7 +628,7 @@ declare module CKEDITOR {
data: Function;
defaults: Object;
dialog: String;
downcast: any; // should be string | Function
downcast: string | Function;
downcasts: Object;
draggable: boolean;
editables: Object;
@@ -643,16 +643,16 @@ declare module CKEDITOR {
styleToAllowedContentRules: Function;
styleableElements: string;
template: string;
upcast: any; // should be string | Function
upcast: string | Function;
upcasts: Object;
addClass(className: string): void;
applyStyle(style: any): void; // any should be CKEDITOR.style
capture(): void;
checkStyleActive(style: any): boolean; // any should be CKEDITOR.style
define(name: string, meta: {errorProof?: boolean}): void;
define(name: string, meta: { errorProof?: boolean }): void;
destroy(offline?: boolean): void;
destroyEditable(editableName:string, offline?: boolean): void;
destroyEditable(editableName: string, offline?: boolean): void;
edit(): boolean;
fire(eventName: string, data?: Object, editor?: editor): any; // should be boolean | Object
fireOnce(eventName: string, data?: Object, editor?: editor): any; // should be boolean | Object
@@ -670,7 +670,7 @@ declare module CKEDITOR {
removeClass(className: string): void;
removeListener(evnetName: string, listenerFunction: Function): void;
removeStyle(style: any): void; // any should be CKEDITOR.style
setData(keyOrData: any, value?: Object): IWidget; // any should be string | Object
setData(keyOrData: string | {}, value?: Object): IWidget;
setFocused(selected: boolean): IWidget;
setSelected(selected: boolean): IWidget;
toFeature(): any; // should be CKEDITOR.feature
@@ -685,7 +685,7 @@ declare module CKEDITOR {
data?: Function;
defaults?: Object;
dialog?: String;
downcast?: any; // should be string | Function
downcast?: string | Function;
downcasts?: Object;
draggable?: boolean;
edit?: Function;
@@ -701,7 +701,7 @@ declare module CKEDITOR {
styleToAllowedContentRules?: Function;
styleableElements?: string;
template?: string;
upcast?: any; // should be string | Function
upcast?: string | Function;
upcasts?: Object;
toFeature?(): any; // should be CKEDITOR.feature
}
@@ -732,8 +732,8 @@ declare module CKEDITOR {
interface IPluginDefinition {
hidpi?: boolean;
lang?: any; // should be string | string[]
requires?: any; // should be string | string[]a
lang?: string | string[];
requires?: string | string[];
afterInit?(editor: editor): any;
beforeInit?(editor: editor): any;
init?(editor: editor): any;
+4 -4
View File
@@ -127,12 +127,12 @@ declare module CryptoJS{
//BlockCipher has interface same as IStreamCipher
interface BlockCipher extends IStreamCipher<IBlockCipherCfg>{}
interface IBlockCipherCfg{
interface IBlockCipherCfg {
mode?: mode.IBlockCipherModeImpl //default CBC
padding?: pad.IPaddingImpl //default Pkcs7
}
interface CipherParamsData{
interface CipherParamsData {
ciphertext?: lib.WordArray
key?: lib.WordArray
iv?: lib.WordArray
@@ -277,8 +277,8 @@ declare module CryptoJS{
encryptBlock(M: number[], offset: number): void
decryptBlock(M: number[], offset: number): void
createEncryptor(key: lib.WordArray, cfg?: lib.IBlockCipherCfg): IBlockCipherImpl
createDecryptor(key: lib.WordArray, cfg?: lib.IBlockCipherCfg): IBlockCipherImpl
createEncryptor(key: lib.WordArray, cfg?: lib.CipherParamsData): IBlockCipherImpl
createDecryptor(key: lib.WordArray, cfg?: lib.CipherParamsData): IBlockCipherImpl
create(xformMode?: number, key?: lib.WordArray, cfg?: lib.IBlockCipherCfg): IBlockCipherImpl
}
+1 -1
View File
@@ -922,7 +922,7 @@ module forcedBasedLabelPlacemant {
var nodes: Node[] = [];
var labelAnchors: LabelAnchor[] = [];
var labelAnchorLinks: { source: number; target: number }[] = [];
var labelAnchorLinks: { source: number; target: number; weight: number }[] = [];
var links: typeof labelAnchorLinks = [];
for (var i = 0; i < 30; i++) {
+1
View File
@@ -25,6 +25,7 @@ declare module DonnaTypes {
type: string;
name: string;
bindingType: string;
paramNames?: string[];
classProperties?: any[];
prototypeProperties?: number[][];
doc?: string;
+1
View File
@@ -22,6 +22,7 @@ declare module drop {
content?: Element | string | ((drop?: Drop) => string) | ((drop?: Drop) => Element);
position?: string;
openOn?: string;
classes?: string;
constrainToWindow?: boolean;
constrainToScrollParent?: boolean;
remove?: boolean;
+3 -1
View File
@@ -349,6 +349,8 @@ interface CoreObjectArguments {
Override to implement teardown.
**/
willDestroy?: Function;
[propName: string]: any;
}
interface EnumerableConfigurationOptions {
@@ -998,7 +1000,7 @@ declare module Ember {
@static
@param {Object} [args] - Object containing values to use within the new class
**/
static extend<T>(args ?: CoreObjectArguments): T;
static extend<T>(args?: CoreObjectArguments): T;
/**
Creates a new subclass.
@method extend
+6
View File
@@ -125,7 +125,13 @@ declare module "famous/dom-renderables" {
}
export interface IDOMElementOptions {
tagName?: string;
classes?: string[];
attributes?: { [attributeName: string]: string };
properties?: { [attributeName: string]: string };
id?: string;
content?: string;
cutout?: boolean;
}
}
+1 -1
View File
@@ -116,7 +116,7 @@ $(".fancybox").fancybox({
}
});
$(".fancybox").fancybox({
beforeLoad: function () {
beforeLoad: () => {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});
+11 -11
View File
@@ -6,7 +6,7 @@
/// <reference path="../jquery/jquery.d.ts" />
interface FancyboxOptions {
interface FancyboxOptions extends FancyboxCallback {
padding?: any; // number or []
margin?: any; // number or []
width?: any; // number or []
@@ -96,16 +96,16 @@ interface FancyboxMethods {
}
interface FancyboxCallback {
onCancel;
beforeLoad;
afterLoad;
beforeShow;
afterShow;
beforeClose;
afterClose;
onUpdate;
onPlayStart;
onPlayEnd;
onCancel?: Function;
beforeLoad?: Function;
afterLoad?: Function;
beforeShow?: Function;
afterShow?: Function;
beforeClose?: Function;
afterClose?: Function;
onUpdate?: Function;
onPlayStart?: Function;
onPlayEnd?: Function;
}
interface FancyboxThumbnailHelperOptions {
+1 -1
View File
@@ -67,7 +67,7 @@ $('#calendar').fullCalendar({
$('#calendar').fullCalendar('option', 'aspectRatio', 1.8);
$('#calendar').fullCalendar({
viewDisplay: function (view) {
viewRender: function(view) {
alert('The new title of the view is ' + view.title);
}
});
+2 -2
View File
@@ -17,12 +17,12 @@ declare module "gulp-sourcemaps" {
interface WriteOptions {
addComment?: boolean;
includeContext?: boolean;
includeContent?: boolean;
sourceRoot?: string | WriteMapper;
sourceMappingURLPrefix?: string | WriteMapper;
}
export function init(opts?: InitOptions): NodeJS.ReadWriteStream;
export function write(opts?: WriteOptions): NodeJS.ReadWriteStream;
export function write(path?: string, opts?: WriteOptions): NodeJS.ReadWriteStream;
export function write(opts?: WriteOptions): NodeJS.ReadWriteStream;
}
+2 -2
View File
@@ -43,7 +43,7 @@ $("#element")
});
$("#container").hammer({
prevent_default: false,
drag_block_vertical: false
preventDefault: false,
dragBlockVertical: false
}).on("hold tap doubletap transformstart transform transformend dragstart drag dragend release swipe", function (ev) {
});
+1 -3
View File
@@ -112,9 +112,7 @@ var chart2 = new Highcharts.Chart({
});
chart1.exportChart(null, {
chart: {
backgroundColor: '#FFFFFF'
}
backgroundColor: '#FFFFFF'
});
+1 -1
View File
@@ -14,7 +14,7 @@ interface HighstockNavigatorOptions {
baseSeries?: string | number;
enabled?: boolean;
handles?: {
backgoundColor?: string;
backgroundColor?: string;
borderColor?: string;
};
height?: number;
+2 -3
View File
@@ -107,9 +107,8 @@ whenOpts = {is: schema, otherwise: schema};
var refOpts: Joi.ReferenceOptions = null;
refOpts = {alias: bool};
refOpts = {multiple: bool};
refOpts = {override: bool};
refOpts = {separator: str};
refOpts = {contextPrefix: str};
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
+1 -1
View File
@@ -70,5 +70,5 @@ interface JQuery {
dateRangeSlider(method: string): any;
dateRangeSlider(method: string, value: Date): JQuery;
dateRangeSlider(method: string, min: Date, max: Date): JQuery
dateRangeSlider(options?: JQRangeSliderOptions): JQuery;
dateRangeSlider(options?: JQDateRangeSliderOptions): JQuery;
}
+12 -6
View File
@@ -6,14 +6,20 @@
/// <reference path="../jquery/jquery.d.ts" />
interface JsonRpcClientOptions extends JQueryAjaxSettings {
ajaxUrl?: string;
ajaxUrl: string;
headers?: {[key:string]: any};
sockerUrl?: string;
onmessage?: () => void;
onopen?: () => void;
onclose?: () => void;
onerror?: () => void;
socketUrl?: string;
onmessage?: (ev: MessageEvent) => void;
onopen?: (ev: Event) => void;
onclose?: (ev: CloseEvent) => void;
onerror?: (ev: Event) => void;
getSockect?: (onmessageCb: () => void) => WebSocket;
/**
* Sets timeout for calls in milliseconds.
* Works with WebSocket as well as AJAX.
*/
timeout?: number;
}
interface JsonRpcClient {
+2 -3
View File
@@ -88,17 +88,16 @@ declare module JQuerySortable {
}
interface Options extends GroupOptions, ContainerOptions {
group?: string;
}
}
interface JQuery {
sortable(options?: JQuerySortable.Options): JQuery;
sortable(methodName: 'enable'): JQuery;
sortable(methodName: 'disable'): JQuery;
sortable(methodName: 'refresh'): JQuery;
sortable(methodName: 'destroy'): JQuery;
sortable(methodName: 'serialize'): JQuery;
sortable(methodName: string): JQuery;
sortable(options?: JQuerySortable.Options): JQuery;
}
+3 -3
View File
@@ -154,11 +154,11 @@ interface JQueryStatic {
}
interface JQuery {
colorpicker(options?: JQueryColorpickerOptions): JQuery;
colorpicker(method: string): JQuery;
colorpicker(method: string, param: any): JQuery;
colorpicker(method: "close"): JQuery;
colorpicker(method: "destroy"): JQuery;
colorpicker(method: "open"): JQuery;
colorpicker(method: string): JQuery;
colorpicker(method: "setColor", color: any): JQuery;
colorpicker(method: string, param: any): JQuery;
colorpicker(options?: JQueryColorpickerOptions): JQuery;
}
+137 -81
View File
@@ -8,137 +8,193 @@
// Interface options for the plugin
interface JQueryFileInputOptions {
// The drop target element(s), by the default the complete document.
// Set to null to disable drag & drop support:
/**
* The type of data that is expected back from the server.
*/
dataType?: string;
/**
* The drop target element(s), by the default the complete document.
* Set to null to disable drag & drop support:
*/
dropZone?: HTMLElement;
// The paste target element(s), by the default the complete document.
// Set to null to disable paste support:
/**
* The paste target element(s), by the default the complete document.
* Set to null to disable paste support:
*/
pasteZone?: HTMLElement;
// The file input field(s), that are listened to for change events.
// If undefined, it is set to the file input fields inside
// of the widget element on plugin initialization.
// Set to null to disable the change listener.
/**
* The file input field(s), that are listened to for change events.
* If undefined, it is set to the file input fields inside
* of the widget element on plugin initialization.
* Set to null to disable the change listener.
*/
fileInput?: HTMLElement;
// By default, the file input field is replaced with a clone after
// each input field change event. This is required for iframe transport
// queues and allows change events to be fired for the same file
// selection, but can be disabled by setting the following option to false:
/**
* By default, the file input field is replaced with a clone after
* each input field change event. This is required for iframe transport
* queues and allows change events to be fired for the same file
* selection, but can be disabled by setting the following option to false:
*/
replaceFileInput?: boolean;
// The parameter name for the file form data (the request argument name).
// If undefined or empty, the name property of the file input field is
// used, or "files[]" if the file input name property is also empty,
// can be a string or an array of strings:
/**
* The parameter name for the file form data (the request argument name).
* If undefined or empty, the name property of the file input field is
* used, or "files[]" if the file input name property is also empty,
* can be a string or an array of strings:
*/
paramName?: any;
// By default, each file of a selection is uploaded using an individual
// request for XHR type uploads. Set to false to upload file
// selections in one request each:
/**
* By default, each file of a selection is uploaded using an individual
* request for XHR type uploads. Set to false to upload file
* selections in one request each:
*/
singleFileUploads?: boolean;
// To limit the number of files uploaded with one XHR request,
// set the following option to an integer greater than 0:
/**
* To limit the number of files uploaded with one XHR request,
* set the following option to an integer greater than 0:
*/
limitMultiFileUploads?: number;
// The following option limits the number of files uploaded with one
// XHR request to keep the request size under or equal to the defined
// limit in bytes:
/**
* The following option limits the number of files uploaded with one
* XHR request to keep the request size under or equal to the defined
* limit in bytes
*/
limitMultiFileUploadSize?: number;
// Multipart file uploads add a number of bytes to each uploaded file,
// therefore the following option adds an overhead for each file used
// in the limitMultiFileUploadSize configuration:
/**
* Multipart file uploads add a number of bytes to each uploaded file,
* therefore the following option adds an overhead for each file used
* in the limitMultiFileUploadSize configuration:
*/
limitMultiFileUploadSizeOverhead?: number;
// Set the following option to true to issue all file upload requests
// in a sequential order:
/**
* Set the following option to true to issue all file upload requests
* in a sequential order:
*/
sequentialUploads?: boolean;
// To limit the number of concurrent uploads,
// set the following option to an integer greater than 0:
/**
* To limit the number of concurrent uploads,
* set the following option to an integer greater than 0:
*/
limitConcurrentUploads?: number;
// Set the following option to true to force iframe transport uploads:
/**
* Set the following option to true to force iframe transport uploads:
*/
forceIframeTransport?: boolean;
// Set the following option to the location of a redirect url on the
// origin server, for cross-domain iframe transport uploads:
/**
* Set the following option to the location of a redirect url on the
* origin server, for cross-domain iframe transport uploads:
*/
redirect?: string;
// The parameter name for the redirect url, sent as part of the form
// data and set to 'redirect' if this option is empty:
/**
* The parameter name for the redirect url, sent as part of the form
* data and set to 'redirect' if this option is empty:
*/
redirectParamName?: string;
// Set the following option to the location of a postMessage window,
// to enable postMessage transport uploads:
/**
* Set the following option to the location of a postMessage window,
* to enable postMessage transport uploads:
*/
postMessage?: string;
// By default, XHR file uploads are sent as multipart/form-data.
// The iframe transport is always using multipart/form-data.
// Set to false to enable non-multipart XHR uploads:
/**
* By default, XHR file uploads are sent as multipart/form-data.
* The iframe transport is always using multipart/form-data.
* Set to false to enable non-multipart XHR uploads:
*/
multipart?: boolean;
// To upload large files in smaller chunks, set the following option
// to a preferred maximum chunk size. If set to 0, null or undefined,
// or the browser does not support the required Blob API, files will
// be uploaded as a whole.
/**
* To upload large files in smaller chunks, set the following option
* to a preferred maximum chunk size. If set to 0, null or undefined,
* or the browser does not support the required Blob API, files will
* be uploaded as a whole.
*/
maxChunkSize?: number;
// When a non-multipart upload or a chunked multipart upload has been
// aborted, this option can be used to resume the upload by setting
// it to the size of the already uploaded bytes. This option is most
// useful when modifying the options object inside of the "add" or
// "send" callbacks, as the options are cloned for each file upload.
/**
* When a non-multipart upload or a chunked multipart upload has been
* aborted, this option can be used to resume the upload by setting
* it to the size of the already uploaded bytes. This option is most
* useful when modifying the options object inside of the "add" or
* "send" callbacks, as the options are cloned for each file upload.
*/
uploadedBytes?: number;
// By default, failed (abort or error) file uploads are removed from the
// global progress calculation. Set the following option to false to
// prevent recalculating the global progress data:
/**
* By default, failed (abort or error) file uploads are removed from the
* global progress calculation. Set the following option to false to
* prevent recalculating the global progress data:
*/
recalculateProgress?: boolean;
// Interval in milliseconds to calculate and trigger progress events:
/**
* Interval in milliseconds to calculate and trigger progress events:
*/
progressInterval?: number;
// Interval in milliseconds to calculate progress bitrate:
/**
* Interval in milliseconds to calculate progress bitrate:
*/
bitrateInterval?: number;
// By default, uploads are started automatically when adding files:
/**
* By default, uploads are started automatically when adding files:
*/
autoUpload?: boolean;
// Error and info messages:
/**
* Error and info messages:
*/
messages?: any;
// Translation function, gets the message key to be translated
// and an object with context specific data as arguments:
/**
* Translation function, gets the message key to be translated
* and an object with context specific data as arguments:
*/
i18n?: any;
// Additional form data to be sent along with the file uploads can be set
// using this option, which accepts an array of objects with name and
// value properties, a function returning such an array, a FormData
// object (for XHR file uploads), or a simple object.
// The form of the first fileInput is given as parameter to the function:
/**
* Additional form data to be sent along with the file uploads can be set
* using this option, which accepts an array of objects with name and
* value properties, a function returning such an array, a FormData
* object (for XHR file uploads), or a simple object.
* The form of the first fileInput is given as parameter to the function:
*/
formData?: any;
// The add callback is invoked as soon as files are added to the fileupload
// widget (via file input selection, drag & drop, paste or add API call).
// If the singleFileUploads option is enabled, this callback will be
// called once for each file in the selection for XHR file uploads, else
// once for each file selection.
//
// The upload starts when the submit method is invoked on the data parameter.
// The data object contains a files property holding the added files
// and allows you to override plugin options as well as define ajax settings.
//
// Listeners for this callback can also be bound the following way:
// .bind('fileuploadadd', func);
//
// data.submit() returns a Promise object and allows to attach additional
// handlers using jQuery's Deferred callbacks:
// data.submit().done(func).fail(func).always(func);
/**
* The add callback is invoked as soon as files are added to the fileupload
* widget (via file input selection, drag & drop, paste or add API call).
* If the singleFileUploads option is enabled, this callback will be
* called once for each file in the selection for XHR file uploads, else
* once for each file selection.
*
* The upload starts when the submit method is invoked on the data parameter.
* The data object contains a files property holding the added files
* and allows you to override plugin options as well as define ajax settings.
*
* Listeners for this callback can also be bound the following way:
* .bind('fileuploadadd', func);
*
* data.submit() returns a Promise object and allows to attach additional
* handlers using jQuery's Deferred callbacks:
* data.submit().done(func).fail(func).always(func);
*/
add?: any;
// The plugin options are used as settings object for the ajax calls.
+7
View File
@@ -18,6 +18,13 @@ declare module JQueryNotifyBar {
*/
delay?: number;
/**
* How long this bar will be slided up and down.
*
* Default: "normal"
*/
animationSpeed?: string | number;
/**
* Custom jQuery object for notify bar.
*/
+7 -3
View File
@@ -47,11 +47,15 @@ function test_defauluts() {
timeout: 650,
push: true,
replace: false,
maxCacheLength: 20,
version: $.noop,
scrollTo: 0,
type: 'GET',
dataType: 'html',
scrollTo: 0,
maxCacheLength: 20,
version: $.noop
container: "#pjax-container",
url: "https://jquery.com/",
target: <EventTarget>undefined,
fragment: "#pjax-response",
};
}
+22 -1
View File
@@ -36,7 +36,28 @@ interface PjaxSettings extends JQueryAjaxSettings {
/**
* How many requests to cache. Defaults to 20.
*/
maxCacheLength?: number;
maxCacheLength?: number;
/**
* A string or function returning the current pjax version
*/
version?: string | (() => string);
/**
* Vertical position to scroll to after navigation.
* To avoid changing scroll position, pass false.
*/
scrollTo?: number | boolean;
/**
* Eventually the relatedTarget value for pjax events.
*/
target?: EventTarget;
/**
* CSS selector for the fragment to extract from ajax response.
*/
fragment?: string;
}
interface JQuery {
+60 -38
View File
@@ -7,68 +7,90 @@
/// <reference path="../jqueryui/jqueryui.d.ts"/>
interface TimePickerHour {
starts?: number; // first displayed hour
ends?: number; // last displayed hour
/** first displayed hour */ starts?: number;
/** last displayed hour */ ends?: number;
}
interface TimePickerMinutes {
starts?: number; // first displayed minute
ends?: number; // last displayed minute
interval?: number; // interval of displayed minutes
/** first displayed minute */ starts?: number;
/** last displayed minute */ ends?: number;
/** interval of displayed minutes */ interval?: number;
}
interface TimePickerOptions {
showOn?: string; // 'focus' for popup on focus,
// 'button' for trigger button, or 'both' for either (not yet implemented)
button?: string; // 'button' element that will trigger the timepicker
showAnim?: string; // Name of jQuery animation for popup
showOptions?: any; // Options for enhanced animations
appendText?: string; // Display text following the input box, e.g. showing the format
/** 'focus' for popup on focus, */ showOn?: string;
/**␍ * 'button' element that will trigger the timepicker.␍ *␍ * "button" for trigger button, or "both" for either (not yet implemented).␍ */ button?: string;
// Localization
/** Define the locale text for "Hours" */
hourText?: string;
/** Define the locale text for "Minute" */
minuteText?: string;
/** Define the locale text for periods. */
amPmText?: [string, string];
/** Name of jQuery animation for popup */ showAnim?: string;
/** Options for enhanced animations */ showOptions?: any;
/** Display text following the input box, e.g. showing the format */ appendText?: string;
beforeShow?: () => any; // Define a callback function executed before the timepicker is shown
onSelect?: (timeText: string, inst: any) => any; // Define a callback function when a hour / minutes is selected
onClose?: (timeText: string, inst: any) => any; // Define a callback function when the timepicker is closed
/** Define a callback function executed before the timepicker is shown */ beforeShow?: () => any;
/** Define a callback function when a hour / minutes is selected */ onSelect?: (timeText: string, inst: any) => any;
/** Define a callback function when the timepicker is closed */ onClose?: (timeText: string, inst: any) => any;
/** The character to use to separate hours and minutes. */ timeSeparator?: string;
/** The character to use to separate the time from the time period. */ periodSeparator?: string;
/** Define whether or not to show AM/PM with selected time */ showPeriod?: boolean;
/** Show the AM/PM labels on the left of the time picker */ showPeriodLabels?: boolean;
/** Define whether or not to show a leading zero for hours < 10. [true/false] */ showLeadingZero?: boolean;
/** Define whether or not to show a leading zero for minutes < 10. */ showMinutesLeadingZero?: boolean;
/** Selector for an alternate field to store selected time into */ altField?: string;
/**␍ * Used as default time when input field is empty or for inline timePicker␍ * (set to 'now' for the current time, '' for no highlighted time)␍ **/ defaultTime?: string;
/**␍ * Position of the dialog relative to the input.␍ *␍ * See the position utility for more info : http://jqueryui.com/demos/position/␍ */ myPosition?: string;
/**␍ * Position of the input element to match␍ *␍ * Note : if the position utility is not loaded, the timepicker will attach left top to left bottom␍ * See the position utility for more info : http://jqueryui.com/demos/position/␍ */ atPosition?: string;
timeSeparator?: string; // The character to use to separate hours and minutes.
periodSeparator?: string; // The character to use to separate the time from the time period.
showPeriod?: boolean; // Define whether or not to show AM/PM with selected time
showPeriodLabels?: boolean; // Show the AM/PM labels on the left of the time picker
showLeadingZero?: boolean; // Define whether or not to show a leading zero for hours < 10. [true/false]
showMinutesLeadingZero?: boolean; // Define whether or not to show a leading zero for minutes < 10.
altField?: string; // Selector for an alternate field to store selected time into
defaultTime?: string; // Used as default time when input field is empty or for inline timePicker
// (set to 'now' for the current time, '' for no highlighted time)
myPosition?: string; // Position of the dialog relative to the input.
// see the position utility for more info : http://jqueryui.com/demos/position/
atPosition?: string; // Position of the input element to match
// Note : if the position utility is not loaded, the timepicker will attach left top to left bottom
//NEW: 2011-02-03
onHourShow?: () => any; // callback for enabling / disabling on selectable hours ex : function(hour) { return true; }
onMinuteShow?: () => any; // callback for enabling / disabling on time selection ex : function(hour,minute) { return true; }
/** callback for enabling / disabling on selectable hours ex : function(hour) { return true; } */ onHourShow?: () => any;
/** callback for enabling / disabling on time selection ex : function(hour,minute) { return true; } */ onMinuteShow?: () => any;
hours?: TimePickerHour;
minutes?: TimePickerMinutes;
rows?: number; // number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
/** number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2 */ rows?: number;
// 2011-08-05 0.2.4
showHours?: boolean; // display the hours section of the dialog
showMinutes?: boolean; // display the minute section of the dialog
optionalMinutes?: boolean; // optionally parse inputs of whole hours with minutes omitted
/** display the hours section of the dialog */ showHours?: boolean;
/** display the minute section of the dialog */ showMinutes?: boolean;
/** optionally parse inputs of whole hours with minutes omitted */ optionalMinutes?: boolean;
// buttons
showCloseButton?: boolean; // shows an OK button to confirm the edit
showNowButton?: boolean; // Shows the 'now' button
showDeselectButton?: boolean; // Shows the deselect time button
/** shows an OK button to confirm the edit */ showCloseButton?: boolean;
/** Text for the confirmation button (ok button).*/
closeButtonText?: string;
/** Shows the 'now' button */ showNowButton?: boolean;
/** Text for the 'now' button.*/
nowButtonText?: string;
/** Shows the deselect time button */ showDeselectButton?: boolean;
/** Text for the deselect button */
deselectButtonText?: string;
}
interface JQuery {
timepicker(): JQuery;
timepicker(options: TimePickerOptions): JQuery;
timepicker(methodName: string): any;
timepicker(methodName: 'getTime'): string;
timepicker(methodName: 'getTimeAsDate'): Date;
timepicker(methodName: 'getHour'): number;
timepicker(methodName: 'getMinute'): number;
timepicker(methodName: string): any;
timepicker(methodName: string, methodParameter: any): any;
timepicker(optionLiteral: string, optionName: string): any;
timepicker(options: TimePickerOptions): JQuery;
}
+8 -2
View File
@@ -5,7 +5,7 @@
/// <reference path="../jquery/jquery.d.ts" />
interface UniformOptions {
interface UniformCoreOptions {
activeClass?: string;
autoHide?: boolean;
buttonClass?: string;
@@ -22,6 +22,7 @@ interface UniformOptions {
hoverClass?: string;
idPrefix?: string;
inputAddTypeAsClass?: boolean;
inputClass?: string;
radioClass?: string;
resetDefaultHtml?: string;
resetSelector?: any;
@@ -33,12 +34,17 @@ interface UniformOptions {
useID?: boolean;
wrapperClass?: string;
}
interface UniformOptions extends UniformCoreOptions {
[option: string]: any;
}
interface Uniform {
(options?: UniformOptions): JQuery;
update(elemOrSelector?: any): void;
restore(elemOrSelector?: any): void;
elements: JQuery[];
defaults: UniformOptions;
defaults: UniformOptions;
}
interface JQueryStatic {
uniform: Uniform;
+4
View File
@@ -185,6 +185,10 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
* Property containing the parsed response if the response Content-Type is json
*/
responseJSON?: any;
/**
* A function to be called if the request fails.
*/
error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void;
}
/**
+13 -19
View File
@@ -769,13 +769,7 @@ function test_autocomplete() {
$("#project-icon").attr("src", "images/" + ui.item.icon);
return false;
}
})
.data("autocomplete")._renderItem = (ul, item) => {
return $("<li>")
.data("item.autocomplete", item)
.append("<a>" + item.label + "<br>" + item.desc + "</a>")
.appendTo(ul);
};
});
$("#developer").autocomplete({
source: (request, response) => {
@@ -1425,12 +1419,13 @@ function test_dialog() {
height: 300,
width: 350,
modal: true,
buttons: {},
Cancel: function () {
$(this).dialog("close");
},
close: function () {
var $el = $(this).dialog("destroy");
buttons: {
Cancel: function () {
$(this).dialog("close");
},
close: function () {
var $el = $(this).dialog("destroy");
}
}
});
$("#dialog-message").dialog({
@@ -1581,7 +1576,7 @@ function test_spinner() {
min: 5,
max: 2500,
step: 25,
start: 1000,
start: function () { return; },
numberFormat: "C"
});
$("#spinner").spinner({
@@ -1595,8 +1590,8 @@ function test_spinner() {
});
$("#lat, #lng").spinner({
step: .001,
change: 123,
stop: 321
change() { },
stop() { },
});
$("#spinner").spinner({
spin: function (event, ui) {
@@ -1647,11 +1642,11 @@ function test_tabs() {
});
$("#tabs").tabs({
beforeLoad: function (event, ui) {
ui.jqXHR.error(function () {
ui.jqXHR.error = function () {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo.");
});
};
}
});
$("#tabs").tabs({
@@ -1764,7 +1759,6 @@ function test_effects() {
of: $("#parent"),
my: $("#my_horizontal").val() + " " + $("#my_vertical").val(),
at: $("#at_horizontal").val() + " " + $("#at_vertical").val(),
offset: $("#offset").val(),
collision: $("#collision_horizontal").val() + " " + $("#collision_vertical").val()
});
$("#toggle").toggle({ effect: "scale", direction: "horizontal" });
+90 -60
View File
@@ -43,7 +43,7 @@ declare module JQueryUI {
// Autocomplete //////////////////////////////////////////////////
interface AutocompleteOptions {
interface AutocompleteOptions extends AutocompleteEvents {
appendTo?: any; //Selector;
autoFocus?: boolean;
delay?: number;
@@ -54,7 +54,10 @@ declare module JQueryUI {
}
interface AutocompleteUIParams {
/**
* The item selected from the menu, if any. Otherwise the property is null
*/
item?: any;
}
interface AutocompleteEvent {
@@ -72,7 +75,7 @@ declare module JQueryUI {
select?: AutocompleteEvent;
}
interface Autocomplete extends Widget, AutocompleteOptions, AutocompleteEvents {
interface Autocomplete extends Widget, AutocompleteOptions {
escapeRegex: (value: string) => string;
}
@@ -336,15 +339,16 @@ declare module JQueryUI {
// Dialog //////////////////////////////////////////////////
interface DialogOptions {
interface DialogOptions extends DialogEvents {
autoOpen?: boolean;
buttons?: any; // object or []
buttons?: { [buttonText: string]: () => void } | ButtonOptions[];
closeOnEscape?: boolean;
closeText?: string;
dialogClass?: string;
disabled?: boolean;
draggable?: boolean;
height?: any; // number or string
height?: number | string;
hide?: boolean | number | string | DialogShowHideOptions;
maxHeight?: number;
maxWidth?: number;
minHeight?: number;
@@ -352,7 +356,7 @@ declare module JQueryUI {
modal?: boolean;
position?: any; // object, string or []
resizable?: boolean;
show?: any; // number, string or object
show?: boolean | number | string | DialogShowHideOptions;
stack?: boolean;
title?: string;
width?: any; // number or string
@@ -361,6 +365,13 @@ declare module JQueryUI {
close?: DialogEvent;
}
interface DialogShowHideOptions {
effect: string;
delay?: number;
duration?: number;
easing?: string;
}
interface DialogUIParams {
}
@@ -382,7 +393,7 @@ declare module JQueryUI {
resizeStop?: DialogEvent;
}
interface Dialog extends Widget, DialogOptions, DialogEvents {
interface Dialog extends Widget, DialogOptions {
}
@@ -398,7 +409,7 @@ declare module JQueryUI {
(event: Event, ui: DraggableEventUIParams): void;
}
interface DraggableOptions {
interface DraggableOptions extends DraggableEvents {
disabled?: boolean;
addClasses?: boolean;
appendTo?: any;
@@ -453,7 +464,7 @@ declare module JQueryUI {
(event: Event, ui: DroppableEventUIParam): void;
}
interface DroppableOptions {
interface DroppableOptions extends DroppableEvents {
disabled?: boolean;
accept?: any;
activeClass?: string;
@@ -472,7 +483,7 @@ declare module JQueryUI {
drop?: DroppableEvent;
}
interface Droppable extends Widget, DroppableOptions, DroppableEvents {
interface Droppable extends Widget, DroppableOptions {
}
// Menu //////////////////////////////////////////////////
@@ -529,7 +540,7 @@ declare module JQueryUI {
// Resizable //////////////////////////////////////////////////
interface ResizableOptions {
interface ResizableOptions extends ResizableEvents {
alsoResize?: any; // Selector, JQuery or Element
animate?: boolean;
animateDuration?: any; // number or string
@@ -571,13 +582,13 @@ declare module JQueryUI {
stop?: ResizableEvent;
}
interface Resizable extends Widget, ResizableOptions, ResizableEvents {
interface Resizable extends Widget, ResizableOptions {
}
// Selectable //////////////////////////////////////////////////
interface SelectableOptions {
interface SelectableOptions extends SelectableEvents {
autoRefresh?: boolean;
cancel?: string;
delay?: number;
@@ -596,12 +607,12 @@ declare module JQueryUI {
unselecting? (event: Event, ui: { unselecting: Element; }): void;
}
interface Selectable extends Widget, SelectableOptions, SelectableEvents {
interface Selectable extends Widget, SelectableOptions {
}
// Slider //////////////////////////////////////////////////
interface SliderOptions {
interface SliderOptions extends SliderEvents {
animate?: any; // boolean, string or number
disabled?: boolean;
max?: number;
@@ -631,7 +642,7 @@ declare module JQueryUI {
stop?: SliderEvent;
}
interface Slider extends Widget, SliderOptions, SliderEvents {
interface Slider extends Widget, SliderOptions {
}
@@ -652,6 +663,7 @@ declare module JQueryUI {
forceHelperSize?: boolean;
forcePlaceholderSize?: boolean;
grid?: number[];
helper?: string | ((event: Event, element: Sortable) => Element);
handle?: any; // Selector or Element
items?: any; // Selector
opacity?: number;
@@ -699,7 +711,7 @@ declare module JQueryUI {
// Spinner //////////////////////////////////////////////////
interface SpinnerOptions {
interface SpinnerOptions extends SpinnerEvents {
culture?: string;
disabled?: boolean;
icons?: any;
@@ -711,26 +723,29 @@ declare module JQueryUI {
step?: any; // number or string
}
interface SpinnerUIParams {
interface SpinnerUIParam {
value: number;
}
interface SpinnerEvent {
(event: Event, ui: SpinnerUIParams): void;
interface SpinnerEvent<T> {
(event: Event, ui: T): void;
}
interface SpinnerEvents {
spin?: SpinnerEvent;
start?: SpinnerEvent;
stop?: SpinnerEvent;
change?: SpinnerEvent<{}>;
create?: SpinnerEvent<{}>;
spin?: SpinnerEvent<SpinnerUIParam>;
start?: SpinnerEvent<{}>;
stop?: SpinnerEvent<{}>;
}
interface Spinner extends Widget, SpinnerOptions, SpinnerEvents {
interface Spinner extends Widget, SpinnerOptions {
}
// Tabs //////////////////////////////////////////////////
interface TabsOptions {
interface TabsOptions extends TabsEvents {
active?: any; // boolean or number
collapsible?: boolean;
disabled?: any; // boolean or []
@@ -738,29 +753,40 @@ declare module JQueryUI {
heightStyle?: string;
hide?: any; // boolean, number, string or object
show?: any; // boolean, number, string or object
activate?: TabsEvent;
}
interface TabsUIParams {
interface TabsActivationUIParams {
newTab: JQuery;
oldTab: JQuery;
newPanel: JQuery;
oldPanel: JQuery;
}
interface TabsEvent {
(event: Event, ui: TabsUIParams): void;
interface TabsBeforeLoadUIParams {
tab: JQuery;
panel: JQuery;
jqXHR: JQueryXHR;
ajaxSettings: any;
}
interface TabsCreateOrLoadUIParams {
tab: JQuery;
panel: JQuery;
}
interface TabsEvent<UI> {
(event: Event, ui: UI): void;
}
interface TabsEvents {
activate?: TabsEvent;
beforeActivate?: TabsEvent;
beforeLoad?: TabsEvent;
load?: TabsEvent;
activate?: TabsEvent<TabsActivationUIParams>;
beforeActivate?: TabsEvent<TabsActivationUIParams>;
beforeLoad?: TabsEvent<TabsBeforeLoadUIParams>;
load?: TabsEvent<TabsCreateOrLoadUIParams>;
create?: TabsEvent<TabsCreateOrLoadUIParams>;
}
interface Tabs extends Widget, TabsOptions, TabsEvents {
interface Tabs extends Widget, TabsOptions {
}
@@ -798,7 +824,7 @@ declare module JQueryUI {
interface EffectOptions {
effect: string;
easing?: string;
duration: any;
duration?: number;
complete: Function;
}
@@ -1569,29 +1595,32 @@ interface JQuery {
droppable(optionLiteral: string, options: JQueryUI.DraggableOptions): any;
droppable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
menu(): JQuery;
menu(methodName: 'blur'): void;
menu(methodName: 'collapse', event?: JQueryEventObject): void;
menu(methodName: 'collapseAll', event?: JQueryEventObject, all?: boolean): void;
menu(methodName: 'destroy'): void;
menu(methodName: 'disable'): void;
menu(methodName: 'enable'): void;
menu(methodName: string, event: JQueryEventObject, item: JQuery): void;
menu(methodName: 'focus', event: JQueryEventObject, item: JQuery): void;
menu(methodName: 'isFirstItem'): boolean;
menu(methodName: 'isLastItem'): boolean;
menu(methodName: 'next', event?: JQueryEventObject): void;
menu(methodName: 'nextPage', event?: JQueryEventObject): void;
menu(methodName: 'previous', event?: JQueryEventObject): void;
menu(methodName: 'previousPage', event?: JQueryEventObject): void;
menu(methodName: 'refresh'): void;
menu(methodName: 'select', event?: JQueryEventObject): void;
menu(methodName: 'widget'): JQuery;
menu(methodName: string): JQuery;
menu(options: JQueryUI.MenuOptions): JQuery;
menu(optionLiteral: string, optionName: string): any;
menu(optionLiteral: string, options: JQueryUI.MenuOptions): any;
menu(optionLiteral: string, optionName: string, optionValue: any): JQuery;
menu: {
(): JQuery;
(methodName: 'blur'): void;
(methodName: 'collapse', event?: JQueryEventObject): void;
(methodName: 'collapseAll', event?: JQueryEventObject, all?: boolean): void;
(methodName: 'destroy'): void;
(methodName: 'disable'): void;
(methodName: 'enable'): void;
(methodName: string, event: JQueryEventObject, item: JQuery): void;
(methodName: 'focus', event: JQueryEventObject, item: JQuery): void;
(methodName: 'isFirstItem'): boolean;
(methodName: 'isLastItem'): boolean;
(methodName: 'next', event?: JQueryEventObject): void;
(methodName: 'nextPage', event?: JQueryEventObject): void;
(methodName: 'previous', event?: JQueryEventObject): void;
(methodName: 'previousPage', event?: JQueryEventObject): void;
(methodName: 'refresh'): void;
(methodName: 'select', event?: JQueryEventObject): void;
(methodName: 'widget'): JQuery;
(methodName: string): JQuery;
(options: JQueryUI.MenuOptions): JQuery;
(optionLiteral: string, optionName: string): any;
(optionLiteral: string, options: JQueryUI.MenuOptions): any;
(optionLiteral: string, optionName: string, optionValue: any): JQuery;
active: boolean;
}
progressbar(): JQuery;
progressbar(methodName: 'destroy'): void;
@@ -1659,6 +1688,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 }): string;
sortable(optionLiteral: string, options: JQueryUI.SortableOptions): any;
sortable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
+1 -1
View File
@@ -9,7 +9,7 @@ declare var js_beautify: {
indent_char?: string;
eol?: string;
indent_level?: number;
indent_width_tabs?: boolean;
indent_with_tabs?: boolean;
preserve_newlines?: boolean;
max_preserve_newlines?: number;
jslint_happy: boolean;
+7 -3
View File
@@ -6,9 +6,13 @@
/// <reference path="../leaflet/leaflet.d.ts" />
declare module L {
export interface IconOptions {
labelAnchor?: Point;
}
export interface IconOptions {
labelAnchor?: Point;
}
export interface PathOptions {
labelAnchor?: Point;
}
export interface CircleMarkerOptions {
labelAnchor?: Point;
+1 -2
View File
@@ -186,7 +186,7 @@ map.once('contextmenu', (e: L.LeafletMouseEvent) => {
var marker = L.marker(L.latLng(42, 51), {
icon: L.icon({
iconURl: 'roger.png',
iconUrl: 'roger.png',
iconRetinaUrl: 'roger-retina.png',
iconSize: L.point(40, 40),
iconAnchor: L.point(20, 0),
@@ -264,7 +264,6 @@ popup.setLatLng(L.latLng(12, 54)).setContent('this is nice popup').openOn(map);
popup.update();
var tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}', {
foo: 'bar',
minZoom: 0,
maxZoom: 18,
maxNativeZoom: 17,
+26 -5
View File
@@ -264,6 +264,11 @@ declare module L {
declare module L {
export interface ClassExtendOptions {
/**
* Your class's constructor function, meaning that it gets called when you do 'new MyClass(...)'.
*/
initialize?: Function;
/**
* options is a special property that unlike other objects that you pass
* to extend will be merged with the parent one instead of overriding it
@@ -286,6 +291,8 @@ declare module L {
* constants.
*/
static?: any;
[prop: string]: any;
}
export interface ClassStatic {
@@ -3592,6 +3599,11 @@ declare module L {
*/
autoPan?: boolean;
/**
* Set it to true if you want to prevent users from panning the popup off of the screen while it is open.
*/
keepInView?: boolean;
/**
* Controls the presense of a close button in the popup.
*
@@ -3645,6 +3657,11 @@ declare module L {
* option).
*/
closeOnClick?: boolean;
/**
* A custom class name to assign to the popup.
*/
className?: string;
}
}
@@ -4064,6 +4081,11 @@ declare module L {
* Default value: false.
*/
reuseTiles?: boolean;
/**
* When this option is set, the TileLayer only loads tiles that are in the given geographical bounds.
*/
bounds?: LatLngBounds;
}
}
@@ -4219,13 +4241,12 @@ declare module L {
declare module L {
export interface ZoomOptions {
/**
* The position of the control (one of the map corners). See control positions.
*
* Default value: 'topright'.
* If not specified, zoom animation will happen if the zoom origin is inside the current view.
* If true, the map will attempt animating zoom disregarding where zoom origin is.
* Setting false will make it always reset the view completely without animation.
*/
position?: string;
animate?: boolean;
}
}
+109 -5
View File
@@ -63,8 +63,8 @@ declare module "log4js" {
*/
export function shutdown(cb: Function): void;
export function configure(config: IConfig, options?: any): void;
export function configure(filename: string, options?: any): void;
export function configure(config: IConfig, options?: any): void;
export function setGlobalLogLevel(level: string): void;
export function setGlobalLogLevel(level: Level): void;
@@ -126,14 +126,118 @@ declare module "log4js" {
}
export interface IConfig {
appenders: IAppenderConfig[];
appenders: AppenderConfig[];
levels?: { [category: string]: string };
replaceConsole?: boolean;
}
export interface IAppenderConfig {
export interface AppenderConfigBase {
type: string;
category?: string[];
// etc...
category?: string;
}
export interface ConsoleAppenderConfig extends AppenderConfigBase {}
export interface FileAppenderConfig extends AppenderConfigBase {
filename: string;
}
export interface DateFileAppenderConfig extends FileAppenderConfig {
/**
* The following strings are recognised in the pattern:
* - yyyy : the full year, use yy for just the last two digits
* - MM : the month
* - dd : the day of the month
* - hh : the hour of the day (24-hour clock)
* - mm : the minute of the hour
* - ss : seconds
* - SSS : milliseconds (although I'm not sure you'd want to roll your logs every millisecond)
* - O : timezone (capital letter o)
*/
pattern: string;
alwaysIncludePattern: boolean;
}
export interface SmtpAppenderConfig extends AppenderConfigBase {
/** Comma separated list of email recipients */
recipients: string;
/** Sender of all emails (defaults to transport user) */
sender: string;
/** Subject of all email messages (defaults to first event's message)*/
subject: string;
/**
* The time in seconds between sending attempts (defaults to 0).
* All events are buffered and sent in one email during this time.
* If 0 then every event sends an email
*/
sendInterval: number;
SMTP: {
host: string;
secure: boolean;
port: number;
auth: {
user: string;
pass: string;
}
}
}
export interface HookIoAppenderConfig extends FileAppenderConfig {
maxLogSize: number;
backup: number;
pollInterval: number;
}
export interface GelfAppenderConfig extends AppenderConfigBase {
host: string;
hostname: string;
port: string;
facility: string;
}
export interface MultiprocessAppenderConfig extends AppenderConfigBase {
mode: string;
loggerPort: number;
loggerHost: string;
facility: string;
appender?: AppenderConfig;
}
export interface LogglyAppenderConfig extends AppenderConfigBase {
/** Loggly customer token - https://www.loggly.com/docs/api-sending-data/ */
token: string;
/** Loggly customer subdomain (use 'abc' for abc.loggly.com) */
subdomain: string;
/** an array of strings to help segment your data & narrow down search results in Loggly */
tags: string[];
/** Enable JSON logging by setting to 'true' */
json: boolean;
}
export interface ClusteredAppenderConfig extends AppenderConfigBase {
appenders?: AppenderConfig[];
}
type CoreAppenderConfig = ConsoleAppenderConfig
| FileAppenderConfig
| DateFileAppenderConfig
| SmtpAppenderConfig
| HookIoAppenderConfig
| GelfAppenderConfig
| MultiprocessAppenderConfig
| LogglyAppenderConfig
| ClusteredAppenderConfig
interface CustomAppenderConfig extends AppenderConfigBase {
[prop: string]: any;
}
type AppenderConfig = CoreAppenderConfig | CustomAppenderConfig;
}
+25 -11
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;
}
+1
View File
@@ -47,6 +47,7 @@ declare module MailcheckModule {
export interface IOptions {
domains?: string[];
secondLevelDomains?: string[];
topLevelDomains?: string[];
distanceFunction?: IDistanceFunction;
suggested?: ISuggested | IJQuerySuggested;
+1 -1
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 '';
+1 -1
View File
@@ -134,7 +134,7 @@ declare module Meteor {
}
declare module Mongo {
interface Selector extends Object {}
interface Selector {}
interface Modifier {}
interface SortSpecifier {}
interface FieldSpecifier {
+53 -10
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 {
+1 -1
View File
@@ -22,7 +22,7 @@ function ResponsePipeline() {
var options = {
compressed: true,
follow: true,
follow: 5,
rejectUnauthorized: true
};
+15 -4
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 {
+4 -1
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;
}
+1 -1
View File
@@ -2802,7 +2802,7 @@ declare module StripeNode {
* A set of key/value pairs that you can attach to a reversal. It can be useful for storing
* additional information about the reversal in a structured format.
*/
interface IMetadata extends Object { }
interface IMetadata { }
interface IShippingInformation {
/**
+1 -1
View File
@@ -11,7 +11,7 @@ var config: tedious.ConnectionConfig = {
server: "127.0.0.1",
options: {
database: "somedb",
instance: "someinstance"
instanceName: "someinstance",
}
}
+1 -1
View File
@@ -1287,7 +1287,7 @@ var specs: Vega.Spec[] = [
"name": "x",
"type": "linear",
"range": "width",
"reverse": {"field": "index"},
"reverse": true,
"nice": true,
"domain": {"data": "pop2000", "field": "data.people"}
}
+1
View File
@@ -369,6 +369,7 @@ declare module Vega {
properties?: PropertySets;
key?: string;
delay?: ValueRef;
scales?: Scale[];
}
export module Mark {
+7 -7
View File
@@ -379,7 +379,7 @@ describe('dest stream', function () {
cwd: __dirname,
path: inputPath,
contents: expectedContents,
stat: {
stat: <fs.Stats>{
mode: expectedMode
}
});
@@ -420,7 +420,7 @@ describe('dest stream', function () {
cwd: __dirname,
path: inputPath,
contents: contentStream,
stat: {
stat: <fs.Stats>{
mode: expectedMode
}
});
@@ -463,7 +463,7 @@ describe('dest stream', function () {
cwd: __dirname,
path: inputPath,
contents: null,
stat: {
stat: <fs.Stats>{
isDirectory: function () {
return true;
},
@@ -713,7 +713,7 @@ describe('symlink stream', function () {
cwd: __dirname,
path: inputPath,
contents: expectedContents,
stat: {
stat: <fs.Stats>{
mode: expectedMode
}
});
@@ -754,7 +754,7 @@ describe('symlink stream', function () {
cwd: __dirname,
path: inputPath,
contents: contentStream,
stat: {
stat: <fs.Stats>{
mode: expectedMode
}
});
@@ -797,7 +797,7 @@ describe('symlink stream', function () {
cwd: __dirname,
path: inputPath,
contents: null,
stat: {
stat: <fs.Stats>{
isDirectory: function () {
return true;
},
@@ -874,7 +874,7 @@ describe('symlink stream', function () {
cwd: __dirname,
path: inputPath,
contents: expectedContents,
stat: {
stat: <fs.Stats>{
mode: expectedMode
}
});
+26 -8
View File
@@ -73,7 +73,7 @@ describe('File', () => {
it('should set stat to given value', done => {
var val = {};
var file = new File({stat: val});
var file = new File(<fs.Stats><any>{stat: val});
file.stat.should.equal(val);
done();
});
@@ -150,8 +150,8 @@ describe('File', () => {
});
describe('isDirectory()', () => {
var fakeStat = {
isDirectory: () => {
var fakeStat = <fs.Stats>{
isDirectory() {
return true;
}
};
@@ -191,8 +191,20 @@ describe('File', () => {
file2.cwd.should.equal(file.cwd);
file2.base.should.equal(file.base);
file2.path.should.equal(file.path);
file2.contents.should.not.equal(file.contents, 'buffer ref should be different');
file2.contents.toString('utf8').should.equal(file.contents.toString('utf8'));
let fileContents = file.contents;
let file2Contents = file2.contents;
file2Contents.should.not.equal(fileContents, 'buffer ref should be different');
let fileUtf8Contents = fileContents instanceof Buffer ?
fileContents.toString('utf8') :
(<NodeJS.ReadableStream>fileContents).toString();
let file2Utf8Contents = file2Contents instanceof Buffer ?
file2Contents.toString('utf8') :
(<NodeJS.ReadableStream>file2Contents).toString();
file2Utf8Contents.should.equal(fileUtf8Contents);
done();
});
@@ -294,7 +306,10 @@ describe('File', () => {
var ret = file.pipe(stream);
ret.should.equal(stream, 'should return the stream');
file.contents.write(testChunk);
let fileContents = file.contents;
if (fileContents instanceof Buffer) {
fileContents.write(testChunk.toString());
}
});
it('should do nothing with null', done => {
@@ -360,7 +375,10 @@ describe('File', () => {
var ret = file.pipe(stream, {end: false});
ret.should.equal(stream, 'should return the stream');
file.contents.write(testChunk);
let fileContents = file.contents;
if (fileContents instanceof Buffer) {
fileContents.write(testChunk.toString());
}
});
it('should do nothing with null', done => {
@@ -475,7 +493,7 @@ describe('File', () => {
var val = "test";
var file = new File();
try {
file.contents = val;
file.contents = new Buffer(val);
} catch (err) {
should.exist(err);
done();
+12 -3
View File
@@ -27,9 +27,18 @@ declare module 'vinyl' {
*/
path?: string;
/**
* Type: Buffer|Stream|null (Default: null)
* Path history. Has no effect if options.path is passed.
*/
contents?: any;
history?: string[];
/**
* The result of an fs.stat call. See fs.Stats for more information.
*/
stat?: fs.Stats;
/**
* File contents.
* Type: Buffer, Stream, or null
*/
contents?: Buffer | NodeJS.ReadWriteStream;
});
/**
@@ -48,7 +57,7 @@ declare module 'vinyl' {
/**
* Type: Buffer|Stream|null (Default: null)
*/
public contents: any;
public contents: Buffer | NodeJS.ReadableStream;
/**
* Returns path.relative for the file base and file path.
* Example: