diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1cded38d5..4fe6f526e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,4 +1,4 @@ -# Contributors +# Contributors This is a non-exhaustive list of definitions and their creators. If you created a definition but are not listed then feel free to send a pull request on this file with your name and url. @@ -118,6 +118,7 @@ All definitions files include a header with the author and editors, so at some p * [Google Page Speed Online API](https://developers.google.com/speed/pagespeed/) (by [Frank M](https://github.com/sgtfrankieboy)) * [Google Translate API](https://developers.google.com/translate/) (by [Frank M](https://github.com/sgtfrankieboy)) * [Google Url Shortener](https://developers.google.com/url-shortener/) (by [Frank M](https://github.com/sgtfrankieboy)) +* [gulp](http://gulpjs.com/) (by [Drew Noakes](https://drewnoakes.com)) * [Hammer.js](http://eightmedia.github.com/hammer.js/) (by [Boris Yankov](https://github.com/borisyankov)) * [Hapi](http://github.com/spumko/hapi) (by [Hakubo](http://github.com/hakubo)) * [Handlebars](http://handlebarsjs.com/) (by [Boris Yankov](https://github.com/borisyankov)) @@ -161,6 +162,7 @@ All definitions files include a header with the author and editors, so at some p * [jQuery.Colorbox](http://www.jacklmoore.com/colorbox/) (by [Gidon Junge](https://github.com/gjunge)) * [jQuery.contextMenu](http://medialize.github.com/jQuery-contextMenu/) (by [Natan Vivo](https://github.com/nvivo/)) * [jQuery.Cookie](https://github.com/carhartl/jquery-cookie) (by [Roy Goode](https://github.com/RoyGoode)) +* [jQuery.customSelect](https://github.com/adamcoulombe/jquery.customSelect) (by [tomato360](https://github.com/tomato360)) * [jQuery.Cycle](http://jquery.malsup.com/cycle/) (by [François Guillot](http://fguillot.developpez.com/)) * [jQuery.Cycle2](http://jquery.malsup.com/cycle2/) (by [Donny Nadolny](https://github.com/dnadolny)) * [jQuery.dataTables](http://www.datatables.net) (by [Armin Sander](https://github.com/pragmatrix)) @@ -175,6 +177,7 @@ All definitions files include a header with the author and editors, so at some p * [jQuery.jNotify](http://jnotify.codeplex.com) (by [James Curran](https://github.com/jamescurran/)) * [jQuery.joyride](http://zurb.com/playground/jquery-joyride-feature-tour-plugin) (by [Vincent Bortone](https://github.com/vbortone)) * [jQuery.jSignature](https://github.com/willowsystems/jSignature) (by [Patrick Magee](https://github.com/pjmagee)) +* [jQuery.leanModal](http://leanmodal.finelysliced.com.au/)(by [tomato360](https://github.com/tomato360)) * [jQuery.notifyBar](http://www.whoop.ee/posts/2013-04-05-the-resurrection-of-jquery-notify-bar/) (by [Shunsuke Ohtani](https://github.com/zaneli)) * [jQuery.noty](http://needim.github.io/noty/) (by [Aaron King](https://github.com/kingdango/)) * [jQuery.payment](http://needim.github.io/noty/) (by [Eric J. Smith](https://github.com/ejsmith/)) @@ -214,6 +217,7 @@ All definitions files include a header with the author and editors, so at some p * [JWPlayer](http://developer.longtailvideo.com/trac/) (by [Martin Duparc](https://github.com/martinduparc/)) * [KeyboardJS](https://github.com/RobertWHurst/KeyboardJS) (by [Vincent Bortone](https://github.com/vbortone/)) * [keymaster.js](https://github.com/madrobby/keymaster) (by [Marting W. Kirst](https://github.com/nitram509/)) +* [Keypress](https://github.com/dmauro/Keypress/) (by [Roger Chen](https://github.com/rcchen/)) * [KineticJS](http://kineticjs.com/) (by [Basarat Ali Syed](https://github.com/basarat)) * [Knockback](http://kmalakoff.github.com/knockback/) (by [Marcel Binot](https://github.com/docgit)) * [Knockout.js](http://knockoutjs.com/) (by [Boris Yankov](https://github.com/borisyankov)) @@ -244,14 +248,16 @@ All definitions files include a header with the author and editors, so at some p * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) * [MathJax](https://github.com/mathjax/MathJax) (by [Roland Zwaga](https://github.com/rolandzwaga)) * [mCustomScrollbar](https://github.com/malihu/malihu-custom-scrollbar-plugin) (by [Sarah Williams](https://github.com/flurg)) -* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) +* [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) * [md5.js](http://labs.cybozu.co.jp/blog/mitsunari/2007/07/md5js_1.html) (by [MIZUNE Pine](https://github.com/pine613)) * [Microsoft Ajax](http://msdn.microsoft.com/en-us/library/ee341002(v=vs.100).aspx) (by [Patrick Magee](https://github.com/pjmagee)) * [Microsoft Live Connect](http://msdn.microsoft.com/en-us/library/live/hh243643.aspx) (by [John Vilk](https://github.com/jvilk)) * [Minimatch](https://github.com/isaacs/minimatch) (by [vvakame](https://github.com/vvakame)) * [minimist](https://github.com/substack/minimist) (by [Bart van der Schoor](https://github.com/Bartvds)) +* [Mithril](http://lhorie.github.io/mithril) (by [Leo Horie](https://github.com/lhorie) and [Chris Bowdon](https://github.com/cbowdon)) * [Mixpanel](https://github.com/mixpanel/mixpanel-js) (by [Knut Eirik Leira Hjelle](https://github.com/hjellek)) * [mixto](https://github.com/atom/mixto) (by [vvakame](https://github.com/vvakame)) +* [mocha-phantomjs](https://github.com/metaskills/mocha-phantomjs) (by [ErikSchierboom](https://github.com/ErikSchierboom)) * [Modernizr](http://modernizr.com/) (by [Boris Yankov](https://github.com/borisyankov) and [Theodore Brown](https://github.com/theodorejb/)) * [Moment.js](https://github.com/timrwood/moment) (by [Michael Lakerveld](https://github.com/Lakerfield)) * [MongoDB](http://mongodb.github.io/node-mongodb-native/) (from TypeScript samples, updated by [Niklas Mollenhauer](https://github.com/nikeee)) @@ -275,11 +281,13 @@ All definitions files include a header with the author and editors, so at some p * [node-sqlserver](https://github.com/WindowsAzure/node-sqlserver) (by [Boris Yankov](https://github.com/borisyankov)) * [node-uuid](https://github.com/broofa/node-uuid) (by [Jeff May](https://github.com/jeffmay)) * [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker)) +* [npm](https://github.com/npm/npm) (by [Maxime LUCE](https://github.com/SomaticIT)) * [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel)) * [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/)) * [object-path](https://github.com/mariocasciaro/object-path) (by [Paulo Cesar](https://github.com/pocesar/)) * [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/)) * [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/)) +* [opn](https://github.com/sindresorhus/opn) (by [Shinnosuke Watanabe](https://github.com/shinnn)) * [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz)) * [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) * [passport-facebook](https://github.com/jaredhanson/passport-facebook) (by [James Roland Cabresos](https://github.com/staticfunction/)) @@ -288,6 +296,7 @@ All definitions files include a header with the author and editors, so at some p * [Parallel.js](https://github.com/adambom/parallel.js) (by [Josh Baldwin](https://github.com/jbaldwin)) * [Parsimmon](https://github.com/jayferd/parsimmon) (by [Bart van der Schoor](https://github.com/Bartvds)) * [PDF.js](https://github.com/mozilla/pdf.js) (by [Josh Baldwin](https://github.com/jbaldwin)) +* [PeerJS](http://peerjs.com/) (by [Toshiya Nakakura](https://github.com/nakakura)) * [PEG.js](http://pegjs.majda.cz/) (by [vvakame](https://github.com/vvakame)) * [Persona](http://www.mozilla.org/en-US/persona) (by [James Frasca](https://github.com/Nycto)) * [PhantomJS](http://phantomjs.org) (by [Jed Hunsaker](https://github.com/jedhunsaker)) @@ -323,6 +332,7 @@ All definitions files include a header with the author and editors, so at some p * [Sencha Touch](http://www.sencha.com/products/touch/) (by [Brian Kotek](https://github.com/brian428)) * [SharePoint](http://sptypescript.codeplex.com) (by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru) and [Andrey Markeev](http://markeev.com)) * [ShellJS](http://shelljs.org) (by [Niklas Mollenhauer](https://github.com/nikeee)) +* [Showdown](https://github.com/coreyti/showdown) (by [Chris Bowdon](https://github.com/cbowdon)) * [SignalR](http://www.asp.net/signalr) (by [Boris Yankov](https://github.com/borisyankov)) * [simple-cw-node](https://github.com/astronaughts/simple-cw-node) (by [vvakame](https://github.com/vvakame)) * [Sinon](http://sinonjs.org/) (by [William Sears](https://github.com/mrbigdog2u)) @@ -389,3 +399,4 @@ All definitions files include a header with the author and editors, so at some p * [Zepto.js](http://zeptojs.com/) (by [Josh Baldwin](https://github.com/jbaldwin)) * [Zynga Scroller](https://github.com/zynga/scroller) (by [Boris Yankov](https://github.com/borisyankov)) * [ZeroClipboard](https://github.com/jonrohan/ZeroClipboard) (by [Eric J. Smith](https://github.com/ejsmith)) +* [Parse SDK](https://parse.com/docs/js_guide) (by [Ullisen Media Group, LLC](http://ullisenmedia.com)) diff --git a/ace/ace.d.ts.tscparams b/ace/ace.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/ace.d.ts.tscparams +++ b/ace/ace.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/all-tests.ts.tscparams b/ace/all-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/all-tests.ts.tscparams +++ b/ace/all-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-anchor-tests.ts.tscparams b/ace/tests/ace-anchor-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-anchor-tests.ts.tscparams +++ b/ace/tests/ace-anchor-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-background_tokenizer-tests.ts.tscparams b/ace/tests/ace-background_tokenizer-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-background_tokenizer-tests.ts.tscparams +++ b/ace/tests/ace-background_tokenizer-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-default-tests.ts.tscparams b/ace/tests/ace-default-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-default-tests.ts.tscparams +++ b/ace/tests/ace-default-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-document-tests.ts.tscparams b/ace/tests/ace-document-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-document-tests.ts.tscparams +++ b/ace/tests/ace-document-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-edit_session-tests.ts.tscparams b/ace/tests/ace-edit_session-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-edit_session-tests.ts.tscparams +++ b/ace/tests/ace-edit_session-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor1-tests.ts.tscparams b/ace/tests/ace-editor1-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor1-tests.ts.tscparams +++ b/ace/tests/ace-editor1-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams b/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams +++ b/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor_navigation-tests.ts.tscparams b/ace/tests/ace-editor_navigation-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor_navigation-tests.ts.tscparams +++ b/ace/tests/ace-editor_navigation-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-editor_text_edit-tests.ts.tscparams b/ace/tests/ace-editor_text_edit-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-editor_text_edit-tests.ts.tscparams +++ b/ace/tests/ace-editor_text_edit-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-multi_select-tests.ts.tscparams b/ace/tests/ace-multi_select-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-multi_select-tests.ts.tscparams +++ b/ace/tests/ace-multi_select-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-placeholder-tests.ts.tscparams b/ace/tests/ace-placeholder-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-placeholder-tests.ts.tscparams +++ b/ace/tests/ace-placeholder-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-range-tests.ts.tscparams b/ace/tests/ace-range-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-range-tests.ts.tscparams +++ b/ace/tests/ace-range-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-range_list-tests.ts.tscparams b/ace/tests/ace-range_list-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-range_list-tests.ts.tscparams +++ b/ace/tests/ace-range_list-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-search-tests.ts.tscparams b/ace/tests/ace-search-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-search-tests.ts.tscparams +++ b/ace/tests/ace-search-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-selection-tests.ts.tscparams b/ace/tests/ace-selection-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-selection-tests.ts.tscparams +++ b/ace/tests/ace-selection-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-token_iterator-tests.ts.tscparams b/ace/tests/ace-token_iterator-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-token_iterator-tests.ts.tscparams +++ b/ace/tests/ace-token_iterator-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/ace/tests/ace-virtual_renderer-tests.ts.tscparams b/ace/tests/ace-virtual_renderer-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/ace/tests/ace-virtual_renderer-tests.ts.tscparams +++ b/ace/tests/ace-virtual_renderer-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/amcharts/AmCharts.d.ts.tscparams b/amcharts/AmCharts.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/amcharts/AmCharts.d.ts.tscparams +++ b/amcharts/AmCharts.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/amplifyjs/amplifyjs-tests.ts.tscparams b/amplifyjs/amplifyjs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/amplifyjs/amplifyjs-tests.ts.tscparams +++ b/amplifyjs/amplifyjs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/amplifyjs/amplifyjs.d.ts.tscparams b/amplifyjs/amplifyjs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/amplifyjs/amplifyjs.d.ts.tscparams +++ b/amplifyjs/amplifyjs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/angular-ui/angular-ui-router.d.ts b/angular-ui/angular-ui-router.d.ts index 005bf8b90..eb9296dbd 100644 --- a/angular-ui/angular-ui-router.d.ts +++ b/angular-ui/angular-ui-router.d.ts @@ -23,6 +23,7 @@ declare module ng.ui { onEnter?: any; onExit?: any; data?: any; + reloadOnSearch?: boolean; } interface IStateProvider extends IServiceProvider { diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts index 4be1f536c..ad1eef90c 100644 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -618,6 +618,10 @@ module locationTests { $location.search('foo', 'yipee'); // => $location + // set foo to 5 + $location.search('foo', 5); + // => $location + /* * From: https://docs.angularjs.org/guide/$location */ diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 084bea034..e4f04fbf5 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -150,12 +150,12 @@ declare module ng { /** * Creates a deep copy of source, which should be an object or an array. - * + * * - If no destination is supplied, a copy of the object or array is created. * - If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it. * - If source is not an object or array (inc. null and undefined), source is returned. * - If source is identical to 'destination' an exception will be thrown. - * + * * @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined. * @param destination Destination into which the source is copied. If provided, must be of the same type as source. */ @@ -163,7 +163,7 @@ declare module ng { /** * Wraps a raw DOM element or HTML string as a jQuery element. - * + * * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite." */ element: IAugmentedJQueryStatic; @@ -290,14 +290,14 @@ declare module ng { controller(object: Object): IModule; /** * Register a new directive with the compiler. - * + * * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) * @param directiveFactory An injectable directive factory function. */ directive(name: string, directiveFactory: IDirectiveFactory): IModule; /** * Register a new directive with the compiler. - * + * * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) * @param directiveFactory An injectable directive factory function. */ @@ -445,6 +445,7 @@ declare module ng { $untouched: boolean; $validators: IModelValidators; + $asyncValidators: IAsyncModelValidators; $pristine: boolean; $dirty: boolean; @@ -456,6 +457,10 @@ declare module ng { [index: string]: (...args: any[]) => boolean; } + interface IAsyncModelValidators { + [index: string]: (...args: any[]) => ng.IPromise; + } + interface IModelParser { (value: any): any; } @@ -482,22 +487,20 @@ declare module ng { $digest(): void; $emit(name: string, ...args: any[]): IAngularEvent; - // Documentation says exp is optional, but actual implementaton counts on it - $eval(expression: string, args?: Object): any; - $eval(expression: (scope: IScope) => any, args?: Object): any; + $eval(expression?: string, args?: Object): any; + $eval(expression?: (scope: IScope) => any, args?: Object): any; - // Documentation says exp is optional, but actual implementaton counts on it - $evalAsync(expression: string): void; - $evalAsync(expression: (scope: IScope) => any): void; + $evalAsync(expression?: string): void; + $evalAsync(expression?: (scope: IScope) => any): void; // Defaults to false by the implementation checking strategy $new(isolate?: boolean): IScope; /** * Listens on events of a given type. See $emit for discussion of event life cycle. - * - * The event listener function format is: function(event, args...). - * + * + * The event listener function format is: function(event, args...). + * * @param name Event name to listen on. * @param listener Function to call when the event is emitted. */ @@ -721,7 +724,7 @@ declare module ng { /** * Change path when called with parameter and return $location. * Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing. - * + * * @param path New path */ path(path: string): ILocationService; @@ -731,30 +734,38 @@ declare module ng { replace(): ILocationService; /** - * Return search part (as object) of current url + * Return search part (as object) of current url */ search(): any; /** * Change search part when called with parameter and return $location. - * + * * @param search When called with a single argument the method acts as a setter, setting the search component of $location to the specified value. - * + * * If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url. */ search(search: any): ILocationService; /** * Change search part when called with parameter and return $location. - * + * * @param search New search params - * @param paramValue If search is a string, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. + * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. */ search(search: string, paramValue: string): ILocationService; /** * Change search part when called with parameter and return $location. - * + * + * @param search New search params + * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. + */ + search(search: string, paramValue: number): ILocationService; + + /** + * Change search part when called with parameter and return $location. + * * @param search New search params * @param paramValue If paramValue is an array, it will override the property of the search component of $location specified via the first argument. */ @@ -762,7 +773,7 @@ declare module ng { /** * Change search part when called with parameter and return $location. - * + * * @param search New search params * @param paramValue If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign. */ @@ -892,7 +903,7 @@ declare module ng { /** * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information. - * + * * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible. */ finally(finallyCallback: () => any): IPromise; diff --git a/angularjs/legacy/angular-1.0-tests.ts.tscparams b/angularjs/legacy/angular-1.0-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/angularjs/legacy/angular-1.0-tests.ts.tscparams +++ b/angularjs/legacy/angular-1.0-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams b/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams +++ b/angularjs/legacy/angular-scenario-1.0.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/asciify/asciify.ts.tscparams b/asciify/asciify.ts.tscparams index 64dbb84a5..d68b297cb 100644 --- a/asciify/asciify.ts.tscparams +++ b/asciify/asciify.ts.tscparams @@ -1 +1 @@ -"--noImplicitAny --module commonjs" \ No newline at end of file +--noImplicitAny --module commonjs diff --git a/async/async-tests.ts.tscparams b/async/async-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/async/async-tests.ts.tscparams +++ b/async/async-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/atom/atom-tests.ts.tscparams b/atom/atom-tests.ts.tscparams index 5f84b9777..6331805a5 100644 --- a/atom/atom-tests.ts.tscparams +++ b/atom/atom-tests.ts.tscparams @@ -1 +1 @@ ---noImplicitAny --module commonjs --target es5 +--noImplicitAny --module commonjs --target es5 diff --git a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams +++ b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/backbone-relational/backbone-relational-tests.ts.tscparams b/backbone-relational/backbone-relational-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/backbone-relational/backbone-relational-tests.ts.tscparams +++ b/backbone-relational/backbone-relational-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/backbone-relational/backbone-relational.d.ts.tscparams b/backbone-relational/backbone-relational.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/backbone-relational/backbone-relational.d.ts.tscparams +++ b/backbone-relational/backbone-relational.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/backgrid/backgrid-tests.ts.tscparams b/backgrid/backgrid-tests.ts.tscparams index e85b4ac55..d45eb7650 100644 --- a/backgrid/backgrid-tests.ts.tscparams +++ b/backgrid/backgrid-tests.ts.tscparams @@ -1 +1 @@ ---target ES5 \ No newline at end of file +--target ES5 diff --git a/backgrid/backgrid.d.ts.tscparams b/backgrid/backgrid.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/backgrid/backgrid.d.ts.tscparams +++ b/backgrid/backgrid.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/bluebird/bluebird-tests.ts b/bluebird/bluebird-tests.ts index abead4237..6eb154e83 100644 --- a/bluebird/bluebird-tests.ts +++ b/bluebird/bluebird-tests.ts @@ -477,10 +477,10 @@ barProm = fooProm.race(); //TODO fix collection inference -barProm = fooProm.map((item: Foo, index: number, arrayLength: number) => { +barArrProm = fooProm.map((item: Foo, index: number, arrayLength: number) => { return bar; }); -barProm = fooProm.map((item: Foo) => { +barArrProm = fooProm.map((item: Foo) => { return bar; }); @@ -495,10 +495,10 @@ barProm = fooProm.reduce((memo: Bar, item: Foo) => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fooProm = fooProm.filter((item: Foo, index: number, arrayLength: number) => { +fooArrProm = fooArrProm.filter((item: Foo, index: number, arrayLength: number) => { return bool; }); -fooProm = fooProm.filter((item: Foo) => { +fooArrProm = fooArrProm.filter((item: Foo) => { return bool; }); diff --git a/bluebird/bluebird.d.ts b/bluebird/bluebird.d.ts index 8912ebb88..210032f86 100644 --- a/bluebird/bluebird.d.ts +++ b/bluebird/bluebird.d.ts @@ -296,8 +296,8 @@ declare class Promise implements Promise.Thenable { * Same as calling `Promise.map(thisPromise, mapper)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ // TODO type inference from array-resolving promise? - map(mapper: (item: Q, index: number, arrayLength: number) => Promise.Thenable): Promise; - map(mapper: (item: Q, index: number, arrayLength: number) => U): Promise; + map(mapper: (item: Q, index: number, arrayLength: number) => Promise.Thenable): Promise; + map(mapper: (item: Q, index: number, arrayLength: number) => U): Promise; /** * Same as calling `Promise.reduce(thisPromise, Function reducer, initialValue)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. @@ -310,8 +310,8 @@ declare class Promise implements Promise.Thenable { * Same as calling ``Promise.filter(thisPromise, filterer)``. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ // TODO type inference from array-resolving promise? - filter(filterer: (item: U, index: number, arrayLength: number) => Promise.Thenable): Promise; - filter(filterer: (item: U, index: number, arrayLength: number) => boolean): Promise; + filter(filterer: (item: U, index: number, arrayLength: number) => Promise.Thenable): Promise; + filter(filterer: (item: U, index: number, arrayLength: number) => boolean): Promise; /** * Start the chain of promises with `Promise.try`. Any synchronous exceptions will be turned into rejections on the returned promise. diff --git a/bootbox/bootbox-tests.ts b/bootbox/bootbox-tests.ts index 66922ab2e..7cf6124cd 100644 --- a/bootbox/bootbox-tests.ts +++ b/bootbox/bootbox-tests.ts @@ -2,73 +2,76 @@ /// bootbox.alert("Are we ok?"); -bootbox.alert("Are we ok with Test button?", "Test"); -bootbox.alert("Are we ok with callback?", function() { +bootbox.alert("Are we ok with callback?", function () { console.log("Callback called!"); }); -bootbox.alert("Are we ok with callback and custom button?", "Test", function() { - console.log("Callback called!"); +bootbox.alert({ + message: "Are we ok with callback and custom button?", + callback: function () { + console.log("Callback called!"); + } }); -bootbox.confirm("Click ok to pass test", function(result) { - console.log(result); -}); +bootbox.confirm("Click ok to pass test"); -bootbox.confirm("Click cancel to pass test", function(result) { +bootbox.confirm("Click cancel to pass test", function (result) { console.log(!result); }); - -bootbox.confirm("Click confirm to pass test", "Cancel?", "Confirm?", function(result) { - console.log(result); -}); - -bootbox.confirm("Click cancel to pass test", "Cancel?", "Confirm?", function(result) { - console.log(!result); +bootbox.confirm({ + message: "Click confirm to pass test", + callback: function (result) { + console.log(result); + } }); bootbox.prompt("Are we ok?"); - -bootbox.prompt("Enter 'ok' to pass test", function(result) { +bootbox.prompt("Enter 'ok' to pass test", function (result) { console.log(result); }); - -bootbox.prompt("Enter 'ok' to pass test", "Cancel?", "Confirm?", function(result) { - console.log(result); +bootbox.prompt({ + message: "Enter 'ok' to pass test", callback: function (result) { + console.log(result); + } }); -bootbox.prompt("Keep default value and click ok", "Cancel?", "Confirm?", function(result) { - console.log(result); -}, "Test Value"); - bootbox.dialog("Test Dialog"); -var handler = { - label: "OK", - class: "MyClass", + + +bootbox.dialog("Test Dialog", function (result) { + return result; +}); + +bootbox.dialog({ + message: "Test Dialog", + callback: function (result) { } +}); + +var bdo: BootboxDialogOptions; +var sampleButton: BootboxButton = { + label: 'ButtonLabelToUse', callback: function () { - console.log("Test Dialog"); + return 'callback of button click' + }, + className: 'additionalButtonClassName' +}; + +bdo = { + message: '', + className: 'callName', + buttons: { + 'ButtonTextLabel': sampleButton } }; -var option = { - header: "header", - headerCloseButton: true -}; +bootbox.dialog(bdo); -bootbox.dialog("Test Dialog", handler); -bootbox.dialog("Test Dialog", [handler], option); +bootbox.setDefaults({ + locale: 'en_US', + animate: false, + backdrop: false, + className: 'newClassName', + closeButton: true, + show: true +}) -bootbox.hideAll(); -bootbox.animate(false); -bootbox.backdrop("backdrop"); -bootbox.classes("myClass"); - -var icons: BootboxIcons = { - OK: "OK Icon", - CANCEL: "Cancel Icon", - CONFIRM: "Confirm Icon" -}; -bootbox.setIcons(icons); - -bootbox.setLocale("en"); - -bootbox.addLocale("klingon", { OK: "luq", CANCEL: "qIl", CONFIRM: "Confirm" }); \ No newline at end of file +bootbox.hideAll(); \ No newline at end of file diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index 17732b603..6177e1396 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -1,48 +1,63 @@ -// Type definitions for Bootbox 3.0.0 +// Type definitions for Bootbox 4.0.0 // Project: https://github.com/makeusabrew/bootbox -// Definitions by: Vincent Bortone +// Definitions by: Vincent Bortone , Kon Pik // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface BootboxLocale { - OK: string; - CANCEL: string; - CONFIRM: string; + +interface BootboxAlertOptions { + message: string; + callback?: () => any; } -interface BootboxIcons { - OK: any; - CANCEL: any; - CONFIRM: any; +interface BootboxConfirmOptions { + message: string; + callback?: (result: boolean) => any; } -interface BootboxHandler { - label: string; - class: string; - callback: (result?: any) => void; +interface BootboxPromptOptions { + message: string; + callback?: (result: string) => any; } -interface BootboxOption { - header: string; - headerCloseButton: boolean; +interface BootboxButton { + label?: string; + className?: string; + callback?: () => any; +} + +interface BootboxDialogOptions { + message: any; // String | Element + title?: any; // String | Element + callback?: (result: boolean) => any; + show?: boolean; + onEscape?: () => any; + backdrop?: boolean; + closeButton?: boolean; + animate?: boolean; + className?: string; + buttons?: Object; // complex object where each key is of type BootboxButton +} + +interface BootboxDefaultOptions { + locale?: string; + show?: boolean; + backdrop?: boolean; + closeButton?: boolean; + animate?: boolean; + className?: string; } interface BootboxStatic { - alert(message: string, callback: () => void): void; - alert(message: string, customButtonText?: string, callback?: () => void): void; - confirm(message: string, callback: (result: boolean) => void): void; - confirm(message: string, cancelButtonText?: string, confirmButtonText?: string, callback?: (result: boolean) => void): void; - prompt(message: string, callback: (result: string) => void, defaultValue?: string): void; - prompt(message: string, cancelButtonText?: string, confirmButtonText?: string, callback?: (result: string) => void, defaultValue?: string): void; - dialog(message: string, handlers: BootboxHandler[], options?: any): void; - dialog(message: string, handler: BootboxHandler): void; - dialog(message: string): void; + alert(message: string, callback?: () => void): void; + alert(options: BootboxAlertOptions): void; + confirm(message: string, callback?: (result: boolean) => void): void; + confirm(options: BootboxConfirmOptions): void; + prompt(message: string, callback?: (result: string) => void): void; + prompt(options: BootboxPromptOptions): void; + dialog(message: string, callback?: (result: string) => void): void; + dialog(options: BootboxDialogOptions): void; + setDefaults(options: BootboxDefaultOptions): void; hideAll(): void; - animate(shouldAnimate: boolean): void; - backdrop(backdropValue: string): void; - classes(customCssClasses: string): void; - setIcons(icons: BootboxIcons): void; - setLocale(localeName: string): void; - addLocale(localeName: string, translations: BootboxLocale) : void; } -declare var bootbox : BootboxStatic; \ No newline at end of file +declare var bootbox: BootboxStatic; \ No newline at end of file diff --git a/bootstrap-notify/bootstrap-notify.d.ts.tscparams b/bootstrap-notify/bootstrap-notify.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/bootstrap-notify/bootstrap-notify.d.ts.tscparams +++ b/bootstrap-notify/bootstrap-notify.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams +++ b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/browser-harness/browser-harness-tests.ts.tscparams b/browser-harness/browser-harness-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/browser-harness/browser-harness-tests.ts.tscparams +++ b/browser-harness/browser-harness-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/browser-harness/browser-harness.d.ts.tscparams b/browser-harness/browser-harness.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/browser-harness/browser-harness.d.ts.tscparams +++ b/browser-harness/browser-harness.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/camljs/camljs-tests.ts.tscparams b/camljs/camljs-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/camljs/camljs-tests.ts.tscparams +++ b/camljs/camljs-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/camljs/camljs.d.ts.tscparams b/camljs/camljs.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/camljs/camljs.d.ts.tscparams +++ b/camljs/camljs.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chai-fuzzy/chai-fuzzy.d.ts.tscparams b/chai-fuzzy/chai-fuzzy.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chai-fuzzy/chai-fuzzy.d.ts.tscparams +++ b/chai-fuzzy/chai-fuzzy.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chai-jquery/chai-jquery-tests.ts.tscparams b/chai-jquery/chai-jquery-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chai-jquery/chai-jquery-tests.ts.tscparams +++ b/chai-jquery/chai-jquery-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chai/chai-tests.ts.tscparams b/chai/chai-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chai/chai-tests.ts.tscparams +++ b/chai/chai-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chrome/chrome-app-tests.ts.tscparams b/chrome/chrome-app-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chrome/chrome-app-tests.ts.tscparams +++ b/chrome/chrome-app-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chrome/chrome-app.d.ts.tscparams b/chrome/chrome-app.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chrome/chrome-app.d.ts.tscparams +++ b/chrome/chrome-app.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/chrome/chrome-tests.ts.tscparams b/chrome/chrome-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/chrome/chrome-tests.ts.tscparams +++ b/chrome/chrome-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/convert-source-map/convert-source-map-tests.ts.tscparams b/convert-source-map/convert-source-map-tests.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/convert-source-map/convert-source-map-tests.ts.tscparams +++ b/convert-source-map/convert-source-map-tests.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/convert-source-map/convert-source-map.d.ts.tscparams b/convert-source-map/convert-source-map.d.ts.tscparams index e16c76dff..d3f5a12fa 100644 --- a/convert-source-map/convert-source-map.d.ts.tscparams +++ b/convert-source-map/convert-source-map.d.ts.tscparams @@ -1 +1 @@ -"" + diff --git a/cordova/.gitignore b/cordova/.gitignore new file mode 100644 index 000000000..3be8493bd --- /dev/null +++ b/cordova/.gitignore @@ -0,0 +1 @@ +cordova-tests.js \ No newline at end of file diff --git a/cordova/cordova-tests.ts b/cordova/cordova-tests.ts index 4cd95e694..dfaa25cc3 100644 --- a/cordova/cordova-tests.ts +++ b/cordova/cordova-tests.ts @@ -10,19 +10,33 @@ console.log('cordova.version: ' + cordova.version + ', cordova.platformId: ' + c cordova.exec(null, null, "NativeClassName", "MethodName"); -cordova.define('mymodule', (require, exports, module) => { }); +cordova.define('mymodule', (req, exp, mod)=> { + mod.exports = { dummy: () => { console.log("i'm a dummy"); }}; +}); + var myModule = cordova.require('mymodule'); +myModule.dummy(); var argsCheck: ArgsCheck = cordova.require('cordova/argcheck'); argsCheck.checkArgs('ssA', 'cordova.exec', [() => { }, () => { }, 'window', 'openDatabase']); +class Application { + start() { console.log("Starting app"); } + pause() { console.log('app paused'); } +} + +declare var app: Application; + +document.addEventListener('deviceready', () => { app.start(); }); +document.addEventListener('pause', ()=> { app.pause(); }); + // Battery status plugin //---------------------------------------------------------------------- window.addEventListener('batterystatus', (ev: BatteryStatusEvent) => { console.log('Battery level is ' + ev.level); }); window.addEventListener('batterycritical', - ()=> { alert('Battery is critical low!'); }); + () => { alert('Battery is critical low!'); }); // Camera plugin //---------------------------------------------------------------------- @@ -51,10 +65,12 @@ var contact: Contact = navigator.contacts.create({ navigator.contacts.find(["phoneNumbers"], (contacts: Contact[])=> { alert('Find ' + contacts.length + ' contacts'); }, (error: ContactError) => { alert('Error: ' + error.message); }, - { - filter: "+1", - multiple: true - } + new ContactFindOptions("+1", true) +); + +navigator.contacts.pickContact( + (contact: Contact)=> { console.log(contact); }, + (err: ContactError)=> { console.log(err.message); } ); // Device API @@ -105,26 +121,64 @@ function fsaccessor(fs: FileSystem) { var fsreader: DirectoryReader = fs.root.createReader(); fsreader.readEntries( (entries: Entry[]) => { console.log(fs.root.name + ' has ' + entries.length + ' child elements'); }, - (err: Error)=> { alert('Error: ' + err.message); }); + (err: FileError)=> { alert('Error: ' + err.code); }); } window.requestFileSystem( window.TEMPORARY, 1024 * 1024 * 5, fsaccessor, - (err: Error) => { alert('Error: ' + err.message); }); + (err: FileError) => { alert('Error: ' + err.code); } +); + +window.resolveLocalFileSystemURI(cordova.file.applicationDirectory, + (entry: Entry)=> { + if (entry.isDirectory) { + console.log('successfully resolved ' + entry.fullPath + 'directory'); + console.log(entry.toURL()); + console.log(entry.toInternalURL()); + } else { + var fentry = entry; + fentry.file((f: File) => { console.log(f.slice(f.size - 10, f.size)); }); + fentry.createWriter((writer: FileWriter)=> { + if (writer.readyState == FileWriter.INIT) { + console.log('Init FileWriter'); + writer.write(new Blob(['sdfdsfsdf'])); + writer.onprogress = function(ev: ProgressEvent) { + console.log('Writing ' + ev.target); + }; + } + }); + } + }, + (error: FileError) => { console.log(error.code); } +); // FileTransfer plugin //---------------------------------------------------------------------- var file = new FileTransfer(); + +file.onprogress = (ev: ProgressEvent) => { + if (ev.lengthComputable) { + console.log(ev.loaded + '/' + ev.total); + } +}; + file.download('http://some.server.com/download.php', 'cdvfile://localhost/persistent/path/to/downloads/', (file: FileEntry)=> { console.log('File Downloaded to ' + file.fullPath); }, - (err: FileTransferError)=> { alert('Error ' + err.code); }, + (err: FileTransferError) => { + console.error('Error ' + err.code); + if (err.exception) { + console.error('Failed with exception ' + err.exception); + } + }, { headers: null }, true); +file.abort(); + // InAppBrowser plugin //---------------------------------------------------------------------- @@ -135,6 +189,10 @@ file.download('http://some.server.com/download.php', var iab = window.open('google.com', '_self'); iab.addEventListener('loadstart', (ev: InAppBrowserEvent) => { console.log('Start opening ' + ev.url); }); iab.show(); +iab.executeScript( + { code: "console.log('Injected script in action')" }, + ()=> { console.log('Script is executed'); } +); // Globalization plugin //---------------------------------------------------------------------- @@ -226,4 +284,6 @@ db.transaction( // Vibration plugin //---------------------------------------------------------------------- -navigator.notification.vibrate(100); \ No newline at end of file +navigator.notification.vibrate(100); +navigator.notification.vibrateWithPattern([100, 200, 200, 150, 50], 3); +setTimeout(navigator.notification.cancelVibration, 1000); \ No newline at end of file diff --git a/cordova/cordova.d.ts b/cordova/cordova.d.ts index 9377912b0..06d13e8cf 100644 --- a/cordova/cordova.d.ts +++ b/cordova/cordova.d.ts @@ -44,6 +44,33 @@ interface Cordova { require(moduleName: string): any; } +interface Document { + addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + + removeEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void; + + addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; + removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void; +} + // cordova/argscheck module interface ArgsCheck { checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void; diff --git a/cordova/plugins/Camera.d.ts b/cordova/plugins/Camera.d.ts index eb0c97147..126b329ff 100644 --- a/cordova/plugins/Camera.d.ts +++ b/cordova/plugins/Camera.d.ts @@ -44,11 +44,11 @@ interface Camera { } interface CameraOptions { - /** Picture quality in range o-100 */ + /** Picture quality in range 0-100. Default is 50 */ quality?: number; /** * Choose the format of the return value. - * Defined in navigator.camera.DestinationType + * Defined in navigator.camera.DestinationType. Default is FILE_URI. * DATA_URL : 0, Return image as base64-encoded string * FILE_URI : 1, Return image file URI * NATIVE_URI : 2 Return image native URI @@ -56,7 +56,8 @@ interface CameraOptions { */ destinationType?: number; /** - * Set the source of the picture. Defined in navigator.camera.PictureSourceType + * Set the source of the picture. + * Defined in navigator.camera.PictureSourceType. Default is CAMERA. * PHOTOLIBRARY : 0, * CAMERA : 1, * SAVEDPHOTOALBUM : 2 @@ -65,7 +66,8 @@ interface CameraOptions { /** Allow simple editing of image before selection. */ allowEdit?: boolean; /** - * Choose the returned image file's encoding. Defined in navigator.camera.EncodingType + * Choose the returned image file's encoding. + * Defined in navigator.camera.EncodingType. Default is JPEG * JPEG : 0 Return JPEG encoded image * PNG : 1 Return PNG encoded image */ @@ -93,7 +95,12 @@ interface CameraOptions { correctOrientation?: boolean; /** Save the image to the photo album on the device after capture. */ saveToPhotoAlbum?: boolean; - /** Choose the camera to use (front- or back-facing). Defined in navigator.camera.Direction */ + /** + * Choose the camera to use (front- or back-facing). + * Defined in navigator.camera.Direction. Default is BACK. + * FRONT: 0 + * BACK: 1 + */ cameraDirection?: number; /** iOS-only options that specify popover location in iPad. Defined in CameraPopoverOptions. */ popoverOptions?: CameraPopoverOptions; diff --git a/cordova/plugins/Contacts.d.ts b/cordova/plugins/Contacts.d.ts index f054c12d0..29a9a596c 100644 --- a/cordova/plugins/Contacts.d.ts +++ b/cordova/plugins/Contacts.d.ts @@ -34,6 +34,14 @@ interface Contacts { onSuccess: (contacts: Contact[]) => void, onError: (error: ContactError) => void, options?: ContactFindOptions): void; + /** + * The navigator.contacts.pickContact method launches the Contact Picker to select a single contact. + * The resulting object is passed to the contactSuccess callback function specified by the contactSuccess parameter. + * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database + * @param onError Error callback function, invoked when an error occurs. + */ + pickContact(onSuccess: (contact: Contact) => void, + onError: (error: ContactError) => void): void } interface ContactProperties { @@ -253,10 +261,13 @@ interface ContactFindOptions { filter?: string; /** Determines if the find operation returns multiple navigator.contacts. */ multiple?: boolean; + /* Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */ + desiredFields?: string[]; } declare var ContactFindOptions: { /** Constructor for ContactFindOptions object */ new(filter?: string, - multiple?: boolean): ContactFindOptions + multiple?: boolean, + desiredFields?: string[]): ContactFindOptions }; \ No newline at end of file diff --git a/cordova/plugins/Dialogs.d.ts b/cordova/plugins/Dialogs.d.ts index 5e2a7416d..6d86c6228 100644 --- a/cordova/plugins/Dialogs.d.ts +++ b/cordova/plugins/Dialogs.d.ts @@ -59,7 +59,10 @@ interface Notification { /** Object, passed to promptCallback */ interface NotificationPromptResult { - /** The index of the pressed button. Note that the index uses one-based indexing, so the value is 1, 2, 3, etc. */ + /** + * The index of the pressed button. Note that the index uses one-based indexing, so the value is 1, 2, 3, etc. + * 0 is the result when the dialog is dismissed without a button press. + */ buttonIndex: number; /** The text entered in the prompt dialog box. */ input1: string; diff --git a/cordova/plugins/FileSystem.d.ts b/cordova/plugins/FileSystem.d.ts index 569f9a209..1e1476b39 100644 --- a/cordova/plugins/FileSystem.d.ts +++ b/cordova/plugins/FileSystem.d.ts @@ -18,7 +18,16 @@ interface Window { type: number, size: number, successCallback: (fileSystem: FileSystem) => void, - errorCallback?: (fileError: Error) => void): void; + errorCallback?: (fileError: FileError) => void): void; + /** + * Look up file system Entry referred to by local URI. + * @param string uri URI referring to a local file or directory + * @param successCallback invoked with Entry object corresponding to URI + * @param errorCallback invoked if error occurs retrieving file system entry + */ + resolveLocalFileSystemURI(uri: string, + successCallback: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; TEMPORARY: number; PERSISTENT: number; } @@ -54,7 +63,7 @@ interface Entry { */ getMetadata( successCallback: (metadata: Metadata) => void, - errorCallback?: (error: Error) => void): void; + errorCallback?: (error: FileError) => void): void; /** * Move an entry to a different location on the file system. It is an error to try to: * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different from its current one isn't provided; @@ -69,9 +78,9 @@ interface Entry { * @param errorCallback A callback that is called when errors happen. */ moveTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void , - errorCallback?: (error: Error) => void ): void; + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; /** * Copy an entry to a different location on the file system. It is an error to try to: * copy a directory inside itself or to any child at any depth; @@ -88,24 +97,34 @@ interface Entry { * @param errorCallback A callback that is called when errors happen. */ copyTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void , - errorCallback?: (error: Error) => void ): void; + newName?: string, + successCallback?: (entry: Entry) => void, + errorCallback?: (error: FileError) => void): void; + /** + * Returns a URL that can be used as the src attribute of a