From c9e62555dfc9317344fa8ac39dfabb0f74f14d4b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Aug 2015 13:58:04 -0700 Subject: [PATCH 01/75] Add 'dataType' to 'jquery.fileupload'. --- jquery.fileupload/jquery.fileupload.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.fileupload/jquery.fileupload.d.ts b/jquery.fileupload/jquery.fileupload.d.ts index 3774cb6e1..9daea94ee 100644 --- a/jquery.fileupload/jquery.fileupload.d.ts +++ b/jquery.fileupload/jquery.fileupload.d.ts @@ -8,6 +8,11 @@ // Interface options for the plugin interface JQueryFileInputOptions { + /** + * 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; From 0bd13d9dae8daf5c1502973b83541b0ee214f267 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Aug 2015 14:04:53 -0700 Subject: [PATCH 02/75] Use JSDoc for 'jquery.fileupload'. --- jquery.fileupload/jquery.fileupload.d.ts | 213 ++++++++++++++--------- 1 file changed, 132 insertions(+), 81 deletions(-) diff --git a/jquery.fileupload/jquery.fileupload.d.ts b/jquery.fileupload/jquery.fileupload.d.ts index 9daea94ee..8c9e93737 100644 --- a/jquery.fileupload/jquery.fileupload.d.ts +++ b/jquery.fileupload/jquery.fileupload.d.ts @@ -13,137 +13,188 @@ interface JQueryFileInputOptions { */ dataType?: string; - // The drop target element(s), by the default the complete document. - // Set to null to disable drag & drop support: + /** + * 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. From 290fa269a8fe64d32db63800d4311f28187f275b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Aug 2015 14:09:23 -0700 Subject: [PATCH 03/75] Add 'animationSpeed' to 'jquery.notifyBar'. --- jquery.notifyBar/jquery.notifyBar.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jquery.notifyBar/jquery.notifyBar.d.ts b/jquery.notifyBar/jquery.notifyBar.d.ts index 22e012673..bbfb59bc3 100644 --- a/jquery.notifyBar/jquery.notifyBar.d.ts +++ b/jquery.notifyBar/jquery.notifyBar.d.ts @@ -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. */ From 4b4fd6dd16af81f9c292d42df5694a68c1e934ba Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Aug 2015 14:16:51 -0700 Subject: [PATCH 04/75] Test all properties of options in 'jquery.pjax'. --- jquery.pjax/jquery.pjax-tests.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 0df488130..257a265dd 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -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: "https://jquery.com/", + fragment: "#pjax-response", }; } From 6bf2f869e141121959b23e7168ea9ec93b0f2082 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Aug 2015 14:26:47 -0700 Subject: [PATCH 05/75] Added missing properties in 'jquery.pjax'. --- jquery.pjax/jquery.pjax-tests.ts | 2 +- jquery.pjax/jquery.pjax.d.ts | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 257a265dd..6af27618e 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -54,7 +54,7 @@ function test_defauluts() { dataType: 'html', container: "#pjax-container", url: "https://jquery.com/", - target: "https://jquery.com/", + target: undefined, fragment: "#pjax-response", }; } diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 1bd465b1e..bc7d39209 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -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 { From 55ebb8625a06e127197fa963e708be610f7fc9b2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 15:17:55 -0700 Subject: [PATCH 06/75] Fix overload order for 'jquery.colorpicker'. --- jquery.colorpicker/jquery.colorpicker.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.colorpicker/jquery.colorpicker.d.ts b/jquery.colorpicker/jquery.colorpicker.d.ts index 5c89e4ed0..32f68c1c1 100644 --- a/jquery.colorpicker/jquery.colorpicker.d.ts +++ b/jquery.colorpicker/jquery.colorpicker.d.ts @@ -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; } From 71738c9b95ed67fa194e146f0bab04246d23cdaa Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 15:18:52 -0700 Subject: [PATCH 07/75] Fix overload order for 'jquery.timepicker'. --- jquery.timepicker/jquery.timepicker.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.timepicker/jquery.timepicker.d.ts b/jquery.timepicker/jquery.timepicker.d.ts index 13a6d2e69..59d677706 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts +++ b/jquery.timepicker/jquery.timepicker.d.ts @@ -63,12 +63,12 @@ interface TimePickerOptions { 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; } From 23d1273719d3edf1233c52adc92c10307073fe25 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 15:28:38 -0700 Subject: [PATCH 08/75] Use JSDoc comments. --- jquery.timepicker/jquery.timepicker.d.ts | 72 ++++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/jquery.timepicker/jquery.timepicker.d.ts b/jquery.timepicker/jquery.timepicker.d.ts index 59d677706..bc8678d72 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts +++ b/jquery.timepicker/jquery.timepicker.d.ts @@ -7,57 +7,57 @@ /// 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; + + /** 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; + /** Shows the 'now' button */ showNowButton?: boolean; + /** Shows the deselect time button */ showDeselectButton?: boolean; } From fc0f0afd0abbb61b4f26ffa81b49a6615a1feca2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 15:57:06 -0700 Subject: [PATCH 09/75] Added missing properties for 'jquery.timepicker'. --- jquery.timepicker/jquery.timepicker.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/jquery.timepicker/jquery.timepicker.d.ts b/jquery.timepicker/jquery.timepicker.d.ts index bc8678d72..398813b9e 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts +++ b/jquery.timepicker/jquery.timepicker.d.ts @@ -22,6 +22,17 @@ interface TimePickerOptions { /** * '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; @@ -56,8 +67,19 @@ interface TimePickerOptions { // buttons /** 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; } From 9916c6f043cfd9e3274c0649f395d27c879abef3 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 16:00:11 -0700 Subject: [PATCH 10/75] Fix overload order for 'jquery-sortable'. --- jquery-sortable/jquery-sortable.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jquery-sortable/jquery-sortable.d.ts b/jquery-sortable/jquery-sortable.d.ts index 82f4e8aa0..b416dfb8e 100644 --- a/jquery-sortable/jquery-sortable.d.ts +++ b/jquery-sortable/jquery-sortable.d.ts @@ -91,14 +91,12 @@ declare module JQuerySortable { } } - 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; } From 5ed654f9b8154a9c0df7cbeae24c8c669997ad7e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 16:40:44 -0700 Subject: [PATCH 11/75] Added 'group' to options for 'jquery-sortable'. Should follow up with https://github.com/johnny/jquery-sortable/issues/187 --- jquery-sortable/jquery-sortable.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jquery-sortable/jquery-sortable.d.ts b/jquery-sortable/jquery-sortable.d.ts index b416dfb8e..ce47a5900 100644 --- a/jquery-sortable/jquery-sortable.d.ts +++ b/jquery-sortable/jquery-sortable.d.ts @@ -88,6 +88,7 @@ declare module JQuerySortable { } interface Options extends GroupOptions, ContainerOptions { + group?: string; } } From e5a57c9bbb981db484fb3d4531fe04e994bd34dd Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 16:51:57 -0700 Subject: [PATCH 12/75] sockerUrl -> socketUrl in 'jquery-jsonrpcclient'. --- jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts index de008dc09..c771f9a77 100644 --- a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts +++ b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts @@ -8,7 +8,7 @@ interface JsonRpcClientOptions extends JQueryAjaxSettings { ajaxUrl?: string; headers?: {[key:string]: any}; - sockerUrl?: string; + socketUrl?: string; onmessage?: () => void; onopen?: () => void; onclose?: () => void; From 74528bc33450950053a831afd604187cbe0c69c2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 16:55:37 -0700 Subject: [PATCH 13/75] Used correct types from websocket callbacks in 'jquery-jsonrpcclient'. --- jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts index c771f9a77..94981217b 100644 --- a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts +++ b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts @@ -9,10 +9,10 @@ interface JsonRpcClientOptions extends JQueryAjaxSettings { ajaxUrl?: string; headers?: {[key:string]: any}; socketUrl?: string; - onmessage?: () => void; - onopen?: () => void; - onclose?: () => void; - onerror?: () => void; + onmessage?: (ev: MessageEvent) => void; + onopen?: (ev: Event) => void; + onclose?: (ev: CloseEvent) => void; + onerror?: (ev: Event) => void; getSockect?: (onmessageCb: () => void) => WebSocket; } From 4c2711f4cf264b6191d28aff0d715a005cf8713b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 17:20:02 -0700 Subject: [PATCH 14/75] Make 'ajaxUrl' non-optional in 'jquery-jsonrpcclient'. --- jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts index 94981217b..fd620ba7f 100644 --- a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts +++ b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts @@ -6,7 +6,7 @@ /// interface JsonRpcClientOptions extends JQueryAjaxSettings { - ajaxUrl?: string; + ajaxUrl: string; headers?: {[key:string]: any}; socketUrl?: string; onmessage?: (ev: MessageEvent) => void; @@ -14,6 +14,12 @@ interface JsonRpcClientOptions extends JQueryAjaxSettings { 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 { From b1578458f4e8a134c4bab56305124a9169f42521 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 17:27:30 -0700 Subject: [PATCH 15/75] Correct option type in 'jqrangeslider'. --- jqrangeslider/jqrangeslider.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jqrangeslider/jqrangeslider.d.ts b/jqrangeslider/jqrangeslider.d.ts index b41df43c0..58934e776 100644 --- a/jqrangeslider/jqrangeslider.d.ts +++ b/jqrangeslider/jqrangeslider.d.ts @@ -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; } From c6fed019e861566e9b306528272fcbfa64249890 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 17:32:00 -0700 Subject: [PATCH 16/75] Correct test for 'ReferenceOptions' object in 'joi'. --- joi/joi-tests.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index 26048a9dc..fbdb12779 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -78,9 +78,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}; // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- From dd12455c4a3171db5dab22780d522dc2f138c6c4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 7 Aug 2015 14:57:38 -0700 Subject: [PATCH 17/75] backgound -> background in 'highcharts'. --- highcharts/highstock.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highcharts/highstock.d.ts b/highcharts/highstock.d.ts index 162d15655..5f59e3694 100644 --- a/highcharts/highstock.d.ts +++ b/highcharts/highstock.d.ts @@ -14,7 +14,7 @@ interface HighstockNavigatorOptions { baseSeries?: string | number; enabled?: boolean; handles?: { - backgoundColor?: string; + backgroundColor?: string; borderColor?: string; }; height?: number; From 6c2a9bd4a28f7fe0c03d38ed9af5cc64b88eb431 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 7 Aug 2015 15:03:16 -0700 Subject: [PATCH 18/75] Use correct object in test for 'highcharts'. --- highcharts/highcharts-tests.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/highcharts/highcharts-tests.ts b/highcharts/highcharts-tests.ts index 9918df953..f163f2a30 100644 --- a/highcharts/highcharts-tests.ts +++ b/highcharts/highcharts-tests.ts @@ -112,9 +112,7 @@ var chart2 = new Highcharts.Chart({ }); chart1.exportChart(null, { - chart: { - backgroundColor: '#FFFFFF' - } + backgroundColor: '#FFFFFF' }); From 3e2ea701cdb0208fc2fd423f5875a72c9777e406 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 7 Aug 2015 17:09:26 -0700 Subject: [PATCH 19/75] Fix test for 'hammerjs'. --- hammerjs/hammerjs-1.1.3-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hammerjs/hammerjs-1.1.3-tests.ts b/hammerjs/hammerjs-1.1.3-tests.ts index 42c5ccea3..5515175af 100644 --- a/hammerjs/hammerjs-1.1.3-tests.ts +++ b/hammerjs/hammerjs-1.1.3-tests.ts @@ -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) { }); \ No newline at end of file From 5d6c3bdb5d936b257f22961890141a999e19daef Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 7 Aug 2015 17:35:54 -0700 Subject: [PATCH 20/75] includeContext -> includeContent and fix overload signature ordering in 'gulp-sourcemaps'. --- gulp-sourcemaps/gulp-sourcemaps.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulp-sourcemaps/gulp-sourcemaps.d.ts b/gulp-sourcemaps/gulp-sourcemaps.d.ts index 220085367..56cb957e1 100644 --- a/gulp-sourcemaps/gulp-sourcemaps.d.ts +++ b/gulp-sourcemaps/gulp-sourcemaps.d.ts @@ -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; } \ No newline at end of file From 0bd8371116a8cf3b9c38ffeee9d6a5ff150973f2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 7 Aug 2015 17:50:26 -0700 Subject: [PATCH 21/75] 'viewDisplay' is not documented in 'fullcalendar'. --- fullCalendar/fullCalendar-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fullCalendar/fullCalendar-tests.ts b/fullCalendar/fullCalendar-tests.ts index e7c01a27e..6890cbe42 100644 --- a/fullCalendar/fullCalendar-tests.ts +++ b/fullCalendar/fullCalendar-tests.ts @@ -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); } }); From a7e09ad3d735a45e41e9b0f557ce779d8d99b3fa Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 16:49:00 -0700 Subject: [PATCH 22/75] Add 'dataMap' to 'amplifyjs'. --- amplifyjs/amplifyjs.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/amplifyjs/amplifyjs.d.ts b/amplifyjs/amplifyjs.d.ts index 30e827294..961d815c6 100644 --- a/amplifyjs/amplifyjs.d.ts +++ b/amplifyjs/amplifyjs.d.ts @@ -29,6 +29,7 @@ interface amplifyDecoders { interface amplifyAjaxSettings extends JQueryAjaxSettings { cache?: any; + dataMap?: {} | ((data: any) => {}); decoder?: any /* string or amplifyDecoder */; } From e8c0ad7b0b1f70f401b4dc0064713206aa83f0a8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 16:51:53 -0700 Subject: [PATCH 23/75] IMetadata shouldn't extend Object in 'stripe'. --- stripe/stripe-node.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stripe/stripe-node.d.ts b/stripe/stripe-node.d.ts index cb5932086..d41fdc13e 100644 --- a/stripe/stripe-node.d.ts +++ b/stripe/stripe-node.d.ts @@ -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 { /** From 9601565ddf89ef6895d4cb414e622f3ddb196665 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 16:56:39 -0700 Subject: [PATCH 24/75] instance -> instanceName in tests for 'tedious'. --- tedious/tedious-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tedious/tedious-tests.ts b/tedious/tedious-tests.ts index 32c243614..f7346a174 100644 --- a/tedious/tedious-tests.ts +++ b/tedious/tedious-tests.ts @@ -11,7 +11,7 @@ var config: tedious.ConnectionConfig = { server: "127.0.0.1", options: { database: "somedb", - instance: "someinstance" + instanceName: "someinstance", } } From dbfb98a84c40956e7326764c04b850cd61d318c5 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 17:07:22 -0700 Subject: [PATCH 25/75] Added missing properties to constructor options bag in 'vinyl'. --- vinyl/vinyl.d.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/vinyl/vinyl.d.ts b/vinyl/vinyl.d.ts index 81aa781f9..4dd8016a5 100644 --- a/vinyl/vinyl.d.ts +++ b/vinyl/vinyl.d.ts @@ -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: From d12fbb3b8159e326ece4fae84d40aae4f979fb58 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 17:20:42 -0700 Subject: [PATCH 26/75] Added 'scales' to 'Mark' in 'vega'. --- vega/vega.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/vega/vega.d.ts b/vega/vega.d.ts index ebe89da02..3a959fe1c 100644 --- a/vega/vega.d.ts +++ b/vega/vega.d.ts @@ -369,6 +369,7 @@ declare module Vega { properties?: PropertySets; key?: string; delay?: ValueRef; + scales?: Scale[]; } export module Mark { From b0c077fdd39f2b901677a5d58155f516f66f88d1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 18:15:51 -0700 Subject: [PATCH 27/75] 'Selector' shouldn't extend 'Object' in 'meteor'. --- meteor/meteor.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor/meteor.d.ts b/meteor/meteor.d.ts index ed0c97b29..2028cc266 100644 --- a/meteor/meteor.d.ts +++ b/meteor/meteor.d.ts @@ -134,7 +134,7 @@ declare module Meteor { } declare module Mongo { - interface Selector extends Object {} + interface Selector {} interface Modifier {} interface SortSpecifier {} interface FieldSpecifier { From 78ee8f994726b3f63a6c986efa5e0b0d7b4a9044 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 18:30:32 -0700 Subject: [PATCH 28/75] Added 'views' to 'backbone.layoutmanager'. --- backbone.layoutmanager/backbone.layoutmanager.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backbone.layoutmanager/backbone.layoutmanager.d.ts b/backbone.layoutmanager/backbone.layoutmanager.d.ts index 6c830d0ba..5ce548157 100644 --- a/backbone.layoutmanager/backbone.layoutmanager.d.ts +++ b/backbone.layoutmanager/backbone.layoutmanager.d.ts @@ -11,6 +11,7 @@ declare module Backbone { interface LayoutOptions extends ViewOptions { template?: string; + views?: { [viewName: string]: View }; } interface LayoutManagerOptions { From 985e4ccf0421a8a01dfe42631bba218ae546a3a0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 10 Aug 2015 18:39:10 -0700 Subject: [PATCH 29/75] Actually use the options object in 'backgrid'. --- backgrid/backgrid.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backgrid/backgrid.d.ts b/backgrid/backgrid.d.ts index 3a75e6142..d0ddc3e51 100644 --- a/backgrid/backgrid.d.ts +++ b/backgrid/backgrid.d.ts @@ -10,10 +10,10 @@ declare module Backgrid { interface GridOptions { columns: Column[]; collection: Backbone.Collection; - header: Header; - body: Body; - row: Row; - footer: Footer; + header?: Header; + body?: Body; + row?: Row; + footer?: Footer; } class Header extends Backbone.View { @@ -109,6 +109,8 @@ declare module Backgrid { header: any; tagName: string; + constructor(options: GridOptions); + initialize(options: any); getSelectedModels(): Backbone.Model[]; insertColumn(...options: any[]): Grid; From 14590ab303399ad1f07f3981183d72970ba78379 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 12:32:46 -0700 Subject: [PATCH 30/75] 'overlay' is not a documented member of the dialog options in jQuery UI, so remove it in tests for 'chrome'. --- chrome/chrome-tests.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/chrome/chrome-tests.ts b/chrome/chrome-tests.ts index cbbe93791..f4e208d89 100644 --- a/chrome/chrome-tests.ts +++ b/chrome/chrome-tests.ts @@ -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)); From d35c03133170ce5126f5f9322a1599430233b2e3 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 12:40:44 -0700 Subject: [PATCH 31/75] Use union types where appropriately hinted in 'ckeditor'. --- ckeditor/ckeditor.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ckeditor/ckeditor.d.ts b/ckeditor/ckeditor.d.ts index 315f9bdf1..3bb90c760 100644 --- a/ckeditor/ckeditor.d.ts +++ b/ckeditor/ckeditor.d.ts @@ -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; From 8f8e362fc000a93615f3074a65b1e1797acb9854 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 12:43:20 -0700 Subject: [PATCH 32/75] 'icons' is not a documented member for plugin definition objects in 'ckeditor'. --- ckeditor/ckeditor-tests.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ckeditor/ckeditor-tests.ts b/ckeditor/ckeditor-tests.ts index aa052b8ee..f7deb6706 100644 --- a/ckeditor/ckeditor-tests.ts +++ b/ckeditor/ckeditor-tests.ts @@ -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 } From a52c3885f8d6fa47a67aa2c1680ca0a1e2c40a4b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 14:22:43 -0700 Subject: [PATCH 33/75] Use 'lib.CipherParamsData' for create*cryptor in 'cryptojs'. --- cryptojs/cryptojs.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cryptojs/cryptojs.d.ts b/cryptojs/cryptojs.d.ts index d9c77dbe9..a764ebada 100644 --- a/cryptojs/cryptojs.d.ts +++ b/cryptojs/cryptojs.d.ts @@ -127,12 +127,12 @@ declare module CryptoJS{ //BlockCipher has interface same as IStreamCipher interface BlockCipher extends IStreamCipher{} - 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 } From e9a00d26d8cdea4de0e219a5e680c06ed1c123ac Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 14:52:35 -0700 Subject: [PATCH 34/75] Add missing 'weight' property to labelAnchorLinks type in 'd3'. --- d3/d3-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index d087c7876..105e8f29c 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -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++) { From 97f3794db2b2f624fa1001d7620b75cadb1fd9b1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 15:09:44 -0700 Subject: [PATCH 35/75] Add 'paramNames' to 'Object' in 'donna'. --- donna/donna.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/donna/donna.d.ts b/donna/donna.d.ts index fed09fa98..c953764d1 100644 --- a/donna/donna.d.ts +++ b/donna/donna.d.ts @@ -25,6 +25,7 @@ declare module DonnaTypes { type: string; name: string; bindingType: string; + paramNames?: string[]; classProperties?: any[]; prototypeProperties?: number[][]; doc?: string; From fc46cd7ac026e9c96d70f63b091ee72d43bf4aa0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 15:11:53 -0700 Subject: [PATCH 36/75] Add 'classes' property to options bag in 'drop'. --- drop/drop.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/drop/drop.d.ts b/drop/drop.d.ts index 85cfd0766..a48cb8fb3 100644 --- a/drop/drop.d.ts +++ b/drop/drop.d.ts @@ -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; From c892b43ca46c0e12f656e468301ff1f73a8c2c10 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 15:44:37 -0700 Subject: [PATCH 37/75] Add index signature to 'CoreObjectArguments' in 'ember'. --- ember/ember.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ember/ember.d.ts b/ember/ember.d.ts index 00ea077dd..6a28a80fe 100644 --- a/ember/ember.d.ts +++ b/ember/ember.d.ts @@ -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(args ?: CoreObjectArguments): T; + static extend(args?: CoreObjectArguments): T; /** Creates a new subclass. @method extend From b1d60d580d51b030d7300cc4fc87414523ccaff9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 16:16:20 -0700 Subject: [PATCH 38/75] Add missing properties to 'IDOMElementOptions' in 'famous'. --- famous/famous.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/famous/famous.d.ts b/famous/famous.d.ts index 8b05774d8..a02ac86f0 100644 --- a/famous/famous.d.ts +++ b/famous/famous.d.ts @@ -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; } } From 722357fe998fbaca34dad4c0030a3ccd6438bd07 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 16:37:53 -0700 Subject: [PATCH 39/75] Account for callbacks in 'fancybox'. --- fancybox/fancybox-tests.ts | 2 +- fancybox/fancybox.d.ts | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fancybox/fancybox-tests.ts b/fancybox/fancybox-tests.ts index dce30bf43..d84a06815 100644 --- a/fancybox/fancybox-tests.ts +++ b/fancybox/fancybox-tests.ts @@ -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 : ''); } }); diff --git a/fancybox/fancybox.d.ts b/fancybox/fancybox.d.ts index 03a20bebf..7182f7cad 100644 --- a/fancybox/fancybox.d.ts +++ b/fancybox/fancybox.d.ts @@ -6,7 +6,7 @@ /// -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 { From a7fb3bdf5cec0992215e6fa54f874934ba2f9f84 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:00:59 -0700 Subject: [PATCH 40/75] Add 'inputClass' to 'jquery.uniform'. --- jquery.uniform/jquery.uniform.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jquery.uniform/jquery.uniform.d.ts b/jquery.uniform/jquery.uniform.d.ts index 4b3ff0d0d..ac622e42c 100644 --- a/jquery.uniform/jquery.uniform.d.ts +++ b/jquery.uniform/jquery.uniform.d.ts @@ -22,6 +22,7 @@ interface UniformOptions { hoverClass?: string; idPrefix?: string; inputAddTypeAsClass?: boolean; + inputClass?: string; radioClass?: string; resetDefaultHtml?: string; resetSelector?: any; From 996944493fedb2b8d7ec7b7ec506a19964845c6c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:02:18 -0700 Subject: [PATCH 41/75] Add index signature to options parameter of 'uniform'. --- jquery.uniform/jquery.uniform.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.uniform/jquery.uniform.d.ts b/jquery.uniform/jquery.uniform.d.ts index ac622e42c..e91a41c93 100644 --- a/jquery.uniform/jquery.uniform.d.ts +++ b/jquery.uniform/jquery.uniform.d.ts @@ -35,7 +35,7 @@ interface UniformOptions { wrapperClass?: string; } interface Uniform { - (options?: UniformOptions): JQuery; + (options?: UniformOptions & {[option: string]: any;}): JQuery; update(elemOrSelector?: any): void; restore(elemOrSelector?: any): void; elements: JQuery[]; From 26e110353dd64d6198dd482daa849753e0f3fc6a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:10:26 -0700 Subject: [PATCH 42/75] Make options interfaces extend events interfaces in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 10a4e7159..24f64ef34 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -398,7 +398,7 @@ declare module JQueryUI { (event: Event, ui: DraggableEventUIParams): void; } - interface DraggableOptions { + interface DraggableOptions extends DraggableEvents { disabled?: boolean; addClasses?: boolean; appendTo?: any; @@ -453,7 +453,7 @@ declare module JQueryUI { (event: Event, ui: DroppableEventUIParam): void; } - interface DroppableOptions { + interface DroppableOptions extends DroppableEvents { disabled?: boolean; accept?: any; activeClass?: string; @@ -472,7 +472,7 @@ declare module JQueryUI { drop?: DroppableEvent; } - interface Droppable extends Widget, DroppableOptions, DroppableEvents { + interface Droppable extends Widget, DroppableOptions { } // Menu ////////////////////////////////////////////////// @@ -577,7 +577,7 @@ declare module JQueryUI { // Selectable ////////////////////////////////////////////////// - interface SelectableOptions { + interface SelectableOptions extends SelectableEvents { autoRefresh?: boolean; cancel?: string; delay?: number; @@ -596,7 +596,7 @@ declare module JQueryUI { unselecting? (event: Event, ui: { unselecting: Element; }): void; } - interface Selectable extends Widget, SelectableOptions, SelectableEvents { + interface Selectable extends Widget, SelectableOptions { } // Slider ////////////////////////////////////////////////// From 612ad67a79b2bdc330255d1a1739ac50e9acc805 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:14:02 -0700 Subject: [PATCH 43/75] Add 'helper' for 'Sortable' in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 24f64ef34..9d8d17097 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -652,6 +652,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; From 98f5ec12f00101da94209f93d4dbc5801c16748e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:22:40 -0700 Subject: [PATCH 44/75] Added 'sortable' overload for 'serialize' method in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 9d8d17097..f0c8ac09f 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -1660,6 +1660,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(optionLiteral: string, options: JQueryUI.SortableOptions): any; sortable(optionLiteral: string, optionName: string, optionValue: any): JQuery; From 9d15a87ca0a067db2d10d6cae8cf4ec9407aa1cb Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:24:45 -0700 Subject: [PATCH 45/75] Make options for resizable extend events in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index f0c8ac09f..c4b9fc17c 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -529,7 +529,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,7 +571,7 @@ declare module JQueryUI { stop?: ResizableEvent; } - interface Resizable extends Widget, ResizableOptions, ResizableEvents { + interface Resizable extends Widget, ResizableOptions { } From 8d1b81107ccc40ad8dad9e5ce76ca67542fc5256 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 11 Aug 2015 17:26:06 -0700 Subject: [PATCH 46/75] Make autocomplete options extend events in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index c4b9fc17c..6315b3547 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -43,7 +43,7 @@ declare module JQueryUI { // Autocomplete ////////////////////////////////////////////////// - interface AutocompleteOptions { + interface AutocompleteOptions extends AutocompleteEvents { appendTo?: any; //Selector; autoFocus?: boolean; delay?: number; @@ -72,7 +72,7 @@ declare module JQueryUI { select?: AutocompleteEvent; } - interface Autocomplete extends Widget, AutocompleteOptions, AutocompleteEvents { + interface Autocomplete extends Widget, AutocompleteOptions { escapeRegex: (value: string) => string; } From 2ffed1fde1f93a62480e2191e2f320e61b7cd63a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 12:21:13 -0700 Subject: [PATCH 47/75] Made dialog options extend events type, test should have had button callbacks within 'buttons' in 'jqueryui'. --- jqueryui/jqueryui-tests.ts | 13 +++++++------ jqueryui/jqueryui.d.ts | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index ef02b40d6..d7c85d228 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1425,12 +1425,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({ diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 6315b3547..e13754feb 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -336,9 +336,9 @@ 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; @@ -382,7 +382,7 @@ declare module JQueryUI { resizeStop?: DialogEvent; } - interface Dialog extends Widget, DialogOptions, DialogEvents { + interface Dialog extends Widget, DialogOptions { } From bb830c2a2dc34b2d3a6a11b0d3ffaa821290bf75 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 12:32:49 -0700 Subject: [PATCH 48/75] Fix 'show' and 'hide' properties in dialog, fix union type, in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index e13754feb..3724ce673 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -344,7 +344,8 @@ declare module JQueryUI { 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 +353,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 +362,13 @@ declare module JQueryUI { close?: DialogEvent; } + interface DialogShowHideOptions { + effect: string; + delay?: number; + duration?: number; + easing?: string; + } + interface DialogUIParams { } @@ -799,7 +807,7 @@ declare module JQueryUI { interface EffectOptions { effect: string; easing?: string; - duration: any; + duration?: number; complete: Function; } From 5e48f1bdb2c038e036d4fdbca745588b7580363b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 15:28:34 -0700 Subject: [PATCH 49/75] Made options extend events, added 'change' and 'create' in for spinner events, in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 3724ce673..839ce84da 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -609,7 +609,7 @@ declare module JQueryUI { // Slider ////////////////////////////////////////////////// - interface SliderOptions { + interface SliderOptions extends SliderEvents { animate?: any; // boolean, string or number disabled?: boolean; max?: number; @@ -639,7 +639,7 @@ declare module JQueryUI { stop?: SliderEvent; } - interface Slider extends Widget, SliderOptions, SliderEvents { + interface Slider extends Widget, SliderOptions { } @@ -708,7 +708,7 @@ declare module JQueryUI { // Spinner ////////////////////////////////////////////////// - interface SpinnerOptions { + interface SpinnerOptions extends SpinnerEvents { culture?: string; disabled?: boolean; icons?: any; @@ -728,12 +728,14 @@ declare module JQueryUI { } interface SpinnerEvents { + change?: SpinnerEvent; + create?: SpinnerEvent; spin?: SpinnerEvent; start?: SpinnerEvent; stop?: SpinnerEvent; } - interface Spinner extends Widget, SpinnerOptions, SpinnerEvents { + interface Spinner extends Widget, SpinnerOptions { } From cb265e50c5d79195fc46b45cd8dc708b5f88ad9a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 15:29:54 -0700 Subject: [PATCH 50/75] extend options with events in 'jqueryui'. --- jqueryui/jqueryui.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 839ce84da..80cda8976 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -741,7 +741,7 @@ declare module JQueryUI { // Tabs ////////////////////////////////////////////////// - interface TabsOptions { + interface TabsOptions extends TabsEvents { active?: any; // boolean or number collapsible?: boolean; disabled?: any; // boolean or [] @@ -771,7 +771,7 @@ declare module JQueryUI { load?: TabsEvent; } - interface Tabs extends Widget, TabsOptions, TabsEvents { + interface Tabs extends Widget, TabsOptions { } From a9d5865d7936fd514823fcda9e4a859472e43d07 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 15:39:37 -0700 Subject: [PATCH 51/75] 'offset' isn't a property for 'position' in 'jqueryui'. --- jqueryui/jqueryui-tests.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index d7c85d228..39f28d7b5 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1765,7 +1765,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" }); From 29e90320fb852db78cdaea6a3c7b6bccacb3d0ca Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 15:52:00 -0700 Subject: [PATCH 52/75] 'start' should be a function in tests for 'jqueryui'. --- jqueryui/jqueryui-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 39f28d7b5..9c154e4b1 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1582,7 +1582,7 @@ function test_spinner() { min: 5, max: 2500, step: 25, - start: 1000, + start: function () { return; }, numberFormat: "C" }); $("#spinner").spinner({ From a19db768d1dcb8c8dbd2308f609cc0b68404af67 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 15:52:46 -0700 Subject: [PATCH 53/75] Things should be functions in tests for 'jqueryui'. --- jqueryui/jqueryui-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 9c154e4b1..98b45ca28 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1596,8 +1596,8 @@ function test_spinner() { }); $("#lat, #lng").spinner({ step: .001, - change: 123, - stop: 321 + change() { }, + stop() { }, }); $("#spinner").spinner({ spin: function (event, ui) { From fe366f8f9193cbd7ef42494f440576b140717df0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 15:57:42 -0700 Subject: [PATCH 54/75] Fixed width (with) in 'js-beautify'. --- js-beautify/js-beautify.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js-beautify/js-beautify.d.ts b/js-beautify/js-beautify.d.ts index e52614ad8..fc581ea90 100644 --- a/js-beautify/js-beautify.d.ts +++ b/js-beautify/js-beautify.d.ts @@ -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; From d9a282f5288049fe3148dc8d0cfbb6a947a67b96 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 16:59:09 -0700 Subject: [PATCH 55/75] Fix excess object literal errors in 'leaflet'. --- leaflet/leaflet-tests.ts | 3 +-- leaflet/leaflet.d.ts | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/leaflet/leaflet-tests.ts b/leaflet/leaflet-tests.ts index 4c8fd4d73..6bec7e217 100755 --- a/leaflet/leaflet-tests.ts +++ b/leaflet/leaflet-tests.ts @@ -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, diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 92aed79b7..56d702485 100755 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -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; } } From 6c9553af733cbcc56b42b92d07bd60c84762b16a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 17:10:07 -0700 Subject: [PATCH 56/75] Extend 'PathOptions' in 'leaflet-label'. --- leaflet-label/leaflet-label.d.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/leaflet-label/leaflet-label.d.ts b/leaflet-label/leaflet-label.d.ts index 38bb43d7a..a77def73c 100644 --- a/leaflet-label/leaflet-label.d.ts +++ b/leaflet-label/leaflet-label.d.ts @@ -6,9 +6,13 @@ /// declare module L { - export interface IconOptions { - labelAnchor?: Point; - } + export interface IconOptions { + labelAnchor?: Point; + } + + export interface PathOptions { + labelAnchor?: Point; + } export interface CircleMarkerOptions { labelAnchor?: Point; From 75b38004961afa3fd24a1f25b8c2b57ca963e9d1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 18:30:54 -0700 Subject: [PATCH 57/75] Account for core data types in 'log4js'. --- log4js/log4js.d.ts | 108 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 5 deletions(-) diff --git a/log4js/log4js.d.ts b/log4js/log4js.d.ts index 28d821377..70059142c 100644 --- a/log4js/log4js.d.ts +++ b/log4js/log4js.d.ts @@ -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,112 @@ 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 + + type AppenderConfig = CoreAppenderConfig | (AppenderConfigBase & { [prop: string]: any; }); } From a1f7cb56596239b3797996cad846fc57ad418edc Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 19:00:15 -0700 Subject: [PATCH 58/75] Added 'secondLevelDomains' to 'mailcheck'. --- mailcheck/mailcheck.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/mailcheck/mailcheck.d.ts b/mailcheck/mailcheck.d.ts index c6f28d0db..64b5f93c4 100644 --- a/mailcheck/mailcheck.d.ts +++ b/mailcheck/mailcheck.d.ts @@ -47,6 +47,7 @@ declare module MailcheckModule { export interface IOptions { domains?: string[]; + secondLevelDomains?: string[]; topLevelDomains?: string[]; distanceFunction?: IDistanceFunction; suggested?: ISuggested | IJQuerySuggested; From 7192d685cbb16c76a1426b62ea912960a2b316c5 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 19:02:06 -0700 Subject: [PATCH 59/75] Not-so-smart lsts in 'marked'. --- marked/marked-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marked/marked-tests.ts b/marked/marked-tests.ts index ca8b96920..44be0f0e8 100644 --- a/marked/marked-tests.ts +++ b/marked/marked-tests.ts @@ -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 ''; From f8d51d29b3a6f416a5fee44330844e3a153e9a23 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 19:05:02 -0700 Subject: [PATCH 60/75] Reorder overloads in 'mCustomScrollbar'. --- mCustomScrollbar/mCustomScrollbar.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mCustomScrollbar/mCustomScrollbar.d.ts b/mCustomScrollbar/mCustomScrollbar.d.ts index 7e0a529ef..871ed2d5f 100644 --- a/mCustomScrollbar/mCustomScrollbar.d.ts +++ b/mCustomScrollbar/mCustomScrollbar.d.ts @@ -129,12 +129,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 +143,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; } \ No newline at end of file From 24d6b7762744ea69047a69ba1372775739adf6a5 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 12 Aug 2015 18:30:54 -0700 Subject: [PATCH 61/75] Account for core data types in 'log4js'. --- log4js/log4js.d.ts | 110 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/log4js/log4js.d.ts b/log4js/log4js.d.ts index 28d821377..9ad5d266e 100644 --- a/log4js/log4js.d.ts +++ b/log4js/log4js.d.ts @@ -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,114 @@ 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 + + type AppenderConfig = CoreAppenderConfig | (AppenderConfigBase & { [prop: string]: any; }); } From 585ce49c019f202dec2380c1f7b6f71577df9993 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Aug 2015 00:06:01 -0700 Subject: [PATCH 62/75] Don't use union types in 'log4js'. --- log4js/log4js.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/log4js/log4js.d.ts b/log4js/log4js.d.ts index 9ad5d266e..3a1e9e3e7 100644 --- a/log4js/log4js.d.ts +++ b/log4js/log4js.d.ts @@ -234,6 +234,10 @@ declare module "log4js" { | LogglyAppenderConfig | ClusteredAppenderConfig - type AppenderConfig = CoreAppenderConfig | (AppenderConfigBase & { [prop: string]: any; }); + interface UserDefinedAppenderConfig extends AppenderConfigBase { + [prop: string]: any; + } + + type AppenderConfig = CoreAppenderConfig | UserDefinedAppenderConfig; } From cefee3eadc419f8a994e3c42ed6b80078b5c73b4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Aug 2015 11:11:18 -0700 Subject: [PATCH 63/75] Can't use intersection types or else 1.5 tests will fail in 'jquery.uniform'. --- jquery.uniform/jquery.uniform.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jquery.uniform/jquery.uniform.d.ts b/jquery.uniform/jquery.uniform.d.ts index e91a41c93..402f3d7c4 100644 --- a/jquery.uniform/jquery.uniform.d.ts +++ b/jquery.uniform/jquery.uniform.d.ts @@ -34,8 +34,13 @@ interface UniformOptions { useID?: boolean; wrapperClass?: string; } + +interface UniformOptionsWithExtraParameters extends UniformOptions { + [optionName: string]: any; +} + interface Uniform { - (options?: UniformOptions & {[option: string]: any;}): JQuery; + (options?: UniformOptions): JQuery; update(elemOrSelector?: any): void; restore(elemOrSelector?: any): void; elements: JQuery[]; From a508d7d50c089416516933c8781041c693fc578f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Aug 2015 11:18:47 -0700 Subject: [PATCH 64/75] Add 'enable' and fix types of properties in 'mCustomScrollbar'. --- mCustomScrollbar/mCustomScrollbar.d.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/mCustomScrollbar/mCustomScrollbar.d.ts b/mCustomScrollbar/mCustomScrollbar.d.ts index 871ed2d5f..f41aca00a 100644 --- a/mCustomScrollbar/mCustomScrollbar.d.ts +++ b/mCustomScrollbar/mCustomScrollbar.d.ts @@ -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; From e4484309b049b5c7778ede56c35fba9b2a4b36fd Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Aug 2015 12:05:30 -0700 Subject: [PATCH 65/75] Add 'mongos' property to interface in 'mongoose'. --- mongoose/mongoose.d.ts | 63 +++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index ce4be964f..e840d8e05 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -6,10 +6,10 @@ /// 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(name: string, schema?: Schema, collection?: string, skipInit?: boolean): Model; @@ -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(name: string, schema?: Schema, collection?: string, skipInit?: boolean): Model; @@ -49,23 +49,66 @@ declare module "mongoose" { collection(name: string, options?: Object): Collection; model(name: string, schema?: Schema, collection?: string): Model; 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 { From f2f72772620e10138bbb380fc1edb73001db0bf7 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Aug 2015 12:25:57 -0700 Subject: [PATCH 66/75] 'compressed' in 'needle' --- needle/needle-tests.ts | 2 +- needle/needle.d.ts | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/needle/needle-tests.ts b/needle/needle-tests.ts index 24d9701b5..106d46a71 100644 --- a/needle/needle-tests.ts +++ b/needle/needle-tests.ts @@ -22,7 +22,7 @@ function ResponsePipeline() { var options = { compressed: true, - follow: true, + follow: 5, rejectUnauthorized: true }; diff --git a/needle/needle.d.ts b/needle/needle.d.ts index 741cf5fe3..e7a67387d 100644 --- a/needle/needle.d.ts +++ b/needle/needle.d.ts @@ -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 { From 4549840d3380b5183f7a934ea0e62914b151d08b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Aug 2015 15:02:38 -0700 Subject: [PATCH 67/75] Added data map in 'node-gcm'. --- node-gcm/node-gcm.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node-gcm/node-gcm.d.ts b/node-gcm/node-gcm.d.ts index 3272acac4..cac54f31a 100644 --- a/node-gcm/node-gcm.d.ts +++ b/node-gcm/node-gcm.d.ts @@ -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; } From 4410e5ba936478efb74705c4bf5de230c1f41c2d Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 17 Aug 2015 12:25:31 -0700 Subject: [PATCH 68/75] Missing comma. --- angular-ui-bootstrap/angular-ui-bootstrap-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index a5dc969ed..80d06c254 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -121,8 +121,8 @@ testApp.config(( placement: 'bottom', animation: false, popupDelay: 1000, - appendToBody: true - useContentExp: true + appendToBody: true, + useContentExp: true, }); $tooltipProvider.setTriggers({ 'customOpenTrigger': 'customCloseTrigger' From ceb059b2abcef0ea59486185f4cee366df07aaf8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 17 Aug 2015 14:06:50 -0700 Subject: [PATCH 69/75] Removed union types from definition files. --- jquery.uniform/jquery.uniform.d.ts | 11 ++++++++--- jqueryui/jqueryui.d.ts | 2 +- log4js/log4js.d.ts | 6 +++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/jquery.uniform/jquery.uniform.d.ts b/jquery.uniform/jquery.uniform.d.ts index e91a41c93..d5eee3e47 100644 --- a/jquery.uniform/jquery.uniform.d.ts +++ b/jquery.uniform/jquery.uniform.d.ts @@ -5,7 +5,7 @@ /// -interface UniformOptions { +interface UniformCoreOptions { activeClass?: string; autoHide?: boolean; buttonClass?: string; @@ -34,12 +34,17 @@ interface UniformOptions { useID?: boolean; wrapperClass?: string; } + +interface UniformOptions extends UniformCoreOptions { + [option: string]: any; +} + interface Uniform { - (options?: UniformOptions & {[option: string]: any;}): JQuery; + (options?: UniformOptions): JQuery; update(elemOrSelector?: any): void; restore(elemOrSelector?: any): void; elements: JQuery[]; - defaults: UniformOptions; + defaults: UniformOptions; } interface JQueryStatic { uniform: Uniform; diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 80cda8976..e658d0d10 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -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; diff --git a/log4js/log4js.d.ts b/log4js/log4js.d.ts index 70059142c..5ecec0db1 100644 --- a/log4js/log4js.d.ts +++ b/log4js/log4js.d.ts @@ -232,6 +232,10 @@ declare module "log4js" { | GelfAppenderConfig | MultiprocessAppenderConfig - type AppenderConfig = CoreAppenderConfig | (AppenderConfigBase & { [prop: string]: any; }); + interface CustomAppenderConfig extends AppenderConfigBase { + [prop: string]: any; + } + + type AppenderConfig = CoreAppenderConfig | CustomAppenderConfig; } From a3f73092d3cb3062544526201577aef1104ae1bb Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 17 Aug 2015 14:43:51 -0700 Subject: [PATCH 70/75] fixed errors in tests. --- jqueryui/jqueryui.d.ts | 5 ++++- vinyl/vinyl-tests.ts | 34 ++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index e658d0d10..a58a60c11 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -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 { diff --git a/vinyl/vinyl-tests.ts b/vinyl/vinyl-tests.ts index eb203bdae..cb1ceaea6 100644 --- a/vinyl/vinyl-tests.ts +++ b/vinyl/vinyl-tests.ts @@ -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({stat: val}); file.stat.should.equal(val); done(); }); @@ -150,8 +150,8 @@ describe('File', () => { }); describe('isDirectory()', () => { - var fakeStat = { - isDirectory: () => { + var fakeStat = { + 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') : + (fileContents).toString(); + let file2Utf8Contents = file2Contents instanceof Buffer ? + file2Contents.toString('utf8') : + (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(); From 379748b491fe77072cf7519ee86bd27a8993fe4b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 17 Aug 2015 14:48:00 -0700 Subject: [PATCH 71/75] Remove test for undocumented '_renderItem' function in 'jqueryui'. --- jqueryui/jqueryui-tests.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 98b45ca28..84d137331 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -769,13 +769,7 @@ function test_autocomplete() { $("#project-icon").attr("src", "images/" + ui.item.icon); return false; } - }) - .data("autocomplete")._renderItem = (ul, item) => { - return $("
  • ") - .data("item.autocomplete", item) - .append("" + item.label + "
    " + item.desc + "
    ") - .appendTo(ul); - }; + }); $("#developer").autocomplete({ source: (request, response) => { From b51f8765a35d5b3e2fd1029f35c8b1cdda7c305e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 17 Aug 2015 15:04:54 -0700 Subject: [PATCH 72/75] Made tests pass for 'jqueryui'. --- jquery/jquery.d.ts | 4 ++ jqueryui/jqueryui-tests.ts | 4 +- jqueryui/jqueryui.d.ts | 90 ++++++++++++++++++++++---------------- 3 files changed, 59 insertions(+), 39 deletions(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index dc5c4ebb6..3599c808f 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -185,6 +185,10 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise { * 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; } /** diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 84d137331..34f1f4b7e 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1642,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({ diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index a58a60c11..63ea4f444 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -723,19 +723,20 @@ declare module JQueryUI { step?: any; // number or string } - interface SpinnerUIParams { + interface SpinnerUIParam { + value: number; } - interface SpinnerEvent { - (event: Event, ui: SpinnerUIParams): void; + interface SpinnerEvent { + (event: Event, ui: T): void; } interface SpinnerEvents { - change?: SpinnerEvent; - create?: SpinnerEvent; - spin?: SpinnerEvent; - start?: SpinnerEvent; - stop?: SpinnerEvent; + change?: SpinnerEvent<{}>; + create?: SpinnerEvent<{}>; + spin?: SpinnerEvent; + start?: SpinnerEvent<{}>; + stop?: SpinnerEvent<{}>; } interface Spinner extends Widget, SpinnerOptions { @@ -756,21 +757,33 @@ declare module JQueryUI { 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 { + (event: Event, ui: UI): void; } interface TabsEvents { - activate?: TabsEvent; - beforeActivate?: TabsEvent; - beforeLoad?: TabsEvent; + activate?: TabsEvent; + beforeActivate?: TabsEvent; + beforeLoad?: TabsEvent; load?: TabsEvent; } @@ -1583,29 +1596,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; From 85674ef1dda1853af8429539afcfc0f2c360f1e2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 17 Aug 2015 15:53:19 -0700 Subject: [PATCH 73/75] Added missing type argument. --- jqueryui/jqueryui.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 63ea4f444..5cd04f22d 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -753,8 +753,6 @@ declare module JQueryUI { heightStyle?: string; hide?: any; // boolean, number, string or object show?: any; // boolean, number, string or object - - activate?: TabsEvent; } interface TabsActivationUIParams { @@ -784,7 +782,8 @@ declare module JQueryUI { activate?: TabsEvent; beforeActivate?: TabsEvent; beforeLoad?: TabsEvent; - load?: TabsEvent; + load?: TabsEvent; + create?: TabsEvent; } interface Tabs extends Widget, TabsOptions { From d7d619837d6b1829d35a797789ab93d77210fa31 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 19 Aug 2015 13:51:00 -0700 Subject: [PATCH 74/75] Fixed tests. --- vega/vega-tests.ts | 2 +- vinyl-fs/vinyl-fs-tests.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vega/vega-tests.ts b/vega/vega-tests.ts index 2cbf9d7b9..bdb4973b3 100644 --- a/vega/vega-tests.ts +++ b/vega/vega-tests.ts @@ -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"} } diff --git a/vinyl-fs/vinyl-fs-tests.ts b/vinyl-fs/vinyl-fs-tests.ts index 9fbc45faf..a29746166 100644 --- a/vinyl-fs/vinyl-fs-tests.ts +++ b/vinyl-fs/vinyl-fs-tests.ts @@ -379,7 +379,7 @@ describe('dest stream', function () { cwd: __dirname, path: inputPath, contents: expectedContents, - stat: { + stat: { mode: expectedMode } }); @@ -420,7 +420,7 @@ describe('dest stream', function () { cwd: __dirname, path: inputPath, contents: contentStream, - stat: { + stat: { mode: expectedMode } }); @@ -463,7 +463,7 @@ describe('dest stream', function () { cwd: __dirname, path: inputPath, contents: null, - stat: { + stat: { isDirectory: function () { return true; }, @@ -713,7 +713,7 @@ describe('symlink stream', function () { cwd: __dirname, path: inputPath, contents: expectedContents, - stat: { + stat: { mode: expectedMode } }); @@ -754,7 +754,7 @@ describe('symlink stream', function () { cwd: __dirname, path: inputPath, contents: contentStream, - stat: { + stat: { mode: expectedMode } }); @@ -797,7 +797,7 @@ describe('symlink stream', function () { cwd: __dirname, path: inputPath, contents: null, - stat: { + stat: { isDirectory: function () { return true; }, @@ -874,7 +874,7 @@ describe('symlink stream', function () { cwd: __dirname, path: inputPath, contents: expectedContents, - stat: { + stat: { mode: expectedMode } }); From 457db3907347338bb9d72ec30e3a36d311fd8355 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 19 Aug 2015 14:38:28 -0700 Subject: [PATCH 75/75] Indentation. --- vinyl/vinyl.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vinyl/vinyl.d.ts b/vinyl/vinyl.d.ts index 4dd8016a5..b41a8151b 100644 --- a/vinyl/vinyl.d.ts +++ b/vinyl/vinyl.d.ts @@ -57,7 +57,7 @@ declare module 'vinyl' { /** * Type: Buffer|Stream|null (Default: null) */ - public contents: Buffer | NodeJS.ReadableStream; + public contents: Buffer | NodeJS.ReadableStream; /** * Returns path.relative for the file base and file path. * Example: