From 8183240157f05faab87c49c0b4fecd5d4e9f1cdb Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 27 Sep 2013 14:09:10 -0400 Subject: [PATCH 001/150] Create when.d.ts --- when/when.d.ts | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 when/when.d.ts diff --git a/when/when.d.ts b/when/when.d.ts new file mode 100644 index 0000000000..2389a42439 --- /dev/null +++ b/when/when.d.ts @@ -0,0 +1,64 @@ +// Type definitions for When 2.4.0 +// Project: https://github.com/cujojs/when +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module When { + + /** + * Return a promise that will resolve only once all the supplied promisesOrValues + * have resolved. The resolution value of the returned promise will be an array + * containing the resolution values of each of the promisesOrValues. + * @memberOf when + * + * @param promisesOrValues array of anything, may contain a mix + * of {@link Promise}s and values + */ + function all(promisesOrValues: any[]): Promise; + + /** + * Creates a {promise, resolver} pair, either or both of which + * may be given out safely to consumers. + * The resolver has resolve, reject, and progress. The promise + * has then plus extended promise API. + */ + function defer(): Deferred; + + /** + * Joins multiple promises into a single returned promise. + * @return a promise that will fulfill when *all* the input promises + * have fulfilled, or will reject when *any one* of the input promises rejects. + */ + function join(...promises: Promise[]): Promise; + /** + * Joins multiple promises into a single returned promise. + * @return a promise that will fulfill when *all* the input promises + * have fulfilled, or will reject when *any one* of the input promises rejects. + */ + function join(...promises: any[]): Promise; + + /** + * Returns a resolved promise. The returned promise will be + * - fulfilled with promiseOrValue if it is a value, or + * - if promiseOrValue is a promise + * - fulfilled with promiseOrValue's value after it is fulfilled + * - rejected with promiseOrValue's reason after it is rejected + */ + function resolve(promise: Promise): Promise; + function resolve(value?: T): Promise; + + interface Deferred { + notify(update: any): void; + promise: Promise; + reject(reason: any): void; + resolve(value?: T): void; + } + + interface Promise { + ensure(onFulfilledOrRejected: Function): Promise; + + then(onFulfilled: (value: T) => Promise, onRejected?: (reason: any) => Promise, onProgress?: (update: any) => void): Promise; + then(onFulfilled: (value: T) => Promise, onRejected?: (reason: any) => U, onProgress?: (update: any) => void): Promise; + then(onFulfilled: (value: T) => U, onRejected?: (reason: any) => Promise, onProgress?: (update: any) => void): Promise; + then(onFulfilled: (value: T) => U, onRejected?: (reason: any) => U, onProgress?: (update: any) => void): Promise; + } +} From aee4382e39826c05e5f0104ebd1080cea9e3c9fc Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Sat, 28 Sep 2013 01:30:36 -0400 Subject: [PATCH 002/150] Create cometd.d.ts --- cometd/cometd.d.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cometd/cometd.d.ts diff --git a/cometd/cometd.d.ts b/cometd/cometd.d.ts new file mode 100644 index 0000000000..6002fffb06 --- /dev/null +++ b/cometd/cometd.d.ts @@ -0,0 +1,28 @@ +// Type definitions for CometD 2.5.1 +// Project: http://cometd.org +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module CometD { + + var onListenerException: (exception: any, subscriptionHandle: any, isListener: boolean, message: string) => void; + + function init(options: ConfigurationOptions): void; + + function addListener(channel: string, listener: (message: any) => void): void; + function removeListener(listener: (message: any) => void): void; + + function publish(channel: string, message: any): void; + + interface ConfigurationOptions { + url: string; + logLevel?: string; + maxConnections?: number; + backoffIncrement?: number; + maxBackoff?: number; + reverseIncomingExtensions?: boolean; + maxNetworkDelay?: number; + requestHeaders?: any; + appendMessageTypeToURL?: boolean; + autoBatch?: boolean; + } +} From 2d667c61fc055595bbd08f6c0cbdab5f40a5e25b Mon Sep 17 00:00:00 2001 From: kyo-ago Date: Sat, 28 Sep 2013 20:19:21 +0900 Subject: [PATCH 003/150] add appframework --- README.md | 1 + appframework/appframework-tests.ts | 626 +++++++++++++ appframework/appframework.d.ts | 1305 ++++++++++++++++++++++++++++ 3 files changed, 1932 insertions(+) create mode 100644 appframework/appframework-tests.ts create mode 100644 appframework/appframework.d.ts diff --git a/README.md b/README.md index 59104d4d55..af30c9cc3e 100755 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ List of Definitions * [Ace Cloud9 Editor](http://ace.ajax.org/) (by [Diullei Gomes](https://github.com/Diullei)) * [AmCharts](http://www.amcharts.com/) (by [Covobonomo](https://github.com/covobonomo/)) * [AngularJS](http://angularjs.org) (by [Diego Vilar](https://github.com/diegovilar)) ([wiki](https://github.com/borisyankov/DefinitelyTyped/wiki/AngularJS-Definitions-Usage-Notes)) +* [AppFramework](http://app-framework-software.intel.com/) (by [Kyo Ago](https://github.com/kyo-ago)) * [Arbiter](http://arbiterjs.com/) (by [Arash Shakery](https://github.com/arash16)) * [async](https://github.com/caolan/async) (by [Boris Yankov](https://github.com/borisyankov)) * [Backbone.js](http://backbonejs.org/) (by [Boris Yankov](https://github.com/borisyankov)) diff --git a/appframework/appframework-tests.ts b/appframework/appframework-tests.ts new file mode 100644 index 0000000000..a769d2fcdd --- /dev/null +++ b/appframework/appframework-tests.ts @@ -0,0 +1,626 @@ +/// + +af(function ($: appFrameworkCollection) {}); + +((): appFrameworkCollection => { + return $('div'); //=> all DIV elements on the page +})(); +((): appFrameworkCollection => { + return $("

", {}); // context +})(); +((): appFrameworkCollection => { + return $($('')); // appFrameworkCollection +})(); +((): appFrameworkCollection => { + return $(document.createElement('div')); // HTMLElement +})(); +((): appFrameworkCollection => { + return $({}); // Object(any) +})(); + +((): boolean => { + return $.is$($('')); +})(); + +((): boolean[] => { + return $.map([], (item: any, index: number): boolean => { + return true; + }); +})(); + +$.each([], (index: number, item: any) => { }); +$.each({}, (key: string, value: any) => { }); + +((): Object => { + return $.extend({ one: 'patridge' }, { two: 'turtle doves' }); +})(); + +((): boolean => { + return $.isArray({}); +})(); + +((): boolean => { + return $.isFunction({}); +})(); + +((): boolean => { + return $.isObject({}); +})(); + +((): Object => { + return $.fn; +})(); + +((): Object => { + return $.ajaxSettings; +})(); + +$.jsonP({}); + +((): XMLHttpRequest => { + return $.ajax({}); +})(); + +((): XMLHttpRequest => { + return $.get('', (data: any, status?: string, xhr?: XMLHttpRequest) => {}); +})(); + + +((): XMLHttpRequest => { + return $.post('', (data: any, status?: string, xhr?: XMLHttpRequest) => {}); +})(); +((): XMLHttpRequest => { + return $.post('', {}, (data: any, status?: string, xhr?: XMLHttpRequest) => {}); +})(); + + +((): XMLHttpRequest => { + return $.getJSON('', (data: any, status?: string, xhr?: XMLHttpRequest) => {}); +})(); +((): XMLHttpRequest => { + return $.getJSON('', {}, (data: any, status?: string, xhr?: XMLHttpRequest) => {}); +})(); + + +((): string => { + return $.param({}); +})(); +((): string => { + return $.param({}, ''); +})(); + +((): Object => { + return $.parseJSON(''); +})(); + +((): Object => { + return $.parseXML(''); +})(); + +((): string => { + return $.uuid(); +})(); + +((): Object => { + return $.getCssMatrix(document.createElement('div')); +})(); +((): Object => { + return $.getCssMatrix($('')); +})(); + +((): appFrameworkCollection => { + return $.create(''); +})(); +((): appFrameworkCollection => { + return $.create('', {}); +})(); + +((): appFrameworkCollection => { + return $.query(''); +})(); +((): appFrameworkCollection => { + return $.query('', {}); +})(); + +((): Object => { + return $.Event('', {}); +})(); + +((): void => { + return $.bind({}, '', () => {}); +})(); + +((): void => { + return $.trigger({}, ''); +})(); +((): void => { + return $.trigger({}, '', []); +})(); + +((): void => { + return $.unbind({}, '', () => {}); +})(); + +((): void => { + return $.proxy(() => {}, {}); +})(); + +((): void => { + return $.cleanUpContent(document.createElement('div'), false, false); +})(); + +((): void => { + return $.asap(() => {}); +})(); +((): void => { + return $.asap(() => {}, {}); +})(); +((): void => { + return $.asap(() => {}, {}, []); +})(); + +((): void => { + return $.parseJS(''); +})(); +((): void => { + return $.parseJS(document.createElement('div')); +})(); + +$.os.webkit; +$.os.android; +$.os.androidICS; +$.os.ipad; +$.os.iphone; +$.os.ios7; +$.os.webos; +$.os.touchpad; +$.os.ios; +$.os.playbook; +$.os.blackberry; +$.os.blackberry10; +$.os.chrome; +$.os.opera; +$.os.fennec; +$.os.ie; +$.os.ieTouch; +$.os.supportsTouch; + +$.feat.nativeTouchScroll; +$.feat.cssPrefix; +$.feat.cssTransformStart; +$.feat.cssTransformEnd; + + +((): appFrameworkCollection => { + return $('').reduce(() => {}); +})(); + +((): number => { + return $('').push($('')); +})(); + +((): number => { + return $('').indexOf($('')); +})(); + +((): appFrameworkCollection[] => { + return $('').concat($('')); +})(); + +((): appFrameworkCollection[] => { + return $('').slice(0); +})(); + +((): number => { + return $('').length; +})(); + +((): appFrameworkCollection => { + return $('').map(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').each(() => {}); +})(); + +((): void => { + return $('').forEach(() => {}); +})(); + +((): appFrameworkStatic => { + return $('').ready(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').find(''); +})(); + +((): string => { + return $('').html(); +})(); +((): appFrameworkCollection => { + return $('').html(''); +})(); +((): appFrameworkCollection => { + return $('').html('', false); +})(); + +((): string => { + return $('').text(); +})(); +((): appFrameworkCollection => { + return $('').text(''); +})(); + +(() => { + return $('').css(''); +})(); +((): appFrameworkCollection => { + return $('').css('', ''); +})(); +((): appFrameworkCollection => { + return $('').css({}); +})(); + +((): appFrameworkCollection => { + return $('').vendorCss(''); +})(); + +((): appFrameworkCollection => { + return $('').computedStyle(''); +})(); + +((): appFrameworkCollection => { + return $('').empty(); +})(); + +((): appFrameworkCollection => { + return $('').hide(); +})(); + +((): appFrameworkCollection => { + return $('').show(); +})(); + +((): appFrameworkCollection => { + return $('').toggle(); +})(); + +((): string => { + return $('').val(); +})(); +((): appFrameworkCollection => { + return $('').val(''); +})(); + +((): string => { + return $('').attr(''); +})(); +((): appFrameworkCollection => { + return $('').attr({}); +})(); +((): appFrameworkCollection => { + return $('').attr('', ''); +})(); +((): appFrameworkCollection => { + return $('').attr('', {}); +})(); + +((): appFrameworkCollection => { + return $('').removeAttr(''); +})(); + +((): string => { + return $('').prop(''); +})(); +((): appFrameworkCollection => { + return $('').prop({}); +})(); +((): appFrameworkCollection => { + return $('').prop('', ''); +})(); +((): appFrameworkCollection => { + return $('').prop('', {}); +})(); + +((): appFrameworkCollection => { + return $('').removeProp(''); +})(); + +((): appFrameworkCollection => { + return $('').remove(); +})(); +((): appFrameworkCollection => { + return $('').remove(''); +})(); +((): appFrameworkCollection => { + return $('').remove(document.createElement('div')); +})(); +((): appFrameworkCollection => { + return $('').remove($('')); +})(); + +((): appFrameworkCollection => { + return $('').addClass(''); +})(); + +((): appFrameworkCollection => { + return $('').removeClass(''); +})(); + +((): appFrameworkCollection => { + return $('').replaceClass('', ''); +})(); + +((): boolean => { + return $('').hasClass('', document.createElement('div')); +})(); + +((): appFrameworkCollection => { + return $('').append(''); +})(); + +((): appFrameworkCollection => { + return $('').appendTo(''); +})(); + +((): appFrameworkCollection => { + return $('').prependTo(''); +})(); + +((): appFrameworkCollection => { + return $('').prepend(''); +})(); + +((): appFrameworkCollection => { + return $('').insertBefore(''); +})(); + +((): void => { + return $('').insertAfter(''); +})(); + +((): HTMLElement[] => { + return $('').get(); +})(); + +((): HTMLElement => { + return $('').get(0); +})(); + +((): { + left: number; + top: number; + right: number; + bottom: number; + width: number; + height: number; +} => { + return $('').offset(); +})(); + +((): string => { + return $('').height(); +})(); + +((): string => { + return $('').width(); +})(); + +((): appFrameworkCollection => { + return $('').parent(); +})(); + +((): appFrameworkCollection => { + return $('').parents(); +})(); + +((): appFrameworkCollection => { + return $('').children(); +})(); + +((): appFrameworkCollection => { + return $('').siblings(); +})(); + +((): appFrameworkCollection => { + return $('').closest(); +})(); + +((): appFrameworkCollection => { + return $('').filter(); +})(); + +((): appFrameworkCollection => { + return $('').not(); +})(); + +((): any => { + return $('').data(''); +})(); +((): appFrameworkCollection => { + return $('').data('', ''); +})(); +((): appFrameworkCollection => { + return $('').data('', {}); +})(); + +((): appFrameworkCollection => { + return $('').end(); +})(); + +((): appFrameworkCollection => { + return $('').clone(); +})(); + +((): number => { + return $('').size(); +})(); + +((): string => { + return $('').serialize(); +})(); + +((): appFrameworkCollection => { + return $('').eq(0); +})(); + +((): number => { + return $('').index(); +})(); +((): number => { + return $('').index(''); +})(); + +((): number => { + return $('').is(''); +})(); + +((): appFrameworkCollection => { + return $('').bind({}); +})(); +((): appFrameworkCollection => { + return $('').bind('', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').unbind({}); +})(); +((): appFrameworkCollection => { + return $('').unbind(); +})(); +((): appFrameworkCollection => { + return $('').unbind('', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').one({}); +})(); +((): appFrameworkCollection => { + return $('').one('', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').delegate('', {}); +})(); +((): appFrameworkCollection => { + return $('').delegate('', '', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').undelegate('', {}); +})(); +((): appFrameworkCollection => { + return $('').undelegate('', '', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').on({}); +})(); +((): appFrameworkCollection => { + return $('').on('', () => {}); +})(); +((): appFrameworkCollection => { + return $('').on('', '', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').off({}); +})(); +((): appFrameworkCollection => { + return $('').off('', () => {}); +})(); +((): appFrameworkCollection => { + return $('').off('', '', () => {}); +})(); + +((): appFrameworkCollection => { + return $('').trigger(''); +})(); +((): appFrameworkCollection => { + return $('').trigger({}); +})(); + +((): appFrameworkCollection => { + return $('').click(); +})(); +((): appFrameworkCollection => { + return $('').click(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').keydown(); +})(); +((): appFrameworkCollection => { + return $('').keydown(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').keyup(); +})(); +((): appFrameworkCollection => { + return $('').keyup(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').keypress(); +})(); +((): appFrameworkCollection => { + return $('').keypress(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').submit(); +})(); +((): appFrameworkCollection => { + return $('').submit(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').load(); +})(); +((): appFrameworkCollection => { + return $('').load(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').resize(); +})(); +((): appFrameworkCollection => { + return $('').resize(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').change(); +})(); +((): appFrameworkCollection => { + return $('').change(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').select(); +})(); +((): appFrameworkCollection => { + return $('').select(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').error(); +})(); +((): appFrameworkCollection => { + return $('').error(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').focus(); +})(); +((): appFrameworkCollection => { + return $('').focus(() => {}); +})(); + +((): appFrameworkCollection => { + return $('').blur(); +})(); +((): appFrameworkCollection => { + return $('').blur(() => {}); +})(); diff --git a/appframework/appframework.d.ts b/appframework/appframework.d.ts new file mode 100644 index 0000000000..5160e0dae2 --- /dev/null +++ b/appframework/appframework.d.ts @@ -0,0 +1,1305 @@ +// Type definitions for AppFramework 2.0 +// Project: http://app-framework-software.intel.com/ +// Definitions by: kyo_ago +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface appFrameworkStatic { + /** + * This is the internal appframework object that gets extended and added on to it + * This is also the start of our query selector engine + * @param {String|Element|Object|Array} selector + * @param {String|Element|Object} [context] + */ + (selector: string, context?: any): appFrameworkCollection; + (collection: appFrameworkCollection): appFrameworkCollection; + (element: HTMLElement): appFrameworkCollection; + (htmlString: string): appFrameworkCollection; + (object: any): appFrameworkCollection; + + /** + * Checks to see if the parameter is a $afm object + ``` + var foo=$('#header'); + $.is$(foo); + ``` + + * @param {Object} element + * @return {Boolean} + * @title $.is$(param) + */ + is$(obj: any): boolean; + + /** + * Map takes in elements and executes a callback function on each and returns a collection + ``` + $.map([1,2],function(ind){return ind+1}); + ``` + + * @param {Array|Object} elements + * @param {Function} callback + * @return {Object} appframework object with elements in it + * @title $.map(elements,callback) + */ + map(collection: any[], fn: (item: any, index: number) => any): any[]; + + /** + * Iterates through elements and executes a callback. Returns if false + ``` + $.each([1,2],function(ind){console.log(ind);}); + ``` + + * @param {Array|Object} elements + * @param {Function} callback + * @return {Array} elements + * @title $.each(elements,callback) + */ + each(collection: any[], fn: (index: number, item: any) => boolean): void; + each(collection: any, fn: (key: string, value: any) => boolean): void; + + /** + * Extends an object with additional arguments + ``` + $.extend({foo:'bar'}); + $.extend(element,{foo:'bar'}); + ``` + + * @param {Object} [target] element + * @param any number of additional arguments + * @return {Object} [target] + * @title $.extend(target,{params}) + */ + extend(target: any, ...sources: any[]): any; + + /** + * Checks to see if the parameter is an array + ``` + var arr=[]; + $.isArray(arr); + ``` + + * @param {Object} element + * @return {Boolean} + * @example $.isArray([1]); + * @title $.isArray(param) + */ + isArray(object: any): boolean; + + /** + * Checks to see if the parameter is a function + ``` + var func=function(){}; + $.isFunction(func); + ``` + + * @param {Object} element + * @return {Boolean} + * @title $.isFunction(param) + */ + isFunction(object: any): boolean; + + /** + * Checks to see if the parameter is a object + ``` + var foo={bar:'bar'}; + $.isObject(foo); + ``` + + * @param {Object} element + * @return {Boolean} + * @title $.isObject(param) + */ + isObject(object: any): boolean; + + /** + * Prototype for afm object. Also extens $.fn + */ + fn: Object; + + /* AJAX settings */ + ajaxSettings: appFrameworkAjaxSettings; + + /** + * Execute a jsonP call, allowing cross domain scripting + * options.url - URL to call + * options.success - Success function to call + * options.error - Error function to call + ``` + $.jsonP({url:'mysite.php?callback=?&foo=bar',success:function(){},error:function(){}}); + ``` + + * @param {Object} options + * @title $.jsonP(options) + */ + jsonP(options: appFrameworkAjaxSettings): {}; + + /** + * Execute an Ajax call with the given options + * options.type - Type of request + * options.beforeSend - function to execute before sending the request + * options.success - success callback + * options.error - error callback + * options.complete - complete callback - callled with a success or error + * options.timeout - timeout to wait for the request + * options.url - URL to make request against + * options.contentType - HTTP Request Content Type + * options.headers - Object of headers to set + * options.dataType - Data type of request + * options.data - data to pass into request. $.param is called on objects + ``` + var opts={ + type:"GET", + success:function(data){}, + url:"mypage.php", + data:{bar:'bar'}, + } + $.ajax(opts); + ``` + + * @param {Object} options + * @title $.ajax(options) + */ + ajax(options: appFrameworkAjaxSettings): XMLHttpRequest; + + /** + * Shorthand call to an Ajax GET request + ``` + $.get("mypage.php?foo=bar",function(data){}); + ``` + + * @param {String} url to hit + * @param {Function} success + * @title $.get(url,success) + */ + get(url: string, fn: (data: any, status?: string, xhr?: XMLHttpRequest) => void): XMLHttpRequest; + + /** + * Shorthand call to an Ajax POST request + ``` + $.post("mypage.php",{bar:'bar'},function(data){}); + ``` + + * @param {String} url to hit + * @param {Object} [data] to pass in + * @param {Function} success + * @param {String} [dataType] + * @title $.post(url,[data],success,[dataType]) + */ + post(url: string, fn: (data: any, status?: string, xhr?: XMLHttpRequest) => void, dataType?: string): XMLHttpRequest; + post(url: string, data: any, fn: (data: any, status?: string, xhr?: XMLHttpRequest) => void, dataType?: string): XMLHttpRequest; + + /** + * Shorthand call to an Ajax request that expects a JSON response + ``` + $.getJSON("mypage.php",{bar:'bar'},function(data){}); + ``` + + * @param {String} url to hit + * @param {Object} [data] + * @param {Function} [success] + * @title $.getJSON(url,data,success) + */ + getJSON(url: string, fn: (data: any, status?: string, xhr?: XMLHttpRequest) => void): XMLHttpRequest; + getJSON(url: string, data: any, fn: (data: any, status: string, xhr: XMLHttpRequest) => void ): XMLHttpRequest; + + /** + * Converts an object into a key/value par with an optional prefix. Used for converting objects to a query string + ``` + var obj={ + foo:'foo', + bar:'bar' + } + var kvp=$.param(obj,'data'); + ``` + + * @param {Object} object + * @param {String} [prefix] + * @return {String} Key/value pair representation + * @title $.param(object,[prefix]; + */ + param(object: any, prefix?: string): string; + + /** + * Used for backwards compatibility. Uses native JSON.parse function + ``` + var obj=$.parseJSON("{\"bar\":\"bar\"}"); + ``` + + * @params {String} string + * @return {Object} + * @title $.parseJSON(string) + */ + parseJSON(str: string): any; + + /** + * Helper function to convert XML into the DOM node representation + ``` + var xmlDoc=$.parseXML("bar"); + ``` + + * @param {String} string + * @return {Object} DOM nodes + * @title $.parseXML(string) + */ + parseXML(str: string): any; + + /** + * Utility function to create a psuedo GUID + ``` + var id= $.uuid(); + ``` + * @title $.uuid + */ + uuid(): string; + + /** + * Gets the css matrix, or creates a fake one + ``` + $.getCssMatrix(domElement) + ``` + @returns matrix with postion + */ + getCssMatrix(node: HTMLElement): appFrameworkCssMatrix; + getCssMatrix(elem: appFrameworkCollection): appFrameworkCssMatrix; + + /** + * $.create - a faster alertnative to $("

this is some text
"); + ``` + $.create("div",{id:'main',innerHTML:'this is some text'}); + $.create("
this is some text
"); + ``` + * @param {String} DOM Element type or html + * @param [{Object}] properties to apply to the element + * @return {Object} Returns an appframework object + * @title $.create(type,[params]) + */ + create(type: string, params?: any): appFrameworkCollection; + + /** + * $.query - a faster alertnative to $("div"); + ``` + $.query(".panel"); + ``` + * @param {String} selector + * @param {Object} [context] + * @return {Object} Returns an appframework object + * @title $.query(selector,[context]) + */ + query(selector: string, context?: any): appFrameworkCollection; + + /** + * Creates a custom event to be used internally. + * @param {String} type + * @param {Object} [properties] + * @return {event} a custom event that can then be dispatched + * @title $.Event(type,props); + */ + Event(type: string, props: any): any; + + /* The following are for events on objects */ + /** + * Bind an event to an object instead of a DOM Node + ``` + $.bind(this,'event',function(){}); + ``` + * @param {Object} object + * @param {String} event name + * @param {Function} function to execute + * @title $.bind(object,event,function); + */ + bind(object: any, event: string, fn: Function): void; + + /** + * Trigger an event to an object instead of a DOM Node + ``` + $.trigger(this,'event',arguments); + ``` + * @param {Object} object + * @param {String} event name + * @param {Array} arguments + * @title $.trigger(object,event,argments); + */ + trigger(object: any, event: string, args?: any[]): void; + + /** + * Unbind an event to an object instead of a DOM Node + ``` + $.unbind(this,'event',function(){}); + ``` + * @param {Object} object + * @param {String} event name + * @param {Function} function to execute + * @title $.unbind(object,event,function); + */ + unbind(object: any, event: string, fn: Function): void; + + /** + * Creates a proxy function so you can change the 'this' context in the function + * Update: now also allows multiple argument call or for you to pass your own arguments + ``` + var newObj={foo:bar} + $("#main").bind("click",$.proxy(function(evt){console.log(this)},newObj); + + or + + ( $.proxy(function(foo, bar){console.log(this+foo+bar)}, newObj) )('foo', 'bar'); + + or + + ( $.proxy(function(foo, bar){console.log(this+foo+bar)}, newObj, ['foo', 'bar']) )(); + ``` + * @param {Function} Callback + * @param {Object} Context + * @title $.proxy(callback,context); + */ + proxy(callback: Function, context: any): void; + + /** + * Function to clean up node content to prevent memory leaks + ``` + $.cleanUpContent(node,itself,kill) + ``` + * @param {HTMLNode} node + * @param {Bool} kill itself + * @param {bool} Kill nodes + * @title $.cleanUpContent(node,itself,kill) + */ + cleanUpContent(node: HTMLElement, itself?: boolean, kill?: boolean): void; + + /** + * This adds a command to execute in the JS stack, but is faster then setTimeout + ``` + $.asap(function,context,args) + ``` + * @param {Function} function + * @param {Object} context + * @param {Array} arguments + */ + asap(callback: Function, context?: any, args?: any[]): void; + + /** + * this function executes javascript in HTML. + ``` + $.parseJS(content) + ``` + * @param {String|DOM} content + * @title $.parseJS(content); + */ + parseJS(content: string): void; + parseJS(content: HTMLElement): void; + + /** + * Helper function to parse the user agent. Sets the following + * .os.webkit + * .os.android + * .os.ipad + * .os.iphone + * .os.webos + * .os.touchpad + * .os.blackberry + * .os.opera + * .os.fennec + * .os.ie + * .os.ieTouch + * .os.supportsTouch + * .os.playbook + * .feat.nativetouchScroll + * @api private + */ + os: { + webkit: boolean; + android: boolean; + androidICS: boolean; + ipad: boolean; + iphone: boolean; + ios7: boolean; + webos: boolean; + touchpad: boolean; + ios: boolean; + playbook: boolean; + blackberry: boolean; + blackberry10: boolean; + chrome: boolean; + opera: boolean; + fennec: boolean; + ie: boolean; + ieTouch: boolean; + supportsTouch: boolean; + }; + + feat: { + nativeTouchScroll: boolean; + cssPrefix: string; + cssTransformStart: string; + cssTransformEnd: string; + } +} + +interface appFrameworkCollection { + reduce(callbackfn: (previousValue: appFrameworkCollection, currentValue: appFrameworkCollection, currentIndex: number, array: appFrameworkCollection[]) => appFrameworkCollection, initialValue?: appFrameworkCollection): appFrameworkCollection; + push(...items: appFrameworkCollection[]): number; + indexOf(searchElement: appFrameworkCollection, fromIndex?: number): number; + concat(...items: appFrameworkCollection[]): appFrameworkCollection[]; + slice(start: number, end?: number): appFrameworkCollection[]; + length: number; + + /** + * This is a wrapper to $.map on the selected elements + ``` + $().map(function(){this.value+=ind}); + ``` + + * @param {Function} callback + * @return {Object} an appframework object + * @title $().map(function) + */ + map(fn: (index: number, item: any) => any): appFrameworkCollection; + /** + * Iterates through all elements and applys a callback function + ``` + $().each(function(){console.log(this.value)}); + ``` + + * @param {Function} callback + * @return {Object} an appframework object + * @title $().each(function) + */ + each(fn: (index: number, item: any) => any): appFrameworkCollection; + forEach(fn: (item: any, index: number) => any): void; + + /** + * This is executed when DOMContentLoaded happens, or after if you've registered for it. + ``` + $(document).ready(function(){console.log('I'm ready');}); + ``` + + * @param {Function} callback + * @return {Object} an appframework object + * @title $().ready(function) + */ + ready(fn: Function): appFrameworkStatic; + + /** + * Searches through the collection and reduces them to elements that match the selector + ``` + $("#foo").find('.bar'); + $("#foo").find($('.bar')); + $("#foo").find($('.bar').get(0)); + ``` + + * @param {String|Object|Array} selector + * @return {Object} an appframework object filtered + * @title $().find(selector) + + */ + find(selector: string): appFrameworkCollection; + + /** + * Gets or sets the innerHTML for the collection. + * If used as a get, the first elements innerHTML is returned + ``` + $("#foo").html(); //gets the first elements html + $("#foo").html('new html');//sets the html + $("#foo").html('new html',false); //Do not do memory management cleanup + ``` + + * @param {String} html to set + * @param {Bool} [cleanup] - set to false for performance tests and if you do not want to execute memory management cleanup + * @return {Object} an appframework object + * @title $().html([html]) + */ + html(): string; + html(html: string): appFrameworkCollection; + html(html: string, cleanup: boolean): appFrameworkCollection; + + /** + * Gets or sets the innerText for the collection. + * If used as a get, the first elements innerText is returned + ``` + $("#foo").text(); //gets the first elements text; + $("#foo").text('new text'); //sets the text + ``` + + * @param {String} text to set + * @return {Object} an appframework object + * @title $().text([text]) + */ + text(): string; + text(text: string): appFrameworkCollection; + + /** + * Gets or sets a css property for the collection + * If used as a get, the first elements css property is returned + * This will add px to properties that need it. + ``` + $().css("background"); // Gets the first elements background + $().css("background","red") //Sets the elements background to red + ``` + + * @param {String} attribute to get + * @param {String} value to set as + * @return {Object} an appframework object + * @title $().css(attribute,[value]) + */ + css(property: string): any; + css(property: string, value: any): appFrameworkCollection; + css(properties: any): appFrameworkCollection; + + /** + * Performs a css vendor specific transform:translate operation on the collection. + * + ``` + $("#main").cssTranslate('200px,0,0'); + ``` + * @param {String} Transform values + * @return {Object} an appframework object + * @title $().vendorCss(value) + */ + vendorCss(transform: string): appFrameworkCollection; + + /** + * Gets the computed style of CSS values + * + ``` + $("#main").computedStyle('display'); + ``` + * @param {String} css property + * @return {Int|String|Float|} css vlaue + * @title $().computedStyle() + */ + computedStyle(css: string): appFrameworkCollection; + + /** + * Sets the innerHTML of all elements to an empty string + ``` + $().empty(); + ``` + + * @return {Object} an appframework object + * @title $().empty() + */ + empty(): appFrameworkCollection; + + /** + * Sets the elements display property to "none". + * This will also store the old property into an attribute for hide + ``` + $().hide(); + ``` + + * @return {Object} an appframework object + * @title $().hide() + */ + hide(): appFrameworkCollection; + + /** + * Shows all the elements by setting the css display property + * We look to see if we were retaining an old style (like table-cell) and restore that, otherwise we set it to block + ``` + $().show(); + ``` + + * @return {Object} an appframework object + * @title $().show() + */ + show(): appFrameworkCollection; + + /** + * Toggle the visibility of a div + ``` + $().toggle(); + $().toggle(true); //force showing + ``` + + * @param {Boolean} [show] -force the hiding or showing of the element + * @return {Object} an appframework object + * @title $().toggle([show]) + */ + toggle(show?: boolean): appFrameworkCollection; + + /** + * Gets or sets an elements value + * If used as a getter, we return the first elements value. If nothing is in the collection, we return undefined + ``` + $().value; //Gets the first elements value; + $().value="bar"; //Sets all elements value to bar + ``` + + * @param {String} [value] to set + * @return {String|Object} A string as a getter, appframework object as a setter + * @title $().val([value]) + */ + val(): string; + val(value: string): appFrameworkCollection; + + /** + * Gets or sets an attribute on an element + * If used as a getter, we return the first elements value. If nothing is in the collection, we return undefined + ``` + $().attr("foo"); //Gets the first elements 'foo' attribute + $().attr("foo","bar");//Sets the elements 'foo' attribute to 'bar' + $().attr("foo",{bar:'bar'}) //Adds the object to an internal cache + ``` + + * @param {String|Object} attribute to act upon. If it's an object (hashmap), it will set the attributes based off the kvp. + * @param {String|Array|Object|function} [value] to set + * @return {String|Object|Array|Function} If used as a getter, return the attribute value. If a setter, return an appframework object + * @title $().attr(attribute,[value]) + */ + attr(attribute: string): any; + attr(attributeHash: Object): appFrameworkCollection; + attr(attribute: string, value: string): appFrameworkCollection; + attr(attribute: string, value: any): appFrameworkCollection; + + /** + * Removes an attribute on the elements + ``` + $().removeAttr("foo"); + ``` + + * @param {String} attributes that can be space delimited + * @return {Object} appframework object + * @title $().removeAttr(attribute) + */ + removeAttr(attribute: string): appFrameworkCollection; + + /** + * Gets or sets a property on an element + * If used as a getter, we return the first elements value. If nothing is in the collection, we return undefined + ``` + $().prop("foo"); //Gets the first elements 'foo' property + $().prop("foo","bar");//Sets the elements 'foo' property to 'bar' + $().prop("foo",{bar:'bar'}) //Adds the object to an internal cache + ``` + + * @param {String|Object} property to act upon. If it's an object (hashmap), it will set the attributes based off the kvp. + * @param {String|Array|Object|function} [value] to set + * @return {String|Object|Array|Function} If used as a getter, return the property value. If a setter, return an appframework object + * @title $().prop(property,[value]) + */ + prop(attribute: string): any; + prop(attributeHash: Object): appFrameworkCollection; + prop(attribute: string, value: string): appFrameworkCollection; + prop(attribute: string, value: any): appFrameworkCollection; + + /** + * Removes a property on the elements + ``` + $().removeProp("foo"); + ``` + + * @param {String} properties that can be space delimited + * @return {Object} appframework object + * @title $().removeProp(attribute) + */ + removeProp(attribute: string): appFrameworkCollection; + + /** + * Removes elements based off a selector + ``` + $().remove(); //Remove all + $().remove(".foo");//Remove off a string selector + var element=$("#foo").get(0); + $().remove(element); //Remove by an element + $().remove($(".foo")); //Remove by a collection + + ``` + + * @param {String|Object|Array} selector to filter against + * @return {Object} appframework object + * @title $().remove(selector) + */ + remove(): appFrameworkCollection; + remove(selector: string): appFrameworkCollection; + remove(element: HTMLElement): appFrameworkCollection; + remove(elements: any[]): appFrameworkCollection; + remove(elements: appFrameworkCollection): appFrameworkCollection; + + /** + * Adds a css class to elements. + ``` + $().addClass("selected"); + ``` + + * @param {String} classes that are space delimited + * @return {Object} appframework object + * @title $().addClass(name) + */ + addClass(className: string): appFrameworkCollection; + + /** + * Removes a css class from elements. + ``` + $().removeClass("foo"); //single class + $().removeClass("foo selected");//remove multiple classess + ``` + + * @param {String} classes that are space delimited + * @return {Object} appframework object + * @title $().removeClass(name) + */ + removeClass(className: string): appFrameworkCollection; + + /** + * Replaces a css class on elements. + ``` + $().replaceClass("on", "off"); + ``` + + * @param {String} classes that are space delimited + * @param {String} classes that are space delimited + * @return {Object} appframework object + * @title $().replaceClass(old, new) + */ + replaceClass(oldClassName: string, newClassName: string): appFrameworkCollection; + + /** + * Checks to see if an element has a class. + ``` + $().hasClass('foo'); + $().hasClass('foo',element); + ``` + + * @param {String} class name to check against + * @param {Object} [element] to check against + * @return {Boolean} + * @title $().hasClass(name,[element]) + */ + hasClass(className: string, element: HTMLElement): boolean; + + /** + * Appends to the elements + * We boil everything down to an appframework object and then loop through that. + * If it's HTML, we create a dom element so we do not break event bindings. + * if it's a script tag, we evaluate it. + ``` + $().append("
"); //Creates the object from the string and appends it + $().append($("#foo")); //Append an object; + ``` + + * @param {String|Object} Element/string to add + * @param {Boolean} [insert] insert or append + * @return {Object} appframework object + * @title $().append(element,[insert]) + */ + append(content: any): appFrameworkCollection; + + /** + * Appends the current collection to the selector + ``` + $().appendTo("#foo"); //Append an object; + ``` + + * @param {String|Object} Selector to append to + * @param {Boolean} [insert] insert or append + * @title $().appendTo(element,[insert]) + */ + appendTo(target: any): appFrameworkCollection; + + /** + * Prepends the current collection to the selector + ``` + $().prependTo("#foo"); //Prepend an object; + ``` + + * @param {String|Object} Selector to prepent to + * @title $().prependTo(element) + */ + prependTo(target: any): appFrameworkCollection; + + /** + * Prepends to the elements + * This simply calls append and sets insert to true + ``` + $().prepend("
");//Creates the object from the string and appends it + $().prepend($("#foo")); //Prepends an object + ``` + + * @param {String|Object} Element/string to add + * @return {Object} appframework object + * @title $().prepend(element) + */ + prepend(content: any): appFrameworkCollection; + + /** + * Inserts collection before the target (adjacent) + ``` + $().insertBefore(af("#target")); + ``` + + * @param {String|Object} Target + * @title $().insertBefore(target); + */ + insertBefore(target: any): appFrameworkCollection; + + /** + * Inserts collection after the target (adjacent) + ``` + $().insertAfter(af("#target")); + ``` + * @param {String|Object} target + * @title $().insertAfter(target); + */ + insertAfter(target: any): void; + + /** + * Returns the raw DOM element. + ``` + $().get(0); //returns the first element + $().get(2);// returns the third element + ``` + + * @param {Int} [index] + * @return {Object} raw DOM element + * @title $().get([index]) + */ + get(): HTMLElement[]; + get(index: number): HTMLElement; + + /** + * Returns the offset of the element, including traversing up the tree + ``` + $().offset(); + ``` + + * @return {Object} with left, top, width and height properties + * @title $().offset() + */ + offset(): { + left: number; + top: number; + right: number; + bottom: number; + width: number; + height: number; + }; + + /** + * returns the height of the element, including padding on IE + ``` + $().height(); + ``` + * @return {string} height + * @title $().height() + */ + height(): string; + + /** + * returns the width of the element, including padding on IE + ``` + $().width(); + ``` + * @return {string} width + * @title $().width() + */ + width(): string; + + /** + * Returns the parent nodes of the elements based off the selector + ``` + $("#foo").parent('.bar'); + $("#foo").parent($('.bar')); + $("#foo").parent($('.bar').get(0)); + ``` + + * @param {String|Array|Object} [selector] + * @return {Object} appframework object with unique parents + * @title $().parent(selector) + */ + parent(selector?: any): appFrameworkCollection; + + /** + * Returns the parents of the elements based off the selector (traversing up until html document) + ``` + $("#foo").parents('.bar'); + $("#foo").parents($('.bar')); + $("#foo").parents($('.bar').get(0)); + ``` + + * @param {String|Array|Object} [selector] + * @return {Object} appframework object with unique parents + * @title $().parents(selector) + */ + parents(selector?: any): appFrameworkCollection; + + /** + * Returns the child nodes of the elements based off the selector + ``` + $("#foo").children('.bar'); //Selector + $("#foo").children($('.bar')); //Objects + $("#foo").children($('.bar').get(0)); //Single element + ``` + + * @param {String|Array|Object} [selector] + * @return {Object} appframework object with unique children + * @title $().children(selector) + */ + children(selector?: any): appFrameworkCollection; + + /** + * Returns the siblings of the element based off the selector + ``` + $("#foo").siblings('.bar'); //Selector + $("#foo").siblings($('.bar')); //Objects + $("#foo").siblings($('.bar').get(0)); //Single element + ``` + + * @param {String|Array|Object} [selector] + * @return {Object} appframework object with unique siblings + * @title $().siblings(selector) + */ + siblings(selector?: any): appFrameworkCollection; + + /** + * Returns the closest element based off the selector and optional context + ``` + $("#foo").closest('.bar'); //Selector + $("#foo").closest($('.bar')); //Objects + $("#foo").closest($('.bar').get(0)); //Single element + ``` + + * @param {String|Array|Object} selector + * @param {Object} [context] + * @return {Object} Returns an appframework object with the closest element based off the selector + * @title $().closest(selector,[context]); + */ + closest(selector?: any): appFrameworkCollection; + + /** + * Filters elements based off the selector + ``` + $("#foo").filter('.bar'); //Selector + $("#foo").filter($('.bar')); //Objects + $("#foo").filter($('.bar').get(0)); //Single element + ``` + + * @param {String|Array|Object} selector + * @return {Object} Returns an appframework object after the filter was run + * @title $().filter(selector); + */ + filter(selector?: any): appFrameworkCollection; + + /** + * Basically the reverse of filter. Return all elements that do NOT match the selector + ``` + $("#foo").not('.bar'); //Selector + $("#foo").not($('.bar')); //Objects + $("#foo").not($('.bar').get(0)); //Single element + ``` + + * @param {String|Array|Object} selector + * @return {Object} Returns an appframework object after the filter was run + * @title $().not(selector); + */ + not(selector?: any): appFrameworkCollection; + + /** + * Gets or set data-* attribute parameters on elements (when a string) + * When used as a getter, it's only the first element + ``` + $().data("foo"); //Gets the data-foo attribute for the first element + $().data("foo","bar"); //Sets the data-foo attribute for all elements + $().data("foo",{bar:'bar'});//object as the data + ``` + + * @param {String} key + * @param {String|Array|Object} value + * @return {String|Object} returns the value or appframework object + * @title $().data(key,[value]); + */ + data(attribute: string): any; + data(attribute: string, value: string): appFrameworkCollection; + data(attribute: string, value: any): appFrameworkCollection; + + /** + * Rolls back the appframework elements when filters were applied + * This can be used after .not(), .filter(), .children(), .parent() + ``` + $().filter(".panel").end(); //This will return the collection BEFORE filter is applied + ``` + + * @return {Object} returns the previous appframework object before filter was applied + * @title $().end(); + */ + end(): appFrameworkCollection; + + /** + * Clones the nodes in the collection. + ``` + $().clone();// Deep clone of all elements + $().clone(false); //Shallow clone + ``` + + * @param {Boolean} [deep] - do a deep copy or not + * @return {Object} appframework object of cloned nodes + * @title $().clone(); + */ + clone(deep?: boolean): appFrameworkCollection; + + /** + * Returns the number of elements in the collection + ``` + $().size(); + ``` + + * @return {Int} + * @title $().size(); + */ + size(): number; + + /** + * Serailizes a form into a query string + ``` + $().serialize(); + ``` + * @return {String} + * @title $().serialize() + */ + serialize(): string; + + /* added in 1.2 */ + /** + * Reduce the set of elements based off index + ``` + $().eq(index) + ``` + * @param {Int} index - Index to filter by. If negative, it will go back from the end + * @return {Object} appframework object + * @title $().eq(index) + */ + eq(index: number): appFrameworkCollection; + + /** + * Returns the index of the selected element in the collection + ``` + $().index(elem) + ``` + * @param {String|Object} element to look for. Can be a selector or object + * @return integer - index of selected element + * @title $().index(elem) + */ + index(): number; + index(selector: any): number; + + /** + * Returns boolean if the object is a type of the selector + ``` + $().is(selector) + ``` + * param {String|Object} selector to act upon + * @return boolean + * @title $().is(selector) + */ + is(selector: any): number; + + /** + * Binds an event to each element in the collection and executes the callback + ``` + $().bind('click',function(){console.log('I clicked '+this.id);}); + ``` + + * @param {String|Object} event + * @param {Function} callback + * @return {Object} appframework object + * @title $().bind(event,callback) + */ + bind(eventHash: Object): appFrameworkCollection; + bind(eventName: string, fn: (e: Event) => any): appFrameworkCollection; + + /** + * Unbinds an event to each element in the collection. If a callback is passed in, we remove just that one, otherwise we remove all callbacks for those events + ``` + $().unbind('click'); //Unbinds all click events + $().unbind('click',myFunc); //Unbinds myFunc + ``` + + * @param {String|Object} event + * @param {Function} [callback] + * @return {Object} appframework object + * @title $().unbind(event,[callback]); + */ + unbind(eventHash: {}): appFrameworkCollection; + unbind(eventName?: string): appFrameworkCollection; + unbind(eventName: string, fn?: (e: Event) => any): appFrameworkCollection; + + /** + * Binds an event to each element in the collection that will only execute once. When it executes, we remove the event listener then right away so it no longer happens + ``` + $().one('click',function(){console.log('I was clicked once');}); + ``` + + * @param {String|Object} event + * @param {Function} [callback] + * @return appframework object + * @title $().one(event,callback); + */ + one(eventHash: {}): appFrameworkCollection; + one(eventName: string, fn: (e: Event) => any): appFrameworkCollection; + + /** + * Delegate an event based off the selector. The event will be registered at the parent level, but executes on the selector. + ``` + $("#div").delegate("p",'click',callback); + ``` + + * @param {String|Array|Object} selector + * @param {String|Object} event + * @param {Function} callback + * @return {Object} appframework object + * @title $().delegate(selector,event,callback) + */ + delegate(selector: any, eventHash: {}): appFrameworkCollection; + delegate(selector: any, eventName: string, fn: (e: Event) => any): appFrameworkCollection; + + /** + * Unbinds events that were registered through delegate. It acts upon the selector and event. If a callback is specified, it will remove that one, otherwise it removes all of them. + ``` + $("#div").undelegate("p",'click',callback);//Undelegates callback for the click event + $("#div").undelegate("p",'click');//Undelegates all click events + ``` + + * @param {String|Array|Object} selector + * @param {String|Object} event + * @param {Function} callback + * @return {Object} appframework object + * @title $().undelegate(selector,event,[callback]); + */ + undelegate(selector: any, eventHash: {}): appFrameworkCollection; + undelegate(selector: any, eventName: string, fn: (e: Event) => any): appFrameworkCollection; + + /** + * Similar to delegate, but the function parameter order is easier to understand. + * If selector is undefined or a function, we just call .bind, otherwise we use .delegate + ``` + $("#div").on("click","p",callback); + ``` + + * @param {String|Array|Object} selector + * @param {String|Object} event + * @param {Function} callback + * @return {Object} appframework object + * @title $().on(event,selector,callback); + */ + on(eventHash: {}, selector?: any): appFrameworkCollection; + on(eventName: string, fn: (e: Event) => any): appFrameworkCollection; + on(eventName: string, selector: string, fn: (e: Event) => any): appFrameworkCollection; + + /** + * Removes event listeners for .on() + * If selector is undefined or a function, we call unbind, otherwise it's undelegate + ``` + $().off("click","p",callback); //Remove callback function for click events + $().off("click","p") //Remove all click events + ``` + + * @param {String|Object} event + * @param {String|Array|Object} selector + * @param {Sunction} callback + * @return {Object} appframework object + * @title $().off(event,selector,[callback]) + */ + off(eventHash: {}, selector?: any): appFrameworkCollection; + off(eventName: string, fn: (e: Event) => any): appFrameworkCollection; + off(eventName: string, selector: string, fn: (e: Event) => any): appFrameworkCollection; + + /** + This triggers an event to be dispatched. Usefull for emulating events, etc. + ``` + $().trigger("click",{foo:'bar'});//Trigger the click event and pass in data + ``` + + * @param {String|Object} event + * @param {Object} [data] + * @return {Object} appframework object + * @title $().trigger(event,data); + */ + trigger(eventName: string, data?: any): appFrameworkCollection; + trigger(eventHash: {}, data?: any): appFrameworkCollection; + + /** + custom events since people want to do $().click instead of $().bind("click") + */ + click(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().keydown instead of $().bind("keydown") + */ + keydown(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().keyup instead of $().bind("keyup") + */ + keyup(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().keypress instead of $().bind("keypress") + */ + keypress(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().submit instead of $().bind("submit") + */ + submit(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().load instead of $().bind("load") + */ + load(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().resize instead of $().bind("resize") + */ + resize(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().change instead of $().bind("change") + */ + change(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().select instead of $().bind("select") + */ + select(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().error instead of $().bind("error") + */ + error(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().focus instead of $().bind("focus") + */ + focus(fn?: (e: Event) => any): appFrameworkCollection; + + /** + custom events since people want to do $().blur instead of $().bind("blur") + */ + blur(fn?: (e: Event) => any): appFrameworkCollection; +} + +interface appFrameworkAjaxSettings { + type?: string; + beforeSend?: (xhr: XMLHttpRequest, settings: appFrameworkAjaxSettings) => boolean; + success?: (data: any, status: string, xhr: XMLHttpRequest) => void; + error?: (xhr: XMLHttpRequest, errorType: string, error: Error) => void; + complete?: (xhr: XMLHttpRequest, status: string) => void; + timeout?: number; + url?: string; + contentType?: string; + headers?: any; + dataType?: string; + data?: any; + context?: any; + crossDomain?: boolean; +} + +interface appFrameworkCssMatrix { + a: number; + b: number; + c: number; + d: number; + e: number; + f: number; +} + +declare var af: (fn: ($: appFrameworkStatic) => void) => void; +declare var $: appFrameworkStatic; From 19c342764598a34f7587a62b74685d1efba8a89a Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Sat, 28 Sep 2013 17:34:48 -0400 Subject: [PATCH 004/150] Fix noImplicitAny errors in chai-assert.d.ts * assuming void for all return types --- chai/chai-assert.d.ts | 138 +++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/chai/chai-assert.d.ts b/chai/chai-assert.d.ts index 7cd5e3d48b..b8845bc6b8 100644 --- a/chai/chai-assert.d.ts +++ b/chai/chai-assert.d.ts @@ -7,108 +7,108 @@ declare module chai { interface Assert { - (express:any, msg?:string); + (express:any, msg?:string):void; - fail(actual?:any, expected?:any, msg?:string, operator?:string); + fail(actual?:any, expected?:any, msg?:string, operator?:string):void; - ok(val:any, msg?:string); - notOk(val:any, msg?:string); + ok(val:any, msg?:string):void; + notOk(val:any, msg?:string):void; - equal(act:any, exp:any, msg?:string); - notEqual(act:any, exp:any, msg?:string); + equal(act:any, exp:any, msg?:string):void; + notEqual(act:any, exp:any, msg?:string):void; - strictEqual(act:any, exp:any, msg?:string); - notStrictEqual(act:any, exp:any, msg?:string); + strictEqual(act:any, exp:any, msg?:string):void; + notStrictEqual(act:any, exp:any, msg?:string):void; - deepEqual(act:any, exp:any, msg?:string); - notDeepEqual(act:any, exp:any, msg?:string); + deepEqual(act:any, exp:any, msg?:string):void; + notDeepEqual(act:any, exp:any, msg?:string):void; - isTrue(val:any, msg?:string); - isFalse(val:any, msg?:string); + isTrue(val:any, msg?:string):void; + isFalse(val:any, msg?:string):void; - isNull(val:any, msg?:string); - isNotNull(val:any, msg?:string); + isNull(val:any, msg?:string):void; + isNotNull(val:any, msg?:string):void; - isUndefined(val:any, msg?:string); - isDefined(val:any, msg?:string); + isUndefined(val:any, msg?:string):void; + isDefined(val:any, msg?:string):void; - isFunction(val:any, msg?:string); - isNotFunction(val:any, msg?:string); + isFunction(val:any, msg?:string):void; + isNotFunction(val:any, msg?:string):void; - isObject(val:any, msg?:string); - isNotObject(val:any, msg?:string); + isObject(val:any, msg?:string):void; + isNotObject(val:any, msg?:string):void; - isArray(val:any, msg?:string); - isNotArray(val:any, msg?:string); + isArray(val:any, msg?:string):void; + isNotArray(val:any, msg?:string):void; - isString(val:any, msg?:string); - isNotString(val:any, msg?:string); + isString(val:any, msg?:string):void; + isNotString(val:any, msg?:string):void; - isNumber(val:any, msg?:string); - isNotNumber(val:any, msg?:string); + isNumber(val:any, msg?:string):void; + isNotNumber(val:any, msg?:string):void; - isBoolean(val:any, msg?:string); - isNotBoolean(val:any, msg?:string); + isBoolean(val:any, msg?:string):void; + isNotBoolean(val:any, msg?:string):void; - typeOf(val:any, type:string, msg?:string); - notTypeOf(val:any, type:string, msg?:string); + typeOf(val:any, type:string, msg?:string):void; + notTypeOf(val:any, type:string, msg?:string):void; - instanceOf(val:any, type:Function, msg?:string); - notInstanceOf(val:any, type:Function, msg?:string); + instanceOf(val:any, type:Function, msg?:string):void; + notInstanceOf(val:any, type:Function, msg?:string):void; - include(exp:string, inc:any, msg?:string); - include(exp:any[], inc:any, msg?:string); + include(exp:string, inc:any, msg?:string):void; + include(exp:any[], inc:any, msg?:string):void; - notInclude(exp:string, inc:any, msg?:string); - notInclude(exp:any[], inc:any, msg?:string); + notInclude(exp:string, inc:any, msg?:string):void; + notInclude(exp:any[], inc:any, msg?:string):void; - match(exp:any, re:RegExp, msg?:string); - notMatch(exp:any, re:RegExp, msg?:string); + match(exp:any, re:RegExp, msg?:string):void; + notMatch(exp:any, re:RegExp, msg?:string):void; - property(obj:Object, prop:string, msg?:string); - notProperty(obj:Object, prop:string, msg?:string); - deepProperty(obj:Object, prop:string, msg?:string); - notDeepProperty(obj:Object, prop:string, msg?:string); + property(obj:Object, prop:string, msg?:string):void; + notProperty(obj:Object, prop:string, msg?:string):void; + deepProperty(obj:Object, prop:string, msg?:string):void; + notDeepProperty(obj:Object, prop:string, msg?:string):void; - propertyVal(obj:Object, prop:string, val:any, msg?:string); - propertyNotVal(obj:Object, prop:string, val:any, msg?:string); + propertyVal(obj:Object, prop:string, val:any, msg?:string):void; + propertyNotVal(obj:Object, prop:string, val:any, msg?:string):void; - deepPropertyVal(obj:Object, prop:string, val:any, msg?:string); - deepPropertyNotVal(obj:Object, prop:string, val:any, msg?:string); + deepPropertyVal(obj:Object, prop:string, val:any, msg?:string):void; + deepPropertyNotVal(obj:Object, prop:string, val:any, msg?:string):void; - lengthOf(exp:any, len:number, msg?:string); + lengthOf(exp:any, len:number, msg?:string):void; //alias frenzy - throw(fn:Function, msg?:string); - throw(fn:Function, regExp:RegExp); - throw(fn:Function, errType:Function, msg?:string); - throw(fn:Function, errType:Function, regExp:RegExp); + throw(fn:Function, msg?:string):void; + throw(fn:Function, regExp:RegExp):void; + throw(fn:Function, errType:Function, msg?:string):void; + throw(fn:Function, errType:Function, regExp:RegExp):void; - throws(fn:Function, msg?:string); - throws(fn:Function, regExp:RegExp); - throws(fn:Function, errType:Function, msg?:string); - throws(fn:Function, errType:Function, regExp:RegExp); + throws(fn:Function, msg?:string):void; + throws(fn:Function, regExp:RegExp):void; + throws(fn:Function, errType:Function, msg?:string):void; + throws(fn:Function, errType:Function, regExp:RegExp):void; - Throw(fn:Function, msg?:string); - Throw(fn:Function, regExp:RegExp); - Throw(fn:Function, errType:Function, msg?:string); - Throw(fn:Function, errType:Function, regExp:RegExp); + Throw(fn:Function, msg?:string):void; + Throw(fn:Function, regExp:RegExp):void; + Throw(fn:Function, errType:Function, msg?:string):void; + Throw(fn:Function, errType:Function, regExp:RegExp):void; - doesNotThrow(fn:Function, msg?:string); - doesNotThrow(fn:Function, regExp:RegExp); - doesNotThrow(fn:Function, errType:Function, msg?:string); - doesNotThrow(fn:Function, errType:Function, regExp:RegExp); + doesNotThrow(fn:Function, msg?:string):void; + doesNotThrow(fn:Function, regExp:RegExp):void; + doesNotThrow(fn:Function, errType:Function, msg?:string):void; + doesNotThrow(fn:Function, errType:Function, regExp:RegExp):void; - operator(val:any, operator:string, val2:any, msg?:string); - closeTo(act:number, exp:number, delta:number, msg?:string); + operator(val:any, operator:string, val2:any, msg?:string):void; + closeTo(act:number, exp:number, delta:number, msg?:string):void; - sameMembers(set1:any[], set2:any[], msg?:string); - includeMembers(set1:any[], set2:any[], msg?:string); + sameMembers(set1:any[], set2:any[], msg?:string):void; + includeMembers(set1:any[], set2:any[], msg?:string):void; - ifError(val:any, msg?:string); + ifError(val:any, msg?:string):void; } //node module var assert:Assert; } //browser global -declare var assert:chai.Assert; \ No newline at end of file +declare var assert:chai.Assert; From 31c7908e57c01e04acfcb744eba67ed793fb2c12 Mon Sep 17 00:00:00 2001 From: Adam Lay Date: Mon, 30 Sep 2013 23:08:15 +0100 Subject: [PATCH 005/150] Adding Chrome App Definitions Includes definitions for app.runtime and app.window. --- chrome/chrome.d.ts | 93 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 3a01db6c1c..1aa91a2de5 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -2,6 +2,8 @@ // Project: http://developer.chrome.com/extensions/ // Definitions by: Matthew Kimber // Definitions: https://github.com/borisyankov/DefinitelyTyped +// Chrome App: http://developer.chrome.com/apps/api_index.html +// Definitions: Adam Lay //////////////////// // Alarms @@ -34,6 +36,97 @@ declare module chrome.alarms { var onAlarm: AlarmEvent; } +//////////////////// +// App Runtime +//////////////////// +declare module chrome.app.runtime { + interface LaunchData { + id?: string; + items?: LaunchDataItem[]; + url?: string; + referrerUrl?: string; + isKioskSession?: boolean; + } + + interface LaunchDataItem { + entry: File; + type: string; + } + + interface LaunchedEvent { + addListener(callback: (launchData: LaunchData) => void); + } + + interface RestartedEvent { + addListener(callback: () => void); + } + + var onLaunched: LaunchedEvent; + var onRestarted: RestartedEvent; +} + +//////////////////// +// App Window +//////////////////// +declare module chrome.app.window { + interface Bounds { + left?: number; + top?: number; + width?: number; + height?: number; + } + + interface AppWindow { + focus: () => void; + fullscreen: () => void; + isFullscreen: () => boolean; + minimize: () => void; + isMinimized: () => boolean; + maximize: () => void; + isMaximized: () => boolean; + restore: () => void; + moveTo: (left: number, top: number) => void; + resizeTo: (width: number, height: number) => void; + drawAttention: () => void; + clearAttention: () => void; + close: () => void; + show: () => void; + hide: () => void; + getBounds: () => Bounds; + setBounds: (bounds: Bounds) => void; + contentWindow: Window; + } + + interface CreateOptions { + id?: string; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + frame?: string; // "none", "chrome" + bounds?: Bounds; + transparentBackground?: boolean; + state?: string; // "normal", "fullscreen", "maximized", "minimized" + hidden?: boolean; + resizable?: boolean; + singleton?: boolean; + } + + export function create(url: string, options?: CreateOptions, callback?: (created_window: AppWindow) => void): void; + export function current(): AppWindow; + + interface WindowEvent { + addListener(callback: () => void): void; + } + + var onBoundsChanged: WindowEvent; + var onClosed: WindowEvent; + var onFullscreened: WindowEvent; + var onMaximized: WindowEvent; + var onMinimized: WindowEvent; + var onRestored: WindowEvent; +} + //////////////////// // Bookmarks //////////////////// From 60a1057fbfeb2d5d9f9d2c70cc9e5bc127467056 Mon Sep 17 00:00:00 2001 From: Adam Lay Date: Mon, 30 Sep 2013 23:25:57 +0100 Subject: [PATCH 006/150] Adding Chrome App Definitions Adding Chrome packaged application definitions. --- chrome/chrome-app.d.ts | 95 ++++++++++++++++++++++++++++++++++++++++++ chrome/chrome.d.ts | 93 ----------------------------------------- 2 files changed, 95 insertions(+), 93 deletions(-) create mode 100644 chrome/chrome-app.d.ts diff --git a/chrome/chrome-app.d.ts b/chrome/chrome-app.d.ts new file mode 100644 index 0000000000..c8dd2e6d46 --- /dev/null +++ b/chrome/chrome-app.d.ts @@ -0,0 +1,95 @@ +// Type definitions for Chrome packaged application development. +// Project: http://developer.chrome.com/apps/ +// Definitions by: Adam Lay +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +//////////////////// +// App Runtime +//////////////////// +declare module chrome.app.runtime { + interface LaunchData { + id?: string; + items?: LaunchDataItem[]; + url?: string; + referrerUrl?: string; + isKioskSession?: boolean; + } + + interface LaunchDataItem { + entry: File; + type: string; + } + + interface LaunchedEvent { + addListener(callback: (launchData: LaunchData) => void); + } + + interface RestartedEvent { + addListener(callback: () => void); + } + + var onLaunched: LaunchedEvent; + var onRestarted: RestartedEvent; +} + +//////////////////// +// App Window +//////////////////// +declare module chrome.app.window { + interface Bounds { + left?: number; + top?: number; + width?: number; + height?: number; + } + + interface AppWindow { + focus: () => void; + fullscreen: () => void; + isFullscreen: () => boolean; + minimize: () => void; + isMinimized: () => boolean; + maximize: () => void; + isMaximized: () => boolean; + restore: () => void; + moveTo: (left: number, top: number) => void; + resizeTo: (width: number, height: number) => void; + drawAttention: () => void; + clearAttention: () => void; + close: () => void; + show: () => void; + hide: () => void; + getBounds: () => Bounds; + setBounds: (bounds: Bounds) => void; + contentWindow: Window; + } + + interface CreateOptions { + id?: string; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + frame?: string; // "none", "chrome" + bounds?: Bounds; + transparentBackground?: boolean; + state?: string; // "normal", "fullscreen", "maximized", "minimized" + hidden?: boolean; + resizable?: boolean; + singleton?: boolean; + } + + export function create(url: string, options?: CreateOptions, callback?: (created_window: AppWindow) => void): void; + export function current(): AppWindow; + + interface WindowEvent { + addListener(callback: () => void): void; + } + + var onBoundsChanged: WindowEvent; + var onClosed: WindowEvent; + var onFullscreened: WindowEvent; + var onMaximized: WindowEvent; + var onMinimized: WindowEvent; + var onRestored: WindowEvent; +} \ No newline at end of file diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 1aa91a2de5..3a01db6c1c 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -2,8 +2,6 @@ // Project: http://developer.chrome.com/extensions/ // Definitions by: Matthew Kimber // Definitions: https://github.com/borisyankov/DefinitelyTyped -// Chrome App: http://developer.chrome.com/apps/api_index.html -// Definitions: Adam Lay //////////////////// // Alarms @@ -36,97 +34,6 @@ declare module chrome.alarms { var onAlarm: AlarmEvent; } -//////////////////// -// App Runtime -//////////////////// -declare module chrome.app.runtime { - interface LaunchData { - id?: string; - items?: LaunchDataItem[]; - url?: string; - referrerUrl?: string; - isKioskSession?: boolean; - } - - interface LaunchDataItem { - entry: File; - type: string; - } - - interface LaunchedEvent { - addListener(callback: (launchData: LaunchData) => void); - } - - interface RestartedEvent { - addListener(callback: () => void); - } - - var onLaunched: LaunchedEvent; - var onRestarted: RestartedEvent; -} - -//////////////////// -// App Window -//////////////////// -declare module chrome.app.window { - interface Bounds { - left?: number; - top?: number; - width?: number; - height?: number; - } - - interface AppWindow { - focus: () => void; - fullscreen: () => void; - isFullscreen: () => boolean; - minimize: () => void; - isMinimized: () => boolean; - maximize: () => void; - isMaximized: () => boolean; - restore: () => void; - moveTo: (left: number, top: number) => void; - resizeTo: (width: number, height: number) => void; - drawAttention: () => void; - clearAttention: () => void; - close: () => void; - show: () => void; - hide: () => void; - getBounds: () => Bounds; - setBounds: (bounds: Bounds) => void; - contentWindow: Window; - } - - interface CreateOptions { - id?: string; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - frame?: string; // "none", "chrome" - bounds?: Bounds; - transparentBackground?: boolean; - state?: string; // "normal", "fullscreen", "maximized", "minimized" - hidden?: boolean; - resizable?: boolean; - singleton?: boolean; - } - - export function create(url: string, options?: CreateOptions, callback?: (created_window: AppWindow) => void): void; - export function current(): AppWindow; - - interface WindowEvent { - addListener(callback: () => void): void; - } - - var onBoundsChanged: WindowEvent; - var onClosed: WindowEvent; - var onFullscreened: WindowEvent; - var onMaximized: WindowEvent; - var onMinimized: WindowEvent; - var onRestored: WindowEvent; -} - //////////////////// // Bookmarks //////////////////// From 229b4c5211be67b9a70e966eae6de74d23557dff Mon Sep 17 00:00:00 2001 From: Adam Lay Date: Mon, 30 Sep 2013 23:46:02 +0100 Subject: [PATCH 007/150] Added Chrome App Tests Added Chrome app tests file and amended Readme. --- README.md | 1 + chrome/chrome-app-tests.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 chrome/chrome-app-tests.ts diff --git a/README.md b/README.md index 59104d4d55..f67a3bae54 100755 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ List of Definitions * [Cheerio](https://github.com/MatthewMueller/cheerio) (by [Bret Little](https://github.com/blittle)) * [Chosen](http://harvesthq.github.com/chosen/) (by [Boris Yankov](https://github.com/borisyankov)) * [Chrome](http://developer.chrome.com/extensions/) (by [Matthew Kimber](https://github.com/matthewkimber)) +* [Chrome App](http://developer.chrome.com/apps/) (by [Adam Lay](https://github.com/AdamLay)) * [CodeMirror](http://codemirror.net) (by [François de Campredon](https://github.com/fdecampredon)) * [Commander](http://github.com/visionmedia/commander.js) (by [Marcelo Dezem](https://github.com/mdezem)) * [d3.js](http://d3js.org/) (from TypeScript samples) diff --git a/chrome/chrome-app-tests.ts b/chrome/chrome-app-tests.ts new file mode 100644 index 0000000000..0ae0ae2af4 --- /dev/null +++ b/chrome/chrome-app-tests.ts @@ -0,0 +1,27 @@ +/// + +import runtime = chrome.app.runtime; +import cwindow = chrome.app.window; + +var createOptions: cwindow.CreateOptions = { + id: "My Window", + bounds: { + left: 0, + top: 0, + width: 640, + height: 480 + }, + resizable: true +}; + +//Create new window on app launch +chrome.app.runtime.onLaunched.addListener(function (launchData: runtime.LaunchData) { + chrome.app.window.create('app/url', createOptions, function (created_window: cwindow.AppWindow) { + return; + }); +}); + +chrome.app.runtime.onRestarted.addListener(function () { return; }); + +// Get Current Window +var currentWindow: cwindow.AppWindow = chrome.app.window.current(); \ No newline at end of file From 6a57e34602bdef5bc7c8623ef1e56025f18153ff Mon Sep 17 00:00:00 2001 From: Brandon Meyer Date: Mon, 30 Sep 2013 23:55:47 -0500 Subject: [PATCH 008/150] Knockout.Mapper Basic Definitions --- README.md | 1 + knockout.mapper/knockout.mapper.d.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 knockout.mapper/knockout.mapper.d.ts diff --git a/README.md b/README.md index 59104d4d55..3bdc14e4ec 100755 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ List of Definitions * [Knockout.js](http://knockoutjs.com/) (by [Boris Yankov](https://github.com/borisyankov)) * [Knockout.DeferredUpdates](https://github.com/mbest/knockout-deferred-updates) (by [Sebastián Galiano](https://github.com/sgaliano)) * [Knockout.ES5](https://github.com/SteveSanderson/knockout-es5) (by [Sebastián Galiano](https://github.com/sgaliano)) +* [Knockout.Mapper](https://github.com/LucasLorentz/knockout.mapper) (by [Brandon Meyer](https://github.com/BMeyerKC)) * [Knockout.Mapping](https://github.com/SteveSanderson/knockout.mapping) (by [Boris Yankov](https://github.com/borisyankov)) * [Knockout.Postbox](https://github.com/rniemeyer/knockout-postbox) (by [Judah Gabriel](https://github.com/JudahGabriel)) * [Knockout.Validation](https://github.com/ericmbarnard/Knockout-Validation) (by [Dan Ludwig](https://github.com/danludwig)) diff --git a/knockout.mapper/knockout.mapper.d.ts b/knockout.mapper/knockout.mapper.d.ts new file mode 100644 index 0000000000..8052e4cc7e --- /dev/null +++ b/knockout.mapper/knockout.mapper.d.ts @@ -0,0 +1,15 @@ +// Type definitions for Knockout.Mapper +// Project: https://github.com/LucasLorentz/knockout.mapper +// Definitions by: Brandon Meyer +// Definitions https://github.com/borisyankov/DefinitelyTyped + +/// + +interface KnockoutMapper { + fromJS(value: any, options?: any, target?: any, wrap?: boolean): any; + toJS(value: any, options?: any): any; +} + +interface KnockoutStatic { + mapper: KnockoutMapper; +} \ No newline at end of file From 2a1a03c61f2c2b2c0aef43ff9efc53d2bdc0c0e6 Mon Sep 17 00:00:00 2001 From: basarat Date: Tue, 1 Oct 2013 22:27:10 +1000 Subject: [PATCH 009/150] Controller is a valid directive member --- angularjs/angular.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 20439d66c6..1a93d41f70 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -679,6 +679,7 @@ declare module ng { scope?: any; link?: Function; compile?: Function; + controller?: Function; } /////////////////////////////////////////////////////////////////////////// From 2f6ef85160e05cca9e80963c8fc7848cab4fc804 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Tue, 1 Oct 2013 15:00:04 -0400 Subject: [PATCH 010/150] Add missing r, g, b for RGBColor and empty() for Selection --- d3/d3.d.ts | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 48eb0ede93..a9684658b4 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -312,7 +312,7 @@ declare module D3 { }; /** * Request an XML document fragment. - * + * * @param url Url to request * @param callback Function to invoke when resource is loaded or the request fails */ @@ -563,7 +563,7 @@ declare module D3 { (): string; /** * Set the MIME Type for the request - * + * * @param type The MIME type for the request */ (type: string): Xhr; @@ -578,7 +578,7 @@ declare module D3 { (): (xhr: XMLHttpRequest) => any; /** * Set function used to map the response to the associated data value - * + * * @param value The function used to map the response to a data value */ (value: (xhr: XMLHttpRequest) => any): Xhr; @@ -643,7 +643,7 @@ declare module D3 { export interface Dsv { /** * Request a delimited values file - * + * * @param url Url to request * @param callback Function to invoke when resource is loaded or the request fails */ @@ -656,7 +656,7 @@ declare module D3 { parse(string: string): any[]; /** * Parse a delimited string into tuples, ignoring the header row. - * + * * @param string delimited formatted string to parse */ parseRows(string: string, accessor: (row: any[], index: number) => any): any; @@ -709,6 +709,7 @@ declare module D3 { append: (name: string) => Selection; insert: (name: string, before: string) => Selection; remove: () => Selection; + empty: () => boolean; data: { (values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => string): UpdateSelection; @@ -1048,15 +1049,15 @@ declare module D3 { (seperation: (a: GraphNode, b: GraphNode) => number): TreeLayout; }; /** - * Gets or sets the available layout size + * Gets or sets the available layout size */ size: { /** - * Gets the available layout size + * Gets the available layout size */ (): Array; /** - * Sets the available layout size + * Sets the available layout size */ (size: Array): TreeLayout; }; @@ -1335,7 +1336,7 @@ declare module D3 { (size: Array): PackLayout; } } - + export interface TreeMapLayout { sort: { (): (a: GraphNode, b: GraphNode) => number; @@ -1392,6 +1393,18 @@ declare module D3 { } export interface RGBColor extends Color{ + /** + * the red color channel. + */ + r: number; + /** + * the greeb color channel. + */ + g: number; + /** + * the blue color channel. + */ + b: number; /** * convert from RGB to HSL. */ @@ -2011,7 +2024,7 @@ declare module D3 { (defined: (data: any) => any): Area; }; } - + export interface AreaRadial { /** * Generate a piecewise linear area, as in an area chart. @@ -2876,15 +2889,15 @@ declare module D3 { */ stream(object: GeoJSON, listener: any): Stream; /** - * + * */ graticule(): Graticule; /** - * + * */ greatArc: GreatArc; /** - * + * */ rotation(rotation: Array): Rotation; } From 856043d464226e9dfbcad976bd49eb39d64fed67 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 2 Oct 2013 08:41:56 -0500 Subject: [PATCH 011/150] Added WinJS.Binding.Template class I did not add the unusual function `render.value(...)` as I didn't know how to represent that cleanly in TypeScript. --- winjs/winjs.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/winjs/winjs.d.ts b/winjs/winjs.d.ts index fdd39b9d28..c7ae374082 100644 --- a/winjs/winjs.d.ts +++ b/winjs/winjs.d.ts @@ -18,7 +18,7 @@ declare module WinJS { module Binding { function as(data: any): any; class List { - constructor(data: any[]); + constructor(data?: any[]); public push(item: any): any; public indexOf(item: any): number; public splice(start: number, howMany?: number, item?: any[]): any[]; @@ -47,6 +47,20 @@ declare module WinJS { public notifyMutated(index: number); } + class Template { + public element: HTMLElement; + public extractChild: boolean; + public processTimeout: number; + public debugBreakOnRender: boolean; + public disableOptimizedProcessing: boolean; + public isDeclarativeControlContainer: boolean; + public bindingInitializer: any; + + constructor(element: HTMLElement, options?: any); + public render(dataContext: any, container?: HTMLElement): WinJS.Promise; + public renderItem(item: any, recycled?: HTMLElement); + } + } module Namespace { var define: any; From dbcb92dc9685fa0223bad29348ed240a5dd38b70 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 2 Oct 2013 11:25:04 -0500 Subject: [PATCH 012/150] Update win.js to include the Template class --- winjs/winjs.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/winjs/winjs.d.ts b/winjs/winjs.d.ts index c7ae374082..cba248b44a 100644 --- a/winjs/winjs.d.ts +++ b/winjs/winjs.d.ts @@ -56,10 +56,14 @@ declare module WinJS { public isDeclarativeControlContainer: boolean; public bindingInitializer: any; - constructor(element: HTMLElement, options?: any); - public render(dataContext: any, container?: HTMLElement): WinJS.Promise; + constructor(element: HTMLElement, options?: any); + public render: { + (dataContext: any, container?: HTMLElement): WinJS.Promise; + value(href: string, dataContext: any, container?: HTMLElement): WinJS.Promise; + }; public renderItem(item: any, recycled?: HTMLElement); } + } module Namespace { From e7561e2fcac1fc7ea1f9a8aa5542291013693017 Mon Sep 17 00:00:00 2001 From: vvakame Date: Tue, 1 Oct 2013 16:44:33 +0900 Subject: [PATCH 013/150] Added default parameter '--noImplicitAny' to runner.ts --- _infrastructure/tests/runner.js | 2 ++ _infrastructure/tests/runner.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/_infrastructure/tests/runner.js b/_infrastructure/tests/runner.js index 855cffa698..fd926bcb1c 100644 --- a/_infrastructure/tests/runner.js +++ b/_infrastructure/tests/runner.js @@ -586,6 +586,8 @@ var DefinitelyTyped; var command = 'node ./_infrastructure/tests/typescript/tsc.js --module commonjs '; if (IO.fileExists(tsfile + '.tscparams')) { command += '@' + tsfile + '.tscparams'; + } else { + command += '--noImplicitAny'; } Exec.exec(command, [tsfile], function (ExecResult) { callback(ExecResult); diff --git a/_infrastructure/tests/runner.ts b/_infrastructure/tests/runner.ts index bd60ebe7ab..68e5f36bad 100644 --- a/_infrastructure/tests/runner.ts +++ b/_infrastructure/tests/runner.ts @@ -31,6 +31,8 @@ module DefinitelyTyped { var command = 'node ./_infrastructure/tests/typescript/tsc.js --module commonjs '; if (IO.fileExists(tsfile + '.tscparams')) { command += '@' + tsfile + '.tscparams'; + } else { + command += '--noImplicitAny'; } Exec.exec(command, [tsfile], (ExecResult) => { callback(ExecResult); From 3fe1f6bc4eb371e2d893c53127a0585cbd0c680f Mon Sep 17 00:00:00 2001 From: vvakame Date: Tue, 1 Oct 2013 16:46:18 +0900 Subject: [PATCH 014/150] Fixed to CI test passing --- ace/ace.d.ts.tscparams | 0 ace/all-tests.ts.tscparams | 0 ace/tests/ace-anchor-tests.ts.tscparams | 0 ace/tests/ace-background_tokenizer-tests.ts.tscparams | 0 ace/tests/ace-default-tests.ts.tscparams | 0 ace/tests/ace-document-tests.ts.tscparams | 0 ace/tests/ace-edit_session-tests.ts.tscparams | 0 ace/tests/ace-editor1-tests.ts.tscparams | 0 ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams | 0 ace/tests/ace-editor_navigation-tests.ts.tscparams | 0 ace/tests/ace-editor_text_edit-tests.ts.tscparams | 0 ace/tests/ace-multi_select-tests.ts.tscparams | 0 ace/tests/ace-placeholder-tests.ts.tscparams | 0 ace/tests/ace-range-tests.ts.tscparams | 0 ace/tests/ace-range_list-tests.ts.tscparams | 0 ace/tests/ace-search-tests.ts.tscparams | 0 ace/tests/ace-selection-tests.ts.tscparams | 0 ace/tests/ace-token_iterator-tests.ts.tscparams | 0 ace/tests/ace-virtual_renderer-tests.ts.tscparams | 0 amcharts/AmCharts.d.ts.tscparams | 0 amplifyjs/amplifyjs-tests.ts.tscparams | 0 amplifyjs/amplifyjs.d.ts.tscparams | 0 angularjs/angular-scenario.d.ts.tscparams | 0 angularjs/angular-tests.ts.tscparams | 0 arbiter/Arbiter-tests.ts.tscparams | 0 arbiter/Arbiter.d.ts.tscparams | 0 async/async-tests.ts.tscparams | 0 async/async.d.ts.tscparams | 0 async/asyncamd-tests.ts.tscparams | 0 .../AzureMobileServicesClient-tests.ts.tscparams | 0 backbone-relational/backbone-relational-tests.ts.tscparams | 0 backbone-relational/backbone-relational.d.ts.tscparams | 0 backbone/backbone-tests.ts.tscparams | 0 backbone/backbone.d.ts.tscparams | 0 backgrid/backgrid.d.ts.tscparams | 0 bootstrap-notify/bootstrap-notify.d.ts.tscparams | 0 bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams | 0 bootstrap.paginator/bootstrap.paginator.d.ts.tscparams | 0 bootstrap/bootstrap-tests.ts.tscparams | 0 box2d/box2dweb-test.ts.tscparams | 0 box2d/box2dweb.d.ts.tscparams | 0 breeze/breeze-1.0-tests.ts.tscparams | 0 breeze/breeze-1.0.d.ts.tscparams | 0 breeze/breeze-1.2-tests.ts.tscparams | 0 breeze/breeze-1.2.d.ts.tscparams | 0 breeze/breeze-tests.ts.tscparams | 0 breeze/breeze.d.ts.tscparams | 0 browser-harness/browser-harness-tests.ts.tscparams | 0 browser-harness/browser-harness.d.ts.tscparams | 0 browserify/browserify-tests.ts.tscparams | 0 browserify/browserify.d.ts.tscparams | 0 camljs/camljs-tests.ts.tscparams | 0 camljs/camljs.d.ts.tscparams | 0 casperjs/casperjs.d.ts.tscparams | 0 chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams | 0 chai-jquery/chai-jquery-tests.ts.tscparams | 0 chai-jquery/chai-jquery.d.ts.tscparams | 0 chai/chai-assert-tests.ts.tscparams | 0 chai/chai-tests.ts.tscparams | 0 chai/chai.d.ts.tscparams | 0 cheerio/cheerio-tests.ts.tscparams | 0 cheerio/cheerio.d.ts.tscparams | 0 chrome/chrome-tests.ts.tscparams | 0 chrome/chrome.d.ts.tscparams | 0 codemirror/codemirror-tests.ts.tscparams | 0 codemirror/codemirror.d.ts.tscparams | 0 commander/commander-tests.ts.tscparams | 0 convert-source-map/convert-source-map-tests.ts.tscparams | 0 convert-source-map/convert-source-map.d.ts.tscparams | 0 crossroads/crossroads-tests.ts.tscparams | 0 crossroads/crossroads.d.ts.tscparams | 0 d3/d3-tests.ts.tscparams | 0 d3/d3.d.ts.tscparams | 0 d3/plugins/d3.superformula-tests.ts.tscparams | 0 d3/plugins/d3.superformula.d.ts.tscparams | 0 domo/domo-tests.ts.tscparams | 0 dropzone/dropzone.d.ts.tscparams | 0 durandal/durandal-1.x.d.ts.tscparams | 0 durandal/durandal.d.ts.tscparams | 0 dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams | 0 dustjs-linkedin/dustjs-linkedin.d.ts.tscparams | 0 ember/ember-tests.ts.tscparams | 0 ember/ember.d.ts.tscparams | 0 epiceditor/epiceditor-tests.ts.tscparams | 0 epiceditor/epiceditor.d.ts.tscparams | 0 express/express-tests.ts.tscparams | 0 extjs/ExtJS-tests.ts.tscparams | 0 fabricjs/fabricjs-tests.ts.tscparams | 0 fabricjs/fabricjs.d.ts.tscparams | 0 fancybox/fancybox-tests.ts.tscparams | 0 fancybox/fancybox.d.ts.tscparams | 0 firebase/firebase-tests.ts.tscparams | 0 firebase/firebase.d.ts.tscparams | 0 firefox/firefox-tests.ts.tscparams | 0 firefox/firefox.d.ts | 2 +- flexSlider/flexSlider-tests.ts.tscparams | 0 flexSlider/flexSlider.d.ts.tscparams | 0 flot/jquery.flot.d.ts.tscparams | 0 foundation/foundation-tests.ts.tscparams | 0 foundation/foundation.d.ts.tscparams | 0 fullCalendar/fullCalendar-tests.ts.tscparams | 0 gamequery/gamequery-tests.ts.tscparams | 0 gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams | 0 gapi.translate/gapi.translate.d.ts.tscparams | 0 gapi.urlshortener/gapi.urlshortener.d.ts.tscparams | 0 gapi.youtube/gapi.youtube.d.ts.tscparams | 0 gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams | 0 gapi/gapi.d.ts.tscparams | 0 globalize/globalize-tests.ts.tscparams | 0 globalize/globalize.d.ts.tscparams | 0 goJS/goJS-tests.ts.tscparams | 0 goJS/goJS.d.ts.tscparams | 0 google.analytics/ga-tests.ts.tscparams | 0 google.analytics/ga.d.ts.tscparams | 0 handlebars/handlebars-tests.ts.tscparams | 0 handlebars/handlebars.d.ts.tscparams | 0 highcharts/highcharts-tests.ts.tscparams | 0 highcharts/highcharts.d.ts.tscparams | 0 history/history-tests.ts.tscparams | 0 history/history.d.ts.tscparams | 0 humane/humane-tests.ts.tscparams | 0 humane/humane.d.ts.tscparams | 0 i18next/i18next-tests.ts.tscparams | 0 i18next/i18next.d.ts.tscparams | 0 icheck/icheck-tests.ts.tscparams | 0 jake/jake-tests.ts.tscparams | 0 jake/jake.d.ts.tscparams | 0 jasmine-jquery/jasmine-jquery-tests.ts.tscparams | 0 jasmine-jquery/jasmine-jquery.d.ts.tscparams | 0 jasmine-matchers/jasmine-matchers-tests.ts.tscparams | 0 jointjs/jointjs.d.ts.tscparams | 0 jqrangeslider/jqrangeslider-tests.ts.tscparams | 0 jqrangeslider/jqrangeslider.d.ts.tscparams | 0 jquery.address/jquery.address.d.ts.tscparams | 0 jquery.bbq/jquery.bbq-tests.ts.tscparams | 0 jquery.bbq/jquery.bbq.d.ts.tscparams | 0 jquery.colorbox/jquery.colorbox-tests.ts.tscparams | 0 jquery.colorbox/jquery.colorbox.d.ts.tscparams | 0 jquery.contextMenu/jquery.contextMenu.d.ts.tscparams | 0 jquery.cycle/jquery.cycle-tests.ts.tscparams | 0 jquery.dataTables/jquery.dataTables-tests.ts.tscparams | 0 jquery.dynatree/jquery.dynatree.d.ts.tscparams | 0 jquery.jnotify/jquery.jnotify-tests.ts.tscparams | 0 jquery.jnotify/jquery.jnotify.d.ts.tscparams | 0 jquery.noty/jquery.noty.d.ts.tscparams | 0 jquery.payment/jquery.payment.d.ts.tscparams | 0 jquery.pickadate/jquery.pickadate-tests.ts.tscparams | 0 jquery.pickadate/jquery.pickadate.d.ts.tscparams | 0 jquery.timeago/jquery.timeago-tests.ts.tscparams | 0 jquery.timepicker/jquery.timepicker-tests.ts.tscparams | 0 jquery.timepicker/jquery.timepicker.d.ts.tscparams | 0 jquery.ui.layout/jquery.ui.layout.d.ts.tscparams | 0 jquery.validation/jquery.validation-tests.ts.tscparams | 0 jquery.watermark/jquery.watermark-tests.ts.tscparams | 0 jquery/jquery-tests.ts.tscparams | 0 jquerymobile/jquerymobile-tests.ts.tscparams | 0 jquerymobile/jquerymobile.d.ts.tscparams | 0 jqueryui/jqueryui-tests.ts.tscparams | 0 jqueryui/jqueryui.d.ts.tscparams | 0 js-signals/js-signals.d.ts.tscparams | 0 jscrollpane/jscrollpane.d.ts.tscparams | 0 jsdeferred/jsdeferred-tests.ts.tscparams | 0 jsdeferred/jsdeferred.d.ts.tscparams | 0 jsfl/jsfl.d.ts.tscparams | 0 jsfl/xJSFL.d.ts.tscparams | 0 jsoneditoronline/jsoneditoronline-tests.ts.tscparams | 0 jsoneditoronline/jsoneditoronline.d.ts.tscparams | 0 jsplumb/jquery.jsPlumb.d.ts.tscparams | 0 jstorage/jstorage-tests.ts.tscparams | 0 knockback/knockback.d.ts.tscparams | 0 .../knockout.deferred.updates-tests.ts.tscparams | 0 .../knockout.deferred.updates.d.ts.tscparams | 0 knockout.editables/ko.editables.d.ts.tscparams | 0 knockout.es5/knockout.es5-tests.ts.tscparams | 0 knockout.es5/knockout.es5.d.ts.tscparams | 0 knockout.mapping/knockout.mapping.d.ts.tscparams | 0 knockout.postbox/knockout-postbox.d.ts.tscparams | 0 knockout.validation/knockout.validation.d.ts.tscparams | 0 knockout.viewmodel/knockout.viewmodel.d.ts.tscparams | 0 knockout/all-tests.ts.tscparams | 0 knockout/knockout.amd.d.ts.tscparams | 0 knockout/knockout.d.ts.tscparams | 0 knockout/knockoutamd-tests.ts.tscparams | 0 knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams | 0 knockout/tests/knockout-tests.ts.tscparams | 0 kolite/kolite-tests.ts.tscparams | 0 kolite/kolite.d.ts.tscparams | 0 less/less-tests.ts.tscparams | 0 less/less.d.ts.tscparams | 0 levelup/levelup-tests.ts.tscparams | 0 levelup/levelup.d.ts.tscparams | 0 libxmljs/libxmljs-tests.ts.tscparams | 0 libxmljs/libxmljs.d.ts.tscparams | 0 linq/linq-tests.ts.tscparams | 0 linq/linq.3.0.3-Beta4.d.ts.tscparams | 0 linq/linq.d.ts.tscparams | 0 linq/linq.jquery.d.ts.tscparams | 0 marionette/marionette.d.ts.tscparams | 0 meteor/meteor-tests.ts.tscparams | 0 meteor/meteor.d.ts.tscparams | 0 modernizr/modernizr-tests.ts.tscparams | 0 modernizr/modernizr.d.ts.tscparams | 0 mongodb/mongodb-tests.ts.tscparams | 0 mongodb/mongodb.d.ts.tscparams | 0 msnodesql/msnodesql-tests.ts.tscparams | 0 msnodesql/msnodesql.d.ts.tscparams | 0 mustache/mustache-tests.ts.tscparams | 0 mustache/mustache.d.ts.tscparams | 0 noVNC/noVNC-tests.ts.tscparams | 0 noVNC/noVNC.d.ts.tscparams | 0 node-azure/azure-tests.ts.tscparams | 0 node-azure/azure.d.ts.tscparams | 0 node-ffi/node-ffi-tests.ts.tscparams | 0 node-ffi/node-ffi.d.ts.tscparams | 0 node-fibers/node-fibers-tests.ts.tscparams | 0 node-fibers/node-fibers.d.ts.tscparams | 0 node/node-0.8.8.d.ts.tscparams | 0 node_redis/node_redis-tests.ts.tscparams | 0 node_redis/node_redis.d.ts.tscparams | 0 nodemailer/nodemailer-tests.ts.tscparams | 0 nodemailer/nodemailer.d.ts.tscparams | 0 parallel/parallel-tests.ts.tscparams | 0 pdf/pdf-tests.ts.tscparams | 0 pdf/pdf.d.ts.tscparams | 0 persona/persona-tests.ts.tscparams | 0 persona/persona.d.ts.tscparams | 0 phantomjs/phantomjs.d.ts.tscparams | 0 phonegap/phonegap-tests.ts.tscparams | 0 phonegap/phonegap.d.ts.tscparams | 0 pixi/pixi-tests.ts.tscparams | 0 pixi/pixi.d.ts.tscparams | 0 popcorn/popcorn.d.ts.tscparams | 0 pouchDB/pouch-tests.ts.tscparams | 0 pouchDB/pouch.d.ts.tscparams | 0 q/Q-tests.ts.tscparams | 0 q/Q.d.ts.tscparams | 0 qunit/qunit-tests.ts.tscparams | 0 qunit/qunit.d.ts.tscparams | 0 raphael/raphael-tests.ts.tscparams | 0 raphael/raphael.d.ts.tscparams | 0 restangular/restangular-tests.ts.tscparams | 0 restangular/restangular.d.ts.tscparams | 0 restify/restify-tests.ts.tscparams | 0 restify/restify.d.ts.tscparams | 0 reveal/reveal-tests.ts.tscparams | 0 reveal/reveal.d.ts.tscparams | 0 routie/routie.d.ts.tscparams | 0 royalslider/royalslider-tests.ts.tscparams | 0 sammyjs/sammyjs-tests.ts.tscparams | 0 sammyjs/sammyjs.d.ts.tscparams | 0 scroller/scroller-tests.ts.tscparams | 0 select2/select2-tests.ts.tscparams | 0 sharepoint/SharePoint-tests.ts.tscparams | 0 sharepoint/SharePoint.d.ts.tscparams | 0 siesta/siesta-tests.ts.tscparams | 0 siesta/siesta.d.ts.tscparams | 0 signalr/signalr-tests.ts.tscparams | 0 signalr/signalr.d.ts.tscparams | 0 sinon-chai/sinon-chai-tests.ts.tscparams | 0 sinon-chai/sinon-chai.d.ts.tscparams | 0 slickgrid/SlickGrid-tests.ts.tscparams | 0 slickgrid/SlickGrid.d.ts.tscparams | 0 socket.io/socket.io-tests.ts.tscparams | 0 socket.io/socket.io.d.ts.tscparams | 0 soundjs/soundjs-tests.ts.tscparams | 0 soundjs/soundjs.d.ts.tscparams | 0 spin/spin-tests.ts.tscparams | 0 spin/spin.d.ts.tscparams | 0 stripe/stripe.d.ts.tscparams | 0 swiper/swiper-tests.ts.tscparams | 0 swiper/swiper.d.ts.tscparams | 0 swipeview/swipeview-tests.ts.tscparams | 0 teechart/teechart.d.ts.tscparams | 0 threejs/three-r55.d.ts.tscparams | 0 threejs/three.d.ts.tscparams | 0 through/through-tests.ts.tscparams | 0 through/through.d.ts.tscparams | 0 toastr/toastr-tests.ts.tscparams | 0 tweenjs/tweenjs-tests.ts.tscparams | 0 underscore-ko/underscore-ko.d.ts.tscparams | 0 underscore/underscore-tests.ts.tscparams | 0 unity-webapi/unity-webapi-tests.ts.tscparams | 0 unity-webapi/unity-webapi.d.ts.tscparams | 0 urijs/URI.d.ts.tscparams | 0 viewporter/viewporter-tests.ts.tscparams | 0 vimeo/froogaloop.d.ts.tscparams | 0 webaudioapi/waa-nightly.d.ts.tscparams | 0 webaudioapi/waa-tests.ts.tscparams | 0 webaudioapi/waa.d.ts.tscparams | 0 webrtc/MediaStream-tests.ts.tscparams | 0 webrtc/MediaStream.d.ts.tscparams | 0 webrtc/RTCPeerConnection-tests.ts.tscparams | 0 webrtc/RTCPeerConnection.d.ts.tscparams | 0 winjs/winjs.d.ts.tscparams | 0 youtube/youtube.d.ts.tscparams | 0 zepto/zepto-tests.ts.tscparams | 0 zeroclipboard/zeroclipboard.d.ts.tscparams | 0 297 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 ace/ace.d.ts.tscparams create mode 100644 ace/all-tests.ts.tscparams create mode 100644 ace/tests/ace-anchor-tests.ts.tscparams create mode 100644 ace/tests/ace-background_tokenizer-tests.ts.tscparams create mode 100644 ace/tests/ace-default-tests.ts.tscparams create mode 100644 ace/tests/ace-document-tests.ts.tscparams create mode 100644 ace/tests/ace-edit_session-tests.ts.tscparams create mode 100644 ace/tests/ace-editor1-tests.ts.tscparams create mode 100644 ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams create mode 100644 ace/tests/ace-editor_navigation-tests.ts.tscparams create mode 100644 ace/tests/ace-editor_text_edit-tests.ts.tscparams create mode 100644 ace/tests/ace-multi_select-tests.ts.tscparams create mode 100644 ace/tests/ace-placeholder-tests.ts.tscparams create mode 100644 ace/tests/ace-range-tests.ts.tscparams create mode 100644 ace/tests/ace-range_list-tests.ts.tscparams create mode 100644 ace/tests/ace-search-tests.ts.tscparams create mode 100644 ace/tests/ace-selection-tests.ts.tscparams create mode 100644 ace/tests/ace-token_iterator-tests.ts.tscparams create mode 100644 ace/tests/ace-virtual_renderer-tests.ts.tscparams create mode 100644 amcharts/AmCharts.d.ts.tscparams create mode 100644 amplifyjs/amplifyjs-tests.ts.tscparams create mode 100644 amplifyjs/amplifyjs.d.ts.tscparams create mode 100644 angularjs/angular-scenario.d.ts.tscparams create mode 100644 angularjs/angular-tests.ts.tscparams create mode 100644 arbiter/Arbiter-tests.ts.tscparams create mode 100644 arbiter/Arbiter.d.ts.tscparams create mode 100644 async/async-tests.ts.tscparams create mode 100644 async/async.d.ts.tscparams create mode 100644 async/asyncamd-tests.ts.tscparams create mode 100644 azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams create mode 100644 backbone-relational/backbone-relational-tests.ts.tscparams create mode 100644 backbone-relational/backbone-relational.d.ts.tscparams create mode 100644 backbone/backbone-tests.ts.tscparams create mode 100644 backbone/backbone.d.ts.tscparams create mode 100644 backgrid/backgrid.d.ts.tscparams create mode 100644 bootstrap-notify/bootstrap-notify.d.ts.tscparams create mode 100644 bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams create mode 100644 bootstrap.paginator/bootstrap.paginator.d.ts.tscparams create mode 100644 bootstrap/bootstrap-tests.ts.tscparams create mode 100644 box2d/box2dweb-test.ts.tscparams create mode 100644 box2d/box2dweb.d.ts.tscparams create mode 100644 breeze/breeze-1.0-tests.ts.tscparams create mode 100644 breeze/breeze-1.0.d.ts.tscparams create mode 100644 breeze/breeze-1.2-tests.ts.tscparams create mode 100644 breeze/breeze-1.2.d.ts.tscparams create mode 100644 breeze/breeze-tests.ts.tscparams create mode 100644 breeze/breeze.d.ts.tscparams create mode 100644 browser-harness/browser-harness-tests.ts.tscparams create mode 100644 browser-harness/browser-harness.d.ts.tscparams create mode 100644 browserify/browserify-tests.ts.tscparams create mode 100644 browserify/browserify.d.ts.tscparams create mode 100644 camljs/camljs-tests.ts.tscparams create mode 100644 camljs/camljs.d.ts.tscparams create mode 100644 casperjs/casperjs.d.ts.tscparams create mode 100644 chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams create mode 100644 chai-jquery/chai-jquery-tests.ts.tscparams create mode 100644 chai-jquery/chai-jquery.d.ts.tscparams create mode 100644 chai/chai-assert-tests.ts.tscparams create mode 100644 chai/chai-tests.ts.tscparams create mode 100644 chai/chai.d.ts.tscparams create mode 100644 cheerio/cheerio-tests.ts.tscparams create mode 100644 cheerio/cheerio.d.ts.tscparams create mode 100644 chrome/chrome-tests.ts.tscparams create mode 100644 chrome/chrome.d.ts.tscparams create mode 100644 codemirror/codemirror-tests.ts.tscparams create mode 100644 codemirror/codemirror.d.ts.tscparams create mode 100644 commander/commander-tests.ts.tscparams create mode 100644 convert-source-map/convert-source-map-tests.ts.tscparams create mode 100644 convert-source-map/convert-source-map.d.ts.tscparams create mode 100644 crossroads/crossroads-tests.ts.tscparams create mode 100644 crossroads/crossroads.d.ts.tscparams create mode 100644 d3/d3-tests.ts.tscparams create mode 100644 d3/d3.d.ts.tscparams create mode 100644 d3/plugins/d3.superformula-tests.ts.tscparams create mode 100644 d3/plugins/d3.superformula.d.ts.tscparams create mode 100644 domo/domo-tests.ts.tscparams create mode 100644 dropzone/dropzone.d.ts.tscparams create mode 100644 durandal/durandal-1.x.d.ts.tscparams create mode 100644 durandal/durandal.d.ts.tscparams create mode 100644 dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams create mode 100644 dustjs-linkedin/dustjs-linkedin.d.ts.tscparams create mode 100644 ember/ember-tests.ts.tscparams create mode 100644 ember/ember.d.ts.tscparams create mode 100644 epiceditor/epiceditor-tests.ts.tscparams create mode 100644 epiceditor/epiceditor.d.ts.tscparams create mode 100644 express/express-tests.ts.tscparams create mode 100644 extjs/ExtJS-tests.ts.tscparams create mode 100644 fabricjs/fabricjs-tests.ts.tscparams create mode 100644 fabricjs/fabricjs.d.ts.tscparams create mode 100644 fancybox/fancybox-tests.ts.tscparams create mode 100644 fancybox/fancybox.d.ts.tscparams create mode 100644 firebase/firebase-tests.ts.tscparams create mode 100644 firebase/firebase.d.ts.tscparams create mode 100644 firefox/firefox-tests.ts.tscparams create mode 100644 flexSlider/flexSlider-tests.ts.tscparams create mode 100644 flexSlider/flexSlider.d.ts.tscparams create mode 100644 flot/jquery.flot.d.ts.tscparams create mode 100644 foundation/foundation-tests.ts.tscparams create mode 100644 foundation/foundation.d.ts.tscparams create mode 100644 fullCalendar/fullCalendar-tests.ts.tscparams create mode 100644 gamequery/gamequery-tests.ts.tscparams create mode 100644 gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams create mode 100644 gapi.translate/gapi.translate.d.ts.tscparams create mode 100644 gapi.urlshortener/gapi.urlshortener.d.ts.tscparams create mode 100644 gapi.youtube/gapi.youtube.d.ts.tscparams create mode 100644 gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams create mode 100644 gapi/gapi.d.ts.tscparams create mode 100644 globalize/globalize-tests.ts.tscparams create mode 100644 globalize/globalize.d.ts.tscparams create mode 100644 goJS/goJS-tests.ts.tscparams create mode 100644 goJS/goJS.d.ts.tscparams create mode 100644 google.analytics/ga-tests.ts.tscparams create mode 100644 google.analytics/ga.d.ts.tscparams create mode 100644 handlebars/handlebars-tests.ts.tscparams create mode 100644 handlebars/handlebars.d.ts.tscparams create mode 100644 highcharts/highcharts-tests.ts.tscparams create mode 100644 highcharts/highcharts.d.ts.tscparams create mode 100644 history/history-tests.ts.tscparams create mode 100644 history/history.d.ts.tscparams create mode 100644 humane/humane-tests.ts.tscparams create mode 100644 humane/humane.d.ts.tscparams create mode 100644 i18next/i18next-tests.ts.tscparams create mode 100644 i18next/i18next.d.ts.tscparams create mode 100644 icheck/icheck-tests.ts.tscparams create mode 100644 jake/jake-tests.ts.tscparams create mode 100644 jake/jake.d.ts.tscparams create mode 100644 jasmine-jquery/jasmine-jquery-tests.ts.tscparams create mode 100644 jasmine-jquery/jasmine-jquery.d.ts.tscparams create mode 100644 jasmine-matchers/jasmine-matchers-tests.ts.tscparams create mode 100644 jointjs/jointjs.d.ts.tscparams create mode 100644 jqrangeslider/jqrangeslider-tests.ts.tscparams create mode 100644 jqrangeslider/jqrangeslider.d.ts.tscparams create mode 100644 jquery.address/jquery.address.d.ts.tscparams create mode 100644 jquery.bbq/jquery.bbq-tests.ts.tscparams create mode 100644 jquery.bbq/jquery.bbq.d.ts.tscparams create mode 100644 jquery.colorbox/jquery.colorbox-tests.ts.tscparams create mode 100644 jquery.colorbox/jquery.colorbox.d.ts.tscparams create mode 100644 jquery.contextMenu/jquery.contextMenu.d.ts.tscparams create mode 100644 jquery.cycle/jquery.cycle-tests.ts.tscparams create mode 100644 jquery.dataTables/jquery.dataTables-tests.ts.tscparams create mode 100644 jquery.dynatree/jquery.dynatree.d.ts.tscparams create mode 100644 jquery.jnotify/jquery.jnotify-tests.ts.tscparams create mode 100644 jquery.jnotify/jquery.jnotify.d.ts.tscparams create mode 100644 jquery.noty/jquery.noty.d.ts.tscparams create mode 100644 jquery.payment/jquery.payment.d.ts.tscparams create mode 100644 jquery.pickadate/jquery.pickadate-tests.ts.tscparams create mode 100644 jquery.pickadate/jquery.pickadate.d.ts.tscparams create mode 100644 jquery.timeago/jquery.timeago-tests.ts.tscparams create mode 100644 jquery.timepicker/jquery.timepicker-tests.ts.tscparams create mode 100644 jquery.timepicker/jquery.timepicker.d.ts.tscparams create mode 100644 jquery.ui.layout/jquery.ui.layout.d.ts.tscparams create mode 100644 jquery.validation/jquery.validation-tests.ts.tscparams create mode 100644 jquery.watermark/jquery.watermark-tests.ts.tscparams create mode 100644 jquery/jquery-tests.ts.tscparams create mode 100644 jquerymobile/jquerymobile-tests.ts.tscparams create mode 100644 jquerymobile/jquerymobile.d.ts.tscparams create mode 100644 jqueryui/jqueryui-tests.ts.tscparams create mode 100644 jqueryui/jqueryui.d.ts.tscparams create mode 100644 js-signals/js-signals.d.ts.tscparams create mode 100644 jscrollpane/jscrollpane.d.ts.tscparams create mode 100644 jsdeferred/jsdeferred-tests.ts.tscparams create mode 100644 jsdeferred/jsdeferred.d.ts.tscparams create mode 100644 jsfl/jsfl.d.ts.tscparams create mode 100644 jsfl/xJSFL.d.ts.tscparams create mode 100644 jsoneditoronline/jsoneditoronline-tests.ts.tscparams create mode 100644 jsoneditoronline/jsoneditoronline.d.ts.tscparams create mode 100644 jsplumb/jquery.jsPlumb.d.ts.tscparams create mode 100644 jstorage/jstorage-tests.ts.tscparams create mode 100644 knockback/knockback.d.ts.tscparams create mode 100644 knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams create mode 100644 knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams create mode 100644 knockout.editables/ko.editables.d.ts.tscparams create mode 100644 knockout.es5/knockout.es5-tests.ts.tscparams create mode 100644 knockout.es5/knockout.es5.d.ts.tscparams create mode 100644 knockout.mapping/knockout.mapping.d.ts.tscparams create mode 100644 knockout.postbox/knockout-postbox.d.ts.tscparams create mode 100644 knockout.validation/knockout.validation.d.ts.tscparams create mode 100644 knockout.viewmodel/knockout.viewmodel.d.ts.tscparams create mode 100644 knockout/all-tests.ts.tscparams create mode 100644 knockout/knockout.amd.d.ts.tscparams create mode 100644 knockout/knockout.d.ts.tscparams create mode 100644 knockout/knockoutamd-tests.ts.tscparams create mode 100644 knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams create mode 100644 knockout/tests/knockout-tests.ts.tscparams create mode 100644 kolite/kolite-tests.ts.tscparams create mode 100644 kolite/kolite.d.ts.tscparams create mode 100644 less/less-tests.ts.tscparams create mode 100644 less/less.d.ts.tscparams create mode 100644 levelup/levelup-tests.ts.tscparams create mode 100644 levelup/levelup.d.ts.tscparams create mode 100644 libxmljs/libxmljs-tests.ts.tscparams create mode 100644 libxmljs/libxmljs.d.ts.tscparams create mode 100644 linq/linq-tests.ts.tscparams create mode 100644 linq/linq.3.0.3-Beta4.d.ts.tscparams create mode 100644 linq/linq.d.ts.tscparams create mode 100644 linq/linq.jquery.d.ts.tscparams create mode 100644 marionette/marionette.d.ts.tscparams create mode 100644 meteor/meteor-tests.ts.tscparams create mode 100644 meteor/meteor.d.ts.tscparams create mode 100644 modernizr/modernizr-tests.ts.tscparams create mode 100644 modernizr/modernizr.d.ts.tscparams create mode 100644 mongodb/mongodb-tests.ts.tscparams create mode 100644 mongodb/mongodb.d.ts.tscparams create mode 100644 msnodesql/msnodesql-tests.ts.tscparams create mode 100644 msnodesql/msnodesql.d.ts.tscparams create mode 100644 mustache/mustache-tests.ts.tscparams create mode 100644 mustache/mustache.d.ts.tscparams create mode 100644 noVNC/noVNC-tests.ts.tscparams create mode 100644 noVNC/noVNC.d.ts.tscparams create mode 100644 node-azure/azure-tests.ts.tscparams create mode 100644 node-azure/azure.d.ts.tscparams create mode 100644 node-ffi/node-ffi-tests.ts.tscparams create mode 100644 node-ffi/node-ffi.d.ts.tscparams create mode 100644 node-fibers/node-fibers-tests.ts.tscparams create mode 100644 node-fibers/node-fibers.d.ts.tscparams create mode 100644 node/node-0.8.8.d.ts.tscparams create mode 100644 node_redis/node_redis-tests.ts.tscparams create mode 100644 node_redis/node_redis.d.ts.tscparams create mode 100644 nodemailer/nodemailer-tests.ts.tscparams create mode 100644 nodemailer/nodemailer.d.ts.tscparams create mode 100644 parallel/parallel-tests.ts.tscparams create mode 100644 pdf/pdf-tests.ts.tscparams create mode 100644 pdf/pdf.d.ts.tscparams create mode 100644 persona/persona-tests.ts.tscparams create mode 100644 persona/persona.d.ts.tscparams create mode 100644 phantomjs/phantomjs.d.ts.tscparams create mode 100644 phonegap/phonegap-tests.ts.tscparams create mode 100644 phonegap/phonegap.d.ts.tscparams create mode 100644 pixi/pixi-tests.ts.tscparams create mode 100644 pixi/pixi.d.ts.tscparams create mode 100644 popcorn/popcorn.d.ts.tscparams create mode 100644 pouchDB/pouch-tests.ts.tscparams create mode 100644 pouchDB/pouch.d.ts.tscparams create mode 100644 q/Q-tests.ts.tscparams create mode 100644 q/Q.d.ts.tscparams create mode 100644 qunit/qunit-tests.ts.tscparams create mode 100644 qunit/qunit.d.ts.tscparams create mode 100644 raphael/raphael-tests.ts.tscparams create mode 100644 raphael/raphael.d.ts.tscparams create mode 100644 restangular/restangular-tests.ts.tscparams create mode 100644 restangular/restangular.d.ts.tscparams create mode 100644 restify/restify-tests.ts.tscparams create mode 100644 restify/restify.d.ts.tscparams create mode 100644 reveal/reveal-tests.ts.tscparams create mode 100644 reveal/reveal.d.ts.tscparams create mode 100644 routie/routie.d.ts.tscparams create mode 100644 royalslider/royalslider-tests.ts.tscparams create mode 100644 sammyjs/sammyjs-tests.ts.tscparams create mode 100644 sammyjs/sammyjs.d.ts.tscparams create mode 100644 scroller/scroller-tests.ts.tscparams create mode 100644 select2/select2-tests.ts.tscparams create mode 100644 sharepoint/SharePoint-tests.ts.tscparams create mode 100644 sharepoint/SharePoint.d.ts.tscparams create mode 100644 siesta/siesta-tests.ts.tscparams create mode 100644 siesta/siesta.d.ts.tscparams create mode 100644 signalr/signalr-tests.ts.tscparams create mode 100644 signalr/signalr.d.ts.tscparams create mode 100644 sinon-chai/sinon-chai-tests.ts.tscparams create mode 100644 sinon-chai/sinon-chai.d.ts.tscparams create mode 100644 slickgrid/SlickGrid-tests.ts.tscparams create mode 100644 slickgrid/SlickGrid.d.ts.tscparams create mode 100644 socket.io/socket.io-tests.ts.tscparams create mode 100644 socket.io/socket.io.d.ts.tscparams create mode 100644 soundjs/soundjs-tests.ts.tscparams create mode 100644 soundjs/soundjs.d.ts.tscparams create mode 100644 spin/spin-tests.ts.tscparams create mode 100644 spin/spin.d.ts.tscparams create mode 100644 stripe/stripe.d.ts.tscparams create mode 100644 swiper/swiper-tests.ts.tscparams create mode 100644 swiper/swiper.d.ts.tscparams create mode 100644 swipeview/swipeview-tests.ts.tscparams create mode 100644 teechart/teechart.d.ts.tscparams create mode 100644 threejs/three-r55.d.ts.tscparams create mode 100644 threejs/three.d.ts.tscparams create mode 100644 through/through-tests.ts.tscparams create mode 100644 through/through.d.ts.tscparams create mode 100644 toastr/toastr-tests.ts.tscparams create mode 100644 tweenjs/tweenjs-tests.ts.tscparams create mode 100644 underscore-ko/underscore-ko.d.ts.tscparams create mode 100644 underscore/underscore-tests.ts.tscparams create mode 100644 unity-webapi/unity-webapi-tests.ts.tscparams create mode 100644 unity-webapi/unity-webapi.d.ts.tscparams create mode 100644 urijs/URI.d.ts.tscparams create mode 100644 viewporter/viewporter-tests.ts.tscparams create mode 100644 vimeo/froogaloop.d.ts.tscparams create mode 100644 webaudioapi/waa-nightly.d.ts.tscparams create mode 100644 webaudioapi/waa-tests.ts.tscparams create mode 100644 webaudioapi/waa.d.ts.tscparams create mode 100644 webrtc/MediaStream-tests.ts.tscparams create mode 100644 webrtc/MediaStream.d.ts.tscparams create mode 100644 webrtc/RTCPeerConnection-tests.ts.tscparams create mode 100644 webrtc/RTCPeerConnection.d.ts.tscparams create mode 100644 winjs/winjs.d.ts.tscparams create mode 100644 youtube/youtube.d.ts.tscparams create mode 100644 zepto/zepto-tests.ts.tscparams create mode 100644 zeroclipboard/zeroclipboard.d.ts.tscparams diff --git a/ace/ace.d.ts.tscparams b/ace/ace.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/all-tests.ts.tscparams b/ace/all-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-anchor-tests.ts.tscparams b/ace/tests/ace-anchor-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-background_tokenizer-tests.ts.tscparams b/ace/tests/ace-background_tokenizer-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-default-tests.ts.tscparams b/ace/tests/ace-default-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-document-tests.ts.tscparams b/ace/tests/ace-document-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-edit_session-tests.ts.tscparams b/ace/tests/ace-edit_session-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-editor1-tests.ts.tscparams b/ace/tests/ace-editor1-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams b/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-editor_navigation-tests.ts.tscparams b/ace/tests/ace-editor_navigation-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-editor_text_edit-tests.ts.tscparams b/ace/tests/ace-editor_text_edit-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-multi_select-tests.ts.tscparams b/ace/tests/ace-multi_select-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-placeholder-tests.ts.tscparams b/ace/tests/ace-placeholder-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-range-tests.ts.tscparams b/ace/tests/ace-range-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-range_list-tests.ts.tscparams b/ace/tests/ace-range_list-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-search-tests.ts.tscparams b/ace/tests/ace-search-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-selection-tests.ts.tscparams b/ace/tests/ace-selection-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-token_iterator-tests.ts.tscparams b/ace/tests/ace-token_iterator-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ace/tests/ace-virtual_renderer-tests.ts.tscparams b/ace/tests/ace-virtual_renderer-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/amcharts/AmCharts.d.ts.tscparams b/amcharts/AmCharts.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/amplifyjs/amplifyjs-tests.ts.tscparams b/amplifyjs/amplifyjs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/amplifyjs/amplifyjs.d.ts.tscparams b/amplifyjs/amplifyjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/angularjs/angular-scenario.d.ts.tscparams b/angularjs/angular-scenario.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/angularjs/angular-tests.ts.tscparams b/angularjs/angular-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/arbiter/Arbiter-tests.ts.tscparams b/arbiter/Arbiter-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/arbiter/Arbiter.d.ts.tscparams b/arbiter/Arbiter.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/async/async-tests.ts.tscparams b/async/async-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/async/async.d.ts.tscparams b/async/async.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/async/asyncamd-tests.ts.tscparams b/async/asyncamd-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/backbone-relational/backbone-relational-tests.ts.tscparams b/backbone-relational/backbone-relational-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/backbone-relational/backbone-relational.d.ts.tscparams b/backbone-relational/backbone-relational.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/backbone/backbone-tests.ts.tscparams b/backbone/backbone-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/backbone/backbone.d.ts.tscparams b/backbone/backbone.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/backgrid/backgrid.d.ts.tscparams b/backgrid/backgrid.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bootstrap-notify/bootstrap-notify.d.ts.tscparams b/bootstrap-notify/bootstrap-notify.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams b/bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bootstrap/bootstrap-tests.ts.tscparams b/bootstrap/bootstrap-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/box2d/box2dweb-test.ts.tscparams b/box2d/box2dweb-test.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/box2d/box2dweb.d.ts.tscparams b/box2d/box2dweb.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/breeze/breeze-1.0-tests.ts.tscparams b/breeze/breeze-1.0-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/breeze/breeze-1.0.d.ts.tscparams b/breeze/breeze-1.0.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/breeze/breeze-1.2-tests.ts.tscparams b/breeze/breeze-1.2-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/breeze/breeze-1.2.d.ts.tscparams b/breeze/breeze-1.2.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/breeze/breeze-tests.ts.tscparams b/breeze/breeze-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/breeze/breeze.d.ts.tscparams b/breeze/breeze.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/browser-harness/browser-harness-tests.ts.tscparams b/browser-harness/browser-harness-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/browser-harness/browser-harness.d.ts.tscparams b/browser-harness/browser-harness.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/browserify/browserify-tests.ts.tscparams b/browserify/browserify-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/browserify/browserify.d.ts.tscparams b/browserify/browserify.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/camljs/camljs-tests.ts.tscparams b/camljs/camljs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/camljs/camljs.d.ts.tscparams b/camljs/camljs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/casperjs/casperjs.d.ts.tscparams b/casperjs/casperjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams b/chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chai-jquery/chai-jquery-tests.ts.tscparams b/chai-jquery/chai-jquery-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chai-jquery/chai-jquery.d.ts.tscparams b/chai-jquery/chai-jquery.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chai/chai-assert-tests.ts.tscparams b/chai/chai-assert-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chai/chai-tests.ts.tscparams b/chai/chai-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chai/chai.d.ts.tscparams b/chai/chai.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cheerio/cheerio-tests.ts.tscparams b/cheerio/cheerio-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cheerio/cheerio.d.ts.tscparams b/cheerio/cheerio.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chrome/chrome-tests.ts.tscparams b/chrome/chrome-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chrome/chrome.d.ts.tscparams b/chrome/chrome.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/codemirror/codemirror-tests.ts.tscparams b/codemirror/codemirror-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/codemirror/codemirror.d.ts.tscparams b/codemirror/codemirror.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/commander/commander-tests.ts.tscparams b/commander/commander-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/convert-source-map/convert-source-map-tests.ts.tscparams b/convert-source-map/convert-source-map-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/convert-source-map/convert-source-map.d.ts.tscparams b/convert-source-map/convert-source-map.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/crossroads/crossroads-tests.ts.tscparams b/crossroads/crossroads-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/crossroads/crossroads.d.ts.tscparams b/crossroads/crossroads.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/d3/d3-tests.ts.tscparams b/d3/d3-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/d3/d3.d.ts.tscparams b/d3/d3.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/d3/plugins/d3.superformula-tests.ts.tscparams b/d3/plugins/d3.superformula-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/d3/plugins/d3.superformula.d.ts.tscparams b/d3/plugins/d3.superformula.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/domo/domo-tests.ts.tscparams b/domo/domo-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dropzone/dropzone.d.ts.tscparams b/dropzone/dropzone.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/durandal/durandal-1.x.d.ts.tscparams b/durandal/durandal-1.x.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/durandal/durandal.d.ts.tscparams b/durandal/durandal.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams b/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams b/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ember/ember-tests.ts.tscparams b/ember/ember-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ember/ember.d.ts.tscparams b/ember/ember.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epiceditor/epiceditor-tests.ts.tscparams b/epiceditor/epiceditor-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/epiceditor/epiceditor.d.ts.tscparams b/epiceditor/epiceditor.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/express/express-tests.ts.tscparams b/express/express-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/extjs/ExtJS-tests.ts.tscparams b/extjs/ExtJS-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fabricjs/fabricjs-tests.ts.tscparams b/fabricjs/fabricjs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fabricjs/fabricjs.d.ts.tscparams b/fabricjs/fabricjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fancybox/fancybox-tests.ts.tscparams b/fancybox/fancybox-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fancybox/fancybox.d.ts.tscparams b/fancybox/fancybox.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/firebase/firebase-tests.ts.tscparams b/firebase/firebase-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/firebase/firebase.d.ts.tscparams b/firebase/firebase.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/firefox/firefox-tests.ts.tscparams b/firefox/firefox-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/firefox/firefox.d.ts b/firefox/firefox.d.ts index dd052f1a8f..37dacbe951 100644 --- a/firefox/firefox.d.ts +++ b/firefox/firefox.d.ts @@ -33,7 +33,7 @@ interface App { installTime:number; receipts:any[]; - launch(); + launch():void; checkForUpdate():DOMRequest; } diff --git a/flexSlider/flexSlider-tests.ts.tscparams b/flexSlider/flexSlider-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/flexSlider/flexSlider.d.ts.tscparams b/flexSlider/flexSlider.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/flot/jquery.flot.d.ts.tscparams b/flot/jquery.flot.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/foundation/foundation-tests.ts.tscparams b/foundation/foundation-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/foundation/foundation.d.ts.tscparams b/foundation/foundation.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fullCalendar/fullCalendar-tests.ts.tscparams b/fullCalendar/fullCalendar-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gamequery/gamequery-tests.ts.tscparams b/gamequery/gamequery-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams b/gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gapi.translate/gapi.translate.d.ts.tscparams b/gapi.translate/gapi.translate.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gapi.urlshortener/gapi.urlshortener.d.ts.tscparams b/gapi.urlshortener/gapi.urlshortener.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gapi.youtube/gapi.youtube.d.ts.tscparams b/gapi.youtube/gapi.youtube.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams b/gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gapi/gapi.d.ts.tscparams b/gapi/gapi.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/globalize/globalize-tests.ts.tscparams b/globalize/globalize-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/globalize/globalize.d.ts.tscparams b/globalize/globalize.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/goJS/goJS-tests.ts.tscparams b/goJS/goJS-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/goJS/goJS.d.ts.tscparams b/goJS/goJS.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/google.analytics/ga-tests.ts.tscparams b/google.analytics/ga-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/google.analytics/ga.d.ts.tscparams b/google.analytics/ga.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/handlebars/handlebars-tests.ts.tscparams b/handlebars/handlebars-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/handlebars/handlebars.d.ts.tscparams b/handlebars/handlebars.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/highcharts/highcharts-tests.ts.tscparams b/highcharts/highcharts-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/highcharts/highcharts.d.ts.tscparams b/highcharts/highcharts.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/history/history-tests.ts.tscparams b/history/history-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/history/history.d.ts.tscparams b/history/history.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/humane/humane-tests.ts.tscparams b/humane/humane-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/humane/humane.d.ts.tscparams b/humane/humane.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/i18next/i18next-tests.ts.tscparams b/i18next/i18next-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/i18next/i18next.d.ts.tscparams b/i18next/i18next.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/icheck/icheck-tests.ts.tscparams b/icheck/icheck-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jake/jake-tests.ts.tscparams b/jake/jake-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jake/jake.d.ts.tscparams b/jake/jake.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jasmine-jquery/jasmine-jquery-tests.ts.tscparams b/jasmine-jquery/jasmine-jquery-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jasmine-jquery/jasmine-jquery.d.ts.tscparams b/jasmine-jquery/jasmine-jquery.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jasmine-matchers/jasmine-matchers-tests.ts.tscparams b/jasmine-matchers/jasmine-matchers-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jointjs/jointjs.d.ts.tscparams b/jointjs/jointjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jqrangeslider/jqrangeslider-tests.ts.tscparams b/jqrangeslider/jqrangeslider-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jqrangeslider/jqrangeslider.d.ts.tscparams b/jqrangeslider/jqrangeslider.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.address/jquery.address.d.ts.tscparams b/jquery.address/jquery.address.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.bbq/jquery.bbq-tests.ts.tscparams b/jquery.bbq/jquery.bbq-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.bbq/jquery.bbq.d.ts.tscparams b/jquery.bbq/jquery.bbq.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.colorbox/jquery.colorbox-tests.ts.tscparams b/jquery.colorbox/jquery.colorbox-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.colorbox/jquery.colorbox.d.ts.tscparams b/jquery.colorbox/jquery.colorbox.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams b/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.cycle/jquery.cycle-tests.ts.tscparams b/jquery.cycle/jquery.cycle-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.dataTables/jquery.dataTables-tests.ts.tscparams b/jquery.dataTables/jquery.dataTables-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.dynatree/jquery.dynatree.d.ts.tscparams b/jquery.dynatree/jquery.dynatree.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.jnotify/jquery.jnotify-tests.ts.tscparams b/jquery.jnotify/jquery.jnotify-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.jnotify/jquery.jnotify.d.ts.tscparams b/jquery.jnotify/jquery.jnotify.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.noty/jquery.noty.d.ts.tscparams b/jquery.noty/jquery.noty.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.payment/jquery.payment.d.ts.tscparams b/jquery.payment/jquery.payment.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.pickadate/jquery.pickadate-tests.ts.tscparams b/jquery.pickadate/jquery.pickadate-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.pickadate/jquery.pickadate.d.ts.tscparams b/jquery.pickadate/jquery.pickadate.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.timeago/jquery.timeago-tests.ts.tscparams b/jquery.timeago/jquery.timeago-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.timepicker/jquery.timepicker-tests.ts.tscparams b/jquery.timepicker/jquery.timepicker-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.timepicker/jquery.timepicker.d.ts.tscparams b/jquery.timepicker/jquery.timepicker.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams b/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.validation/jquery.validation-tests.ts.tscparams b/jquery.validation/jquery.validation-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery.watermark/jquery.watermark-tests.ts.tscparams b/jquery.watermark/jquery.watermark-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquery/jquery-tests.ts.tscparams b/jquery/jquery-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquerymobile/jquerymobile-tests.ts.tscparams b/jquerymobile/jquerymobile-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jquerymobile/jquerymobile.d.ts.tscparams b/jquerymobile/jquerymobile.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jqueryui/jqueryui-tests.ts.tscparams b/jqueryui/jqueryui-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jqueryui/jqueryui.d.ts.tscparams b/jqueryui/jqueryui.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/js-signals/js-signals.d.ts.tscparams b/js-signals/js-signals.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jscrollpane/jscrollpane.d.ts.tscparams b/jscrollpane/jscrollpane.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsdeferred/jsdeferred-tests.ts.tscparams b/jsdeferred/jsdeferred-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsdeferred/jsdeferred.d.ts.tscparams b/jsdeferred/jsdeferred.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsfl/jsfl.d.ts.tscparams b/jsfl/jsfl.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsfl/xJSFL.d.ts.tscparams b/jsfl/xJSFL.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsoneditoronline/jsoneditoronline-tests.ts.tscparams b/jsoneditoronline/jsoneditoronline-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsoneditoronline/jsoneditoronline.d.ts.tscparams b/jsoneditoronline/jsoneditoronline.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jsplumb/jquery.jsPlumb.d.ts.tscparams b/jsplumb/jquery.jsPlumb.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/jstorage/jstorage-tests.ts.tscparams b/jstorage/jstorage-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockback/knockback.d.ts.tscparams b/knockback/knockback.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.editables/ko.editables.d.ts.tscparams b/knockout.editables/ko.editables.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.es5/knockout.es5-tests.ts.tscparams b/knockout.es5/knockout.es5-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.es5/knockout.es5.d.ts.tscparams b/knockout.es5/knockout.es5.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.mapping/knockout.mapping.d.ts.tscparams b/knockout.mapping/knockout.mapping.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.postbox/knockout-postbox.d.ts.tscparams b/knockout.postbox/knockout-postbox.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.validation/knockout.validation.d.ts.tscparams b/knockout.validation/knockout.validation.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams b/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout/all-tests.ts.tscparams b/knockout/all-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout/knockout.amd.d.ts.tscparams b/knockout/knockout.amd.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout/knockout.d.ts.tscparams b/knockout/knockout.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout/knockoutamd-tests.ts.tscparams b/knockout/knockoutamd-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams b/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/knockout/tests/knockout-tests.ts.tscparams b/knockout/tests/knockout-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/kolite/kolite-tests.ts.tscparams b/kolite/kolite-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/kolite/kolite.d.ts.tscparams b/kolite/kolite.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/less/less-tests.ts.tscparams b/less/less-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/less/less.d.ts.tscparams b/less/less.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/levelup/levelup-tests.ts.tscparams b/levelup/levelup-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/levelup/levelup.d.ts.tscparams b/levelup/levelup.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libxmljs/libxmljs-tests.ts.tscparams b/libxmljs/libxmljs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libxmljs/libxmljs.d.ts.tscparams b/libxmljs/libxmljs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/linq/linq-tests.ts.tscparams b/linq/linq-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/linq/linq.3.0.3-Beta4.d.ts.tscparams b/linq/linq.3.0.3-Beta4.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/linq/linq.d.ts.tscparams b/linq/linq.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/linq/linq.jquery.d.ts.tscparams b/linq/linq.jquery.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/marionette/marionette.d.ts.tscparams b/marionette/marionette.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/meteor/meteor-tests.ts.tscparams b/meteor/meteor-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/meteor/meteor.d.ts.tscparams b/meteor/meteor.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modernizr/modernizr-tests.ts.tscparams b/modernizr/modernizr-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modernizr/modernizr.d.ts.tscparams b/modernizr/modernizr.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mongodb/mongodb-tests.ts.tscparams b/mongodb/mongodb-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mongodb/mongodb.d.ts.tscparams b/mongodb/mongodb.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/msnodesql/msnodesql-tests.ts.tscparams b/msnodesql/msnodesql-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/msnodesql/msnodesql.d.ts.tscparams b/msnodesql/msnodesql.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mustache/mustache-tests.ts.tscparams b/mustache/mustache-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mustache/mustache.d.ts.tscparams b/mustache/mustache.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/noVNC/noVNC-tests.ts.tscparams b/noVNC/noVNC-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/noVNC/noVNC.d.ts.tscparams b/noVNC/noVNC.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node-azure/azure-tests.ts.tscparams b/node-azure/azure-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node-azure/azure.d.ts.tscparams b/node-azure/azure.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node-ffi/node-ffi-tests.ts.tscparams b/node-ffi/node-ffi-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node-ffi/node-ffi.d.ts.tscparams b/node-ffi/node-ffi.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node-fibers/node-fibers-tests.ts.tscparams b/node-fibers/node-fibers-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node-fibers/node-fibers.d.ts.tscparams b/node-fibers/node-fibers.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node/node-0.8.8.d.ts.tscparams b/node/node-0.8.8.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node_redis/node_redis-tests.ts.tscparams b/node_redis/node_redis-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/node_redis/node_redis.d.ts.tscparams b/node_redis/node_redis.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nodemailer/nodemailer-tests.ts.tscparams b/nodemailer/nodemailer-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nodemailer/nodemailer.d.ts.tscparams b/nodemailer/nodemailer.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/parallel/parallel-tests.ts.tscparams b/parallel/parallel-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pdf/pdf-tests.ts.tscparams b/pdf/pdf-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pdf/pdf.d.ts.tscparams b/pdf/pdf.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/persona/persona-tests.ts.tscparams b/persona/persona-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/persona/persona.d.ts.tscparams b/persona/persona.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phantomjs/phantomjs.d.ts.tscparams b/phantomjs/phantomjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phonegap/phonegap-tests.ts.tscparams b/phonegap/phonegap-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phonegap/phonegap.d.ts.tscparams b/phonegap/phonegap.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pixi/pixi-tests.ts.tscparams b/pixi/pixi-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pixi/pixi.d.ts.tscparams b/pixi/pixi.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/popcorn/popcorn.d.ts.tscparams b/popcorn/popcorn.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pouchDB/pouch-tests.ts.tscparams b/pouchDB/pouch-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pouchDB/pouch.d.ts.tscparams b/pouchDB/pouch.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/q/Q-tests.ts.tscparams b/q/Q-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/q/Q.d.ts.tscparams b/q/Q.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/qunit/qunit-tests.ts.tscparams b/qunit/qunit-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/qunit/qunit.d.ts.tscparams b/qunit/qunit.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/raphael/raphael-tests.ts.tscparams b/raphael/raphael-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/raphael/raphael.d.ts.tscparams b/raphael/raphael.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/restangular/restangular-tests.ts.tscparams b/restangular/restangular-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/restangular/restangular.d.ts.tscparams b/restangular/restangular.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/restify/restify-tests.ts.tscparams b/restify/restify-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/restify/restify.d.ts.tscparams b/restify/restify.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/reveal/reveal-tests.ts.tscparams b/reveal/reveal-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/reveal/reveal.d.ts.tscparams b/reveal/reveal.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/routie/routie.d.ts.tscparams b/routie/routie.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/royalslider/royalslider-tests.ts.tscparams b/royalslider/royalslider-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sammyjs/sammyjs-tests.ts.tscparams b/sammyjs/sammyjs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sammyjs/sammyjs.d.ts.tscparams b/sammyjs/sammyjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scroller/scroller-tests.ts.tscparams b/scroller/scroller-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/select2/select2-tests.ts.tscparams b/select2/select2-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sharepoint/SharePoint-tests.ts.tscparams b/sharepoint/SharePoint-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sharepoint/SharePoint.d.ts.tscparams b/sharepoint/SharePoint.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/siesta/siesta-tests.ts.tscparams b/siesta/siesta-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/siesta/siesta.d.ts.tscparams b/siesta/siesta.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/signalr/signalr-tests.ts.tscparams b/signalr/signalr-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/signalr/signalr.d.ts.tscparams b/signalr/signalr.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sinon-chai/sinon-chai-tests.ts.tscparams b/sinon-chai/sinon-chai-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sinon-chai/sinon-chai.d.ts.tscparams b/sinon-chai/sinon-chai.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/slickgrid/SlickGrid-tests.ts.tscparams b/slickgrid/SlickGrid-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/slickgrid/SlickGrid.d.ts.tscparams b/slickgrid/SlickGrid.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/socket.io/socket.io-tests.ts.tscparams b/socket.io/socket.io-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/socket.io/socket.io.d.ts.tscparams b/socket.io/socket.io.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/soundjs/soundjs-tests.ts.tscparams b/soundjs/soundjs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/soundjs/soundjs.d.ts.tscparams b/soundjs/soundjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spin/spin-tests.ts.tscparams b/spin/spin-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spin/spin.d.ts.tscparams b/spin/spin.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stripe/stripe.d.ts.tscparams b/stripe/stripe.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/swiper/swiper-tests.ts.tscparams b/swiper/swiper-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/swiper/swiper.d.ts.tscparams b/swiper/swiper.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/swipeview/swipeview-tests.ts.tscparams b/swipeview/swipeview-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/teechart/teechart.d.ts.tscparams b/teechart/teechart.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/threejs/three-r55.d.ts.tscparams b/threejs/three-r55.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/threejs/three.d.ts.tscparams b/threejs/three.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/through/through-tests.ts.tscparams b/through/through-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/through/through.d.ts.tscparams b/through/through.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/toastr/toastr-tests.ts.tscparams b/toastr/toastr-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tweenjs/tweenjs-tests.ts.tscparams b/tweenjs/tweenjs-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/underscore-ko/underscore-ko.d.ts.tscparams b/underscore-ko/underscore-ko.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/underscore/underscore-tests.ts.tscparams b/underscore/underscore-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/unity-webapi/unity-webapi-tests.ts.tscparams b/unity-webapi/unity-webapi-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/unity-webapi/unity-webapi.d.ts.tscparams b/unity-webapi/unity-webapi.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/urijs/URI.d.ts.tscparams b/urijs/URI.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/viewporter/viewporter-tests.ts.tscparams b/viewporter/viewporter-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vimeo/froogaloop.d.ts.tscparams b/vimeo/froogaloop.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webaudioapi/waa-nightly.d.ts.tscparams b/webaudioapi/waa-nightly.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webaudioapi/waa-tests.ts.tscparams b/webaudioapi/waa-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webaudioapi/waa.d.ts.tscparams b/webaudioapi/waa.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webrtc/MediaStream-tests.ts.tscparams b/webrtc/MediaStream-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webrtc/MediaStream.d.ts.tscparams b/webrtc/MediaStream.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webrtc/RTCPeerConnection-tests.ts.tscparams b/webrtc/RTCPeerConnection-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/webrtc/RTCPeerConnection.d.ts.tscparams b/webrtc/RTCPeerConnection.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/winjs/winjs.d.ts.tscparams b/winjs/winjs.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/youtube/youtube.d.ts.tscparams b/youtube/youtube.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/zepto/zepto-tests.ts.tscparams b/zepto/zepto-tests.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 diff --git a/zeroclipboard/zeroclipboard.d.ts.tscparams b/zeroclipboard/zeroclipboard.d.ts.tscparams new file mode 100644 index 0000000000..e69de29bb2 From 7de857e379871416c426428810aac259f26ca5f2 Mon Sep 17 00:00:00 2001 From: golear Date: Wed, 2 Oct 2013 21:00:01 -0500 Subject: [PATCH 015/150] Added mouseMoveOutside to Stage class Stage.mouseMoveOutside was missing. Added it. --- easeljs/easeljs.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easeljs/easeljs.d.ts b/easeljs/easeljs.d.ts index b32d860d64..bf61a1402d 100644 --- a/easeljs/easeljs.d.ts +++ b/easeljs/easeljs.d.ts @@ -600,7 +600,8 @@ declare module createjs { mouseY: number; snapToPixelEnabled: boolean; tickOnUpdate: boolean; - + mouseMoveOutside: boolean; + new (): Stage; new (canvas: HTMLElement): Stage; From 4b087f54e5e8f4c57eee0d282b5e84d670d8eca8 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Wed, 2 Oct 2013 22:02:30 -0400 Subject: [PATCH 016/150] Fix noImplicitAny in zeroclipboard.d.ts * checked all of these against the source code, they should all be correct (no assumptions about return types this time :) --- zeroclipboard/zeroclipboard.d.ts | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/zeroclipboard/zeroclipboard.d.ts b/zeroclipboard/zeroclipboard.d.ts index c059d47eb6..f950487004 100644 --- a/zeroclipboard/zeroclipboard.d.ts +++ b/zeroclipboard/zeroclipboard.d.ts @@ -6,31 +6,31 @@ declare class ZeroClipboard { constructor(elements?: any, options?: ZeroClipboardOptions); - setCurrent(element: any); - setText(newText: string); - setTitle(newTitle: string); - setSize(width: number, height: number); - setHandCursor(enabled: boolean); + setCurrent(element: any): void; + setText(newText: string): void; + setTitle(newTitle: string): void; + setSize(width: number, height: number): void; + setHandCursor(enabled: boolean): void; version: string; moviePath: string; trustedDomains: any; text: string; hoverClass: string; activeClass: string; - resetBridge(); + resetBridge(): void; ready: boolean; - reposition(); - on(eventName, func); - addEventListener(eventName: string, func); - off(eventName: string, func); - removeEventListener(eventName: string, func); - receiveEvent(eventName: string, args); - glue(elements: any); - unglue(elements: any); - static setDefaults(options: ZeroClipboardOptions); - static destroy(); + reposition(): void; // returns false in some scenarios, but never returns true + on(eventName: string, func: Function): void; + addEventListener(eventName: string, func: Function): void; + off(eventName: string, func: Function): void; + removeEventListener(eventName: string, func: Function): void; + receiveEvent(eventName: string, args: any): void; + glue(elements: any): void; + unglue(elements: any): void; + static setDefaults(options: ZeroClipboardOptions): void; + static destroy(): void; static detectFlashSupport(): boolean; - static dispatch(eventName: string, func); + static dispatch(eventName: string, args: any): void; } interface ZeroClipboardOptions { From 2708bc05cd9407b99f78136d52567b459751a89a Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 3 Oct 2013 11:23:38 +0900 Subject: [PATCH 017/150] Fixed tsc failed on Node.js v0.8.25 --- ace/ace.d.ts.tscparams | 1 + ace/all-tests.ts.tscparams | 1 + ace/tests/ace-anchor-tests.ts.tscparams | 1 + ace/tests/ace-background_tokenizer-tests.ts.tscparams | 1 + ace/tests/ace-default-tests.ts.tscparams | 1 + ace/tests/ace-document-tests.ts.tscparams | 1 + ace/tests/ace-edit_session-tests.ts.tscparams | 1 + ace/tests/ace-editor1-tests.ts.tscparams | 1 + ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams | 1 + ace/tests/ace-editor_navigation-tests.ts.tscparams | 1 + ace/tests/ace-editor_text_edit-tests.ts.tscparams | 1 + ace/tests/ace-multi_select-tests.ts.tscparams | 1 + ace/tests/ace-placeholder-tests.ts.tscparams | 1 + ace/tests/ace-range-tests.ts.tscparams | 1 + ace/tests/ace-range_list-tests.ts.tscparams | 1 + ace/tests/ace-search-tests.ts.tscparams | 1 + ace/tests/ace-selection-tests.ts.tscparams | 1 + ace/tests/ace-token_iterator-tests.ts.tscparams | 1 + ace/tests/ace-virtual_renderer-tests.ts.tscparams | 1 + amcharts/AmCharts.d.ts.tscparams | 1 + amplifyjs/amplifyjs-tests.ts.tscparams | 1 + amplifyjs/amplifyjs.d.ts.tscparams | 1 + angularjs/angular-scenario.d.ts.tscparams | 1 + angularjs/angular-tests.ts.tscparams | 1 + arbiter/Arbiter-tests.ts.tscparams | 1 + arbiter/Arbiter.d.ts.tscparams | 1 + async/async-tests.ts.tscparams | 1 + async/async.d.ts.tscparams | 1 + async/asyncamd-tests.ts.tscparams | 1 + .../AzureMobileServicesClient-tests.ts.tscparams | 1 + backbone-relational/backbone-relational-tests.ts.tscparams | 1 + backbone-relational/backbone-relational.d.ts.tscparams | 1 + backbone/backbone-tests.ts.tscparams | 1 + backbone/backbone.d.ts.tscparams | 1 + backgrid/backgrid.d.ts.tscparams | 1 + bootstrap-notify/bootstrap-notify.d.ts.tscparams | 1 + bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams | 1 + bootstrap.paginator/bootstrap.paginator.d.ts.tscparams | 1 + bootstrap/bootstrap-tests.ts.tscparams | 1 + box2d/box2dweb-test.ts.tscparams | 1 + box2d/box2dweb.d.ts.tscparams | 1 + breeze/breeze-1.0-tests.ts.tscparams | 1 + breeze/breeze-1.0.d.ts.tscparams | 1 + breeze/breeze-1.2-tests.ts.tscparams | 1 + breeze/breeze-1.2.d.ts.tscparams | 1 + breeze/breeze-tests.ts.tscparams | 1 + breeze/breeze.d.ts.tscparams | 1 + browser-harness/browser-harness-tests.ts.tscparams | 1 + browser-harness/browser-harness.d.ts.tscparams | 1 + browserify/browserify-tests.ts.tscparams | 1 + browserify/browserify.d.ts.tscparams | 1 + camljs/camljs-tests.ts.tscparams | 1 + camljs/camljs.d.ts.tscparams | 1 + casperjs/casperjs.d.ts.tscparams | 1 + chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams | 1 + chai-jquery/chai-jquery-tests.ts.tscparams | 1 + chai-jquery/chai-jquery.d.ts.tscparams | 1 + chai/chai-assert-tests.ts.tscparams | 1 + chai/chai-tests.ts.tscparams | 1 + chai/chai.d.ts.tscparams | 1 + cheerio/cheerio-tests.ts.tscparams | 1 + cheerio/cheerio.d.ts.tscparams | 1 + chrome/chrome-tests.ts.tscparams | 1 + chrome/chrome.d.ts.tscparams | 1 + codemirror/codemirror-tests.ts.tscparams | 1 + codemirror/codemirror.d.ts.tscparams | 1 + commander/commander-tests.ts.tscparams | 1 + convert-source-map/convert-source-map-tests.ts.tscparams | 1 + convert-source-map/convert-source-map.d.ts.tscparams | 1 + crossroads/crossroads-tests.ts.tscparams | 1 + crossroads/crossroads.d.ts.tscparams | 1 + d3/d3-tests.ts.tscparams | 1 + d3/d3.d.ts.tscparams | 1 + d3/plugins/d3.superformula-tests.ts.tscparams | 1 + d3/plugins/d3.superformula.d.ts.tscparams | 1 + domo/domo-tests.ts.tscparams | 1 + dropzone/dropzone.d.ts.tscparams | 1 + durandal/durandal-1.x.d.ts.tscparams | 1 + durandal/durandal.d.ts.tscparams | 1 + dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams | 1 + dustjs-linkedin/dustjs-linkedin.d.ts.tscparams | 1 + ember/ember-tests.ts.tscparams | 1 + ember/ember.d.ts.tscparams | 1 + epiceditor/epiceditor-tests.ts.tscparams | 1 + epiceditor/epiceditor.d.ts.tscparams | 1 + express/express-tests.ts.tscparams | 1 + extjs/ExtJS-tests.ts.tscparams | 1 + fabricjs/fabricjs-tests.ts.tscparams | 1 + fabricjs/fabricjs.d.ts.tscparams | 1 + fancybox/fancybox-tests.ts.tscparams | 1 + fancybox/fancybox.d.ts.tscparams | 1 + firebase/firebase-tests.ts.tscparams | 1 + firebase/firebase.d.ts.tscparams | 1 + firefox/firefox-tests.ts.tscparams | 1 + flexSlider/flexSlider-tests.ts.tscparams | 1 + flexSlider/flexSlider.d.ts.tscparams | 1 + flot/jquery.flot.d.ts.tscparams | 1 + foundation/foundation-tests.ts.tscparams | 1 + foundation/foundation.d.ts.tscparams | 1 + fullCalendar/fullCalendar-tests.ts.tscparams | 1 + gamequery/gamequery-tests.ts.tscparams | 1 + gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams | 1 + gapi.translate/gapi.translate.d.ts.tscparams | 1 + gapi.urlshortener/gapi.urlshortener.d.ts.tscparams | 1 + gapi.youtube/gapi.youtube.d.ts.tscparams | 1 + gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams | 1 + gapi/gapi.d.ts.tscparams | 1 + globalize/globalize-tests.ts.tscparams | 1 + globalize/globalize.d.ts.tscparams | 1 + goJS/goJS-tests.ts.tscparams | 1 + goJS/goJS.d.ts.tscparams | 1 + google.analytics/ga-tests.ts.tscparams | 1 + google.analytics/ga.d.ts.tscparams | 1 + handlebars/handlebars-tests.ts.tscparams | 1 + handlebars/handlebars.d.ts.tscparams | 1 + highcharts/highcharts-tests.ts.tscparams | 1 + highcharts/highcharts.d.ts.tscparams | 1 + history/history-tests.ts.tscparams | 1 + history/history.d.ts.tscparams | 1 + humane/humane-tests.ts.tscparams | 1 + humane/humane.d.ts.tscparams | 1 + i18next/i18next-tests.ts.tscparams | 1 + i18next/i18next.d.ts.tscparams | 1 + icheck/icheck-tests.ts.tscparams | 1 + jake/jake-tests.ts.tscparams | 1 + jake/jake.d.ts.tscparams | 1 + jasmine-jquery/jasmine-jquery-tests.ts.tscparams | 1 + jasmine-jquery/jasmine-jquery.d.ts.tscparams | 1 + jasmine-matchers/jasmine-matchers-tests.ts.tscparams | 1 + jointjs/jointjs.d.ts.tscparams | 1 + jqrangeslider/jqrangeslider-tests.ts.tscparams | 1 + jqrangeslider/jqrangeslider.d.ts.tscparams | 1 + jquery.address/jquery.address.d.ts.tscparams | 1 + jquery.bbq/jquery.bbq-tests.ts.tscparams | 1 + jquery.bbq/jquery.bbq.d.ts.tscparams | 1 + jquery.colorbox/jquery.colorbox-tests.ts.tscparams | 1 + jquery.colorbox/jquery.colorbox.d.ts.tscparams | 1 + jquery.contextMenu/jquery.contextMenu.d.ts.tscparams | 1 + jquery.cycle/jquery.cycle-tests.ts.tscparams | 1 + jquery.dataTables/jquery.dataTables-tests.ts.tscparams | 1 + jquery.dynatree/jquery.dynatree.d.ts.tscparams | 1 + jquery.jnotify/jquery.jnotify-tests.ts.tscparams | 1 + jquery.jnotify/jquery.jnotify.d.ts.tscparams | 1 + jquery.noty/jquery.noty.d.ts.tscparams | 1 + jquery.payment/jquery.payment.d.ts.tscparams | 1 + jquery.pickadate/jquery.pickadate-tests.ts.tscparams | 1 + jquery.pickadate/jquery.pickadate.d.ts.tscparams | 1 + jquery.timeago/jquery.timeago-tests.ts.tscparams | 1 + jquery.timepicker/jquery.timepicker-tests.ts.tscparams | 1 + jquery.timepicker/jquery.timepicker.d.ts.tscparams | 1 + jquery.ui.layout/jquery.ui.layout.d.ts.tscparams | 1 + jquery.validation/jquery.validation-tests.ts.tscparams | 1 + jquery.watermark/jquery.watermark-tests.ts.tscparams | 1 + jquery/jquery-tests.ts.tscparams | 1 + jquerymobile/jquerymobile-tests.ts.tscparams | 1 + jquerymobile/jquerymobile.d.ts.tscparams | 1 + jqueryui/jqueryui-tests.ts.tscparams | 1 + jqueryui/jqueryui.d.ts.tscparams | 1 + js-signals/js-signals.d.ts.tscparams | 1 + jscrollpane/jscrollpane.d.ts.tscparams | 1 + jsdeferred/jsdeferred-tests.ts.tscparams | 1 + jsdeferred/jsdeferred.d.ts.tscparams | 1 + jsfl/jsfl.d.ts.tscparams | 1 + jsfl/xJSFL.d.ts.tscparams | 1 + jsoneditoronline/jsoneditoronline-tests.ts.tscparams | 1 + jsoneditoronline/jsoneditoronline.d.ts.tscparams | 1 + jsplumb/jquery.jsPlumb.d.ts.tscparams | 1 + jstorage/jstorage-tests.ts.tscparams | 1 + knockback/knockback.d.ts.tscparams | 1 + .../knockout.deferred.updates-tests.ts.tscparams | 1 + .../knockout.deferred.updates.d.ts.tscparams | 1 + knockout.editables/ko.editables.d.ts.tscparams | 1 + knockout.es5/knockout.es5-tests.ts.tscparams | 1 + knockout.es5/knockout.es5.d.ts.tscparams | 1 + knockout.mapping/knockout.mapping.d.ts.tscparams | 1 + knockout.postbox/knockout-postbox.d.ts.tscparams | 1 + knockout.validation/knockout.validation.d.ts.tscparams | 1 + knockout.viewmodel/knockout.viewmodel.d.ts.tscparams | 1 + knockout/all-tests.ts.tscparams | 1 + knockout/knockout.amd.d.ts.tscparams | 1 + knockout/knockout.d.ts.tscparams | 1 + knockout/knockoutamd-tests.ts.tscparams | 1 + knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams | 1 + knockout/tests/knockout-tests.ts.tscparams | 1 + kolite/kolite-tests.ts.tscparams | 1 + kolite/kolite.d.ts.tscparams | 1 + less/less-tests.ts.tscparams | 1 + less/less.d.ts.tscparams | 1 + levelup/levelup-tests.ts.tscparams | 1 + levelup/levelup.d.ts.tscparams | 1 + libxmljs/libxmljs-tests.ts.tscparams | 1 + libxmljs/libxmljs.d.ts.tscparams | 1 + linq/linq-tests.ts.tscparams | 1 + linq/linq.3.0.3-Beta4.d.ts.tscparams | 1 + linq/linq.d.ts.tscparams | 1 + linq/linq.jquery.d.ts.tscparams | 1 + marionette/marionette.d.ts.tscparams | 1 + meteor/meteor-tests.ts.tscparams | 1 + meteor/meteor.d.ts.tscparams | 1 + modernizr/modernizr-tests.ts.tscparams | 1 + modernizr/modernizr.d.ts.tscparams | 1 + mongodb/mongodb-tests.ts.tscparams | 1 + mongodb/mongodb.d.ts.tscparams | 1 + msnodesql/msnodesql-tests.ts.tscparams | 1 + msnodesql/msnodesql.d.ts.tscparams | 1 + mustache/mustache-tests.ts.tscparams | 1 + mustache/mustache.d.ts.tscparams | 1 + noVNC/noVNC-tests.ts.tscparams | 1 + noVNC/noVNC.d.ts.tscparams | 1 + node-azure/azure-tests.ts.tscparams | 1 + node-azure/azure.d.ts.tscparams | 1 + node-ffi/node-ffi-tests.ts.tscparams | 1 + node-ffi/node-ffi.d.ts.tscparams | 1 + node-fibers/node-fibers-tests.ts.tscparams | 1 + node-fibers/node-fibers.d.ts.tscparams | 1 + node/node-0.8.8.d.ts.tscparams | 1 + node_redis/node_redis-tests.ts.tscparams | 1 + node_redis/node_redis.d.ts.tscparams | 1 + nodemailer/nodemailer-tests.ts.tscparams | 1 + nodemailer/nodemailer.d.ts.tscparams | 1 + parallel/parallel-tests.ts.tscparams | 1 + pdf/pdf-tests.ts.tscparams | 1 + pdf/pdf.d.ts.tscparams | 1 + persona/persona-tests.ts.tscparams | 1 + persona/persona.d.ts.tscparams | 1 + phantomjs/phantomjs.d.ts.tscparams | 1 + phonegap/phonegap-tests.ts.tscparams | 1 + phonegap/phonegap.d.ts.tscparams | 1 + pixi/pixi-tests.ts.tscparams | 1 + pixi/pixi.d.ts.tscparams | 1 + popcorn/popcorn.d.ts.tscparams | 1 + pouchDB/pouch-tests.ts.tscparams | 1 + pouchDB/pouch.d.ts.tscparams | 1 + q/Q-tests.ts.tscparams | 1 + q/Q.d.ts.tscparams | 1 + qunit/qunit-tests.ts.tscparams | 1 + qunit/qunit.d.ts.tscparams | 1 + raphael/raphael-tests.ts.tscparams | 1 + raphael/raphael.d.ts.tscparams | 1 + restangular/restangular-tests.ts.tscparams | 1 + restangular/restangular.d.ts.tscparams | 1 + restify/restify-tests.ts.tscparams | 1 + restify/restify.d.ts.tscparams | 1 + reveal/reveal-tests.ts.tscparams | 1 + reveal/reveal.d.ts.tscparams | 1 + routie/routie.d.ts.tscparams | 1 + royalslider/royalslider-tests.ts.tscparams | 1 + sammyjs/sammyjs-tests.ts.tscparams | 1 + sammyjs/sammyjs.d.ts.tscparams | 1 + scroller/scroller-tests.ts.tscparams | 1 + select2/select2-tests.ts.tscparams | 1 + sharepoint/SharePoint-tests.ts.tscparams | 1 + sharepoint/SharePoint.d.ts.tscparams | 1 + siesta/siesta-tests.ts.tscparams | 1 + siesta/siesta.d.ts.tscparams | 1 + signalr/signalr-tests.ts.tscparams | 1 + signalr/signalr.d.ts.tscparams | 1 + sinon-chai/sinon-chai-tests.ts.tscparams | 1 + sinon-chai/sinon-chai.d.ts.tscparams | 1 + slickgrid/SlickGrid-tests.ts.tscparams | 1 + slickgrid/SlickGrid.d.ts.tscparams | 1 + socket.io/socket.io-tests.ts.tscparams | 1 + socket.io/socket.io.d.ts.tscparams | 1 + soundjs/soundjs-tests.ts.tscparams | 1 + soundjs/soundjs.d.ts.tscparams | 1 + spin/spin-tests.ts.tscparams | 1 + spin/spin.d.ts.tscparams | 1 + stripe/stripe.d.ts.tscparams | 1 + swiper/swiper-tests.ts.tscparams | 1 + swiper/swiper.d.ts.tscparams | 1 + swipeview/swipeview-tests.ts.tscparams | 1 + teechart/teechart.d.ts.tscparams | 1 + threejs/three-r55.d.ts.tscparams | 1 + threejs/three.d.ts.tscparams | 1 + through/through-tests.ts.tscparams | 1 + through/through.d.ts.tscparams | 1 + toastr/toastr-tests.ts.tscparams | 1 + tweenjs/tweenjs-tests.ts.tscparams | 1 + underscore-ko/underscore-ko.d.ts.tscparams | 1 + underscore/underscore-tests.ts.tscparams | 1 + unity-webapi/unity-webapi-tests.ts.tscparams | 1 + unity-webapi/unity-webapi.d.ts.tscparams | 1 + urijs/URI.d.ts.tscparams | 1 + viewporter/viewporter-tests.ts.tscparams | 1 + vimeo/froogaloop.d.ts.tscparams | 1 + webaudioapi/waa-nightly.d.ts.tscparams | 1 + webaudioapi/waa-tests.ts.tscparams | 1 + webaudioapi/waa.d.ts.tscparams | 1 + webrtc/MediaStream-tests.ts.tscparams | 1 + webrtc/MediaStream.d.ts.tscparams | 1 + webrtc/RTCPeerConnection-tests.ts.tscparams | 1 + webrtc/RTCPeerConnection.d.ts.tscparams | 1 + winjs/winjs.d.ts.tscparams | 1 + youtube/youtube.d.ts.tscparams | 1 + zepto/zepto-tests.ts.tscparams | 1 + zeroclipboard/zeroclipboard.d.ts.tscparams | 1 + 296 files changed, 296 insertions(+) diff --git a/ace/ace.d.ts.tscparams b/ace/ace.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/ace.d.ts.tscparams +++ b/ace/ace.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/all-tests.ts.tscparams b/ace/all-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/all-tests.ts.tscparams +++ b/ace/all-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-anchor-tests.ts.tscparams b/ace/tests/ace-anchor-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-anchor-tests.ts.tscparams +++ b/ace/tests/ace-anchor-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-background_tokenizer-tests.ts.tscparams b/ace/tests/ace-background_tokenizer-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-background_tokenizer-tests.ts.tscparams +++ b/ace/tests/ace-background_tokenizer-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-default-tests.ts.tscparams b/ace/tests/ace-default-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-default-tests.ts.tscparams +++ b/ace/tests/ace-default-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-document-tests.ts.tscparams b/ace/tests/ace-document-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-document-tests.ts.tscparams +++ b/ace/tests/ace-document-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-edit_session-tests.ts.tscparams b/ace/tests/ace-edit_session-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-edit_session-tests.ts.tscparams +++ b/ace/tests/ace-edit_session-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-editor1-tests.ts.tscparams b/ace/tests/ace-editor1-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-editor1-tests.ts.tscparams +++ b/ace/tests/ace-editor1-tests.ts.tscparams @@ -0,0 +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 e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams +++ b/ace/tests/ace-editor_highlight_selected_word-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-editor_navigation-tests.ts.tscparams b/ace/tests/ace-editor_navigation-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-editor_navigation-tests.ts.tscparams +++ b/ace/tests/ace-editor_navigation-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-editor_text_edit-tests.ts.tscparams b/ace/tests/ace-editor_text_edit-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-editor_text_edit-tests.ts.tscparams +++ b/ace/tests/ace-editor_text_edit-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-multi_select-tests.ts.tscparams b/ace/tests/ace-multi_select-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-multi_select-tests.ts.tscparams +++ b/ace/tests/ace-multi_select-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-placeholder-tests.ts.tscparams b/ace/tests/ace-placeholder-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-placeholder-tests.ts.tscparams +++ b/ace/tests/ace-placeholder-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-range-tests.ts.tscparams b/ace/tests/ace-range-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-range-tests.ts.tscparams +++ b/ace/tests/ace-range-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-range_list-tests.ts.tscparams b/ace/tests/ace-range_list-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-range_list-tests.ts.tscparams +++ b/ace/tests/ace-range_list-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-search-tests.ts.tscparams b/ace/tests/ace-search-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-search-tests.ts.tscparams +++ b/ace/tests/ace-search-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-selection-tests.ts.tscparams b/ace/tests/ace-selection-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-selection-tests.ts.tscparams +++ b/ace/tests/ace-selection-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-token_iterator-tests.ts.tscparams b/ace/tests/ace-token_iterator-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-token_iterator-tests.ts.tscparams +++ b/ace/tests/ace-token_iterator-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ace/tests/ace-virtual_renderer-tests.ts.tscparams b/ace/tests/ace-virtual_renderer-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ace/tests/ace-virtual_renderer-tests.ts.tscparams +++ b/ace/tests/ace-virtual_renderer-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/amcharts/AmCharts.d.ts.tscparams b/amcharts/AmCharts.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/amcharts/AmCharts.d.ts.tscparams +++ b/amcharts/AmCharts.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/amplifyjs/amplifyjs-tests.ts.tscparams b/amplifyjs/amplifyjs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/amplifyjs/amplifyjs-tests.ts.tscparams +++ b/amplifyjs/amplifyjs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/amplifyjs/amplifyjs.d.ts.tscparams b/amplifyjs/amplifyjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/amplifyjs/amplifyjs.d.ts.tscparams +++ b/amplifyjs/amplifyjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/angularjs/angular-scenario.d.ts.tscparams b/angularjs/angular-scenario.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/angularjs/angular-scenario.d.ts.tscparams +++ b/angularjs/angular-scenario.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/angularjs/angular-tests.ts.tscparams b/angularjs/angular-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/angularjs/angular-tests.ts.tscparams +++ b/angularjs/angular-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/arbiter/Arbiter-tests.ts.tscparams b/arbiter/Arbiter-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/arbiter/Arbiter-tests.ts.tscparams +++ b/arbiter/Arbiter-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/arbiter/Arbiter.d.ts.tscparams b/arbiter/Arbiter.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/arbiter/Arbiter.d.ts.tscparams +++ b/arbiter/Arbiter.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/async/async-tests.ts.tscparams b/async/async-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/async/async-tests.ts.tscparams +++ b/async/async-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/async/async.d.ts.tscparams b/async/async.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/async/async.d.ts.tscparams +++ b/async/async.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/async/asyncamd-tests.ts.tscparams b/async/asyncamd-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/async/asyncamd-tests.ts.tscparams +++ b/async/asyncamd-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams +++ b/azure-mobile-services-client/AzureMobileServicesClient-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/backbone-relational/backbone-relational-tests.ts.tscparams b/backbone-relational/backbone-relational-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/backbone-relational/backbone-relational-tests.ts.tscparams +++ b/backbone-relational/backbone-relational-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/backbone-relational/backbone-relational.d.ts.tscparams b/backbone-relational/backbone-relational.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/backbone-relational/backbone-relational.d.ts.tscparams +++ b/backbone-relational/backbone-relational.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/backbone/backbone-tests.ts.tscparams b/backbone/backbone-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/backbone/backbone-tests.ts.tscparams +++ b/backbone/backbone-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/backbone/backbone.d.ts.tscparams b/backbone/backbone.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/backbone/backbone.d.ts.tscparams +++ b/backbone/backbone.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/backgrid/backgrid.d.ts.tscparams b/backgrid/backgrid.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/backgrid/backgrid.d.ts.tscparams +++ b/backgrid/backgrid.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/bootstrap-notify/bootstrap-notify.d.ts.tscparams b/bootstrap-notify/bootstrap-notify.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/bootstrap-notify/bootstrap-notify.d.ts.tscparams +++ b/bootstrap-notify/bootstrap-notify.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams b/bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams +++ b/bootstrap.datepicker/bootstrap.datepicker-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams +++ b/bootstrap.paginator/bootstrap.paginator.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/bootstrap/bootstrap-tests.ts.tscparams b/bootstrap/bootstrap-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/bootstrap/bootstrap-tests.ts.tscparams +++ b/bootstrap/bootstrap-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/box2d/box2dweb-test.ts.tscparams b/box2d/box2dweb-test.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/box2d/box2dweb-test.ts.tscparams +++ b/box2d/box2dweb-test.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/box2d/box2dweb.d.ts.tscparams b/box2d/box2dweb.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/box2d/box2dweb.d.ts.tscparams +++ b/box2d/box2dweb.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/breeze/breeze-1.0-tests.ts.tscparams b/breeze/breeze-1.0-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/breeze/breeze-1.0-tests.ts.tscparams +++ b/breeze/breeze-1.0-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/breeze/breeze-1.0.d.ts.tscparams b/breeze/breeze-1.0.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/breeze/breeze-1.0.d.ts.tscparams +++ b/breeze/breeze-1.0.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/breeze/breeze-1.2-tests.ts.tscparams b/breeze/breeze-1.2-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/breeze/breeze-1.2-tests.ts.tscparams +++ b/breeze/breeze-1.2-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/breeze/breeze-1.2.d.ts.tscparams b/breeze/breeze-1.2.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/breeze/breeze-1.2.d.ts.tscparams +++ b/breeze/breeze-1.2.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/breeze/breeze-tests.ts.tscparams b/breeze/breeze-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/breeze/breeze-tests.ts.tscparams +++ b/breeze/breeze-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/breeze/breeze.d.ts.tscparams b/breeze/breeze.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/breeze/breeze.d.ts.tscparams +++ b/breeze/breeze.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/browser-harness/browser-harness-tests.ts.tscparams b/browser-harness/browser-harness-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/browser-harness/browser-harness-tests.ts.tscparams +++ b/browser-harness/browser-harness-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/browser-harness/browser-harness.d.ts.tscparams b/browser-harness/browser-harness.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/browser-harness/browser-harness.d.ts.tscparams +++ b/browser-harness/browser-harness.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/browserify/browserify-tests.ts.tscparams b/browserify/browserify-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/browserify/browserify-tests.ts.tscparams +++ b/browserify/browserify-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/browserify/browserify.d.ts.tscparams b/browserify/browserify.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/browserify/browserify.d.ts.tscparams +++ b/browserify/browserify.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/camljs/camljs-tests.ts.tscparams b/camljs/camljs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/camljs/camljs-tests.ts.tscparams +++ b/camljs/camljs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/camljs/camljs.d.ts.tscparams b/camljs/camljs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/camljs/camljs.d.ts.tscparams +++ b/camljs/camljs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/casperjs/casperjs.d.ts.tscparams b/casperjs/casperjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/casperjs/casperjs.d.ts.tscparams +++ b/casperjs/casperjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams b/chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams +++ b/chai-fuzzy/chai-fuzzy-assert.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chai-jquery/chai-jquery-tests.ts.tscparams b/chai-jquery/chai-jquery-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chai-jquery/chai-jquery-tests.ts.tscparams +++ b/chai-jquery/chai-jquery-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chai-jquery/chai-jquery.d.ts.tscparams b/chai-jquery/chai-jquery.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chai-jquery/chai-jquery.d.ts.tscparams +++ b/chai-jquery/chai-jquery.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chai/chai-assert-tests.ts.tscparams b/chai/chai-assert-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chai/chai-assert-tests.ts.tscparams +++ b/chai/chai-assert-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chai/chai-tests.ts.tscparams b/chai/chai-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chai/chai-tests.ts.tscparams +++ b/chai/chai-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chai/chai.d.ts.tscparams b/chai/chai.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chai/chai.d.ts.tscparams +++ b/chai/chai.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/cheerio/cheerio-tests.ts.tscparams b/cheerio/cheerio-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/cheerio/cheerio-tests.ts.tscparams +++ b/cheerio/cheerio-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/cheerio/cheerio.d.ts.tscparams b/cheerio/cheerio.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/cheerio/cheerio.d.ts.tscparams +++ b/cheerio/cheerio.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chrome/chrome-tests.ts.tscparams b/chrome/chrome-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chrome/chrome-tests.ts.tscparams +++ b/chrome/chrome-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/chrome/chrome.d.ts.tscparams b/chrome/chrome.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/chrome/chrome.d.ts.tscparams +++ b/chrome/chrome.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/codemirror/codemirror-tests.ts.tscparams b/codemirror/codemirror-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/codemirror/codemirror-tests.ts.tscparams +++ b/codemirror/codemirror-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/codemirror/codemirror.d.ts.tscparams b/codemirror/codemirror.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/codemirror/codemirror.d.ts.tscparams +++ b/codemirror/codemirror.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/commander/commander-tests.ts.tscparams b/commander/commander-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/commander/commander-tests.ts.tscparams +++ b/commander/commander-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/convert-source-map/convert-source-map-tests.ts.tscparams b/convert-source-map/convert-source-map-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/convert-source-map/convert-source-map-tests.ts.tscparams +++ b/convert-source-map/convert-source-map-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/convert-source-map/convert-source-map.d.ts.tscparams b/convert-source-map/convert-source-map.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/convert-source-map/convert-source-map.d.ts.tscparams +++ b/convert-source-map/convert-source-map.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/crossroads/crossroads-tests.ts.tscparams b/crossroads/crossroads-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/crossroads/crossroads-tests.ts.tscparams +++ b/crossroads/crossroads-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/crossroads/crossroads.d.ts.tscparams b/crossroads/crossroads.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/crossroads/crossroads.d.ts.tscparams +++ b/crossroads/crossroads.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/d3/d3-tests.ts.tscparams b/d3/d3-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/d3/d3-tests.ts.tscparams +++ b/d3/d3-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/d3/d3.d.ts.tscparams b/d3/d3.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/d3/d3.d.ts.tscparams +++ b/d3/d3.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/d3/plugins/d3.superformula-tests.ts.tscparams b/d3/plugins/d3.superformula-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/d3/plugins/d3.superformula-tests.ts.tscparams +++ b/d3/plugins/d3.superformula-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/d3/plugins/d3.superformula.d.ts.tscparams b/d3/plugins/d3.superformula.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/d3/plugins/d3.superformula.d.ts.tscparams +++ b/d3/plugins/d3.superformula.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/domo/domo-tests.ts.tscparams b/domo/domo-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/domo/domo-tests.ts.tscparams +++ b/domo/domo-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/dropzone/dropzone.d.ts.tscparams b/dropzone/dropzone.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/dropzone/dropzone.d.ts.tscparams +++ b/dropzone/dropzone.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/durandal/durandal-1.x.d.ts.tscparams b/durandal/durandal-1.x.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/durandal/durandal-1.x.d.ts.tscparams +++ b/durandal/durandal-1.x.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/durandal/durandal.d.ts.tscparams b/durandal/durandal.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/durandal/durandal.d.ts.tscparams +++ b/durandal/durandal.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams b/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams +++ b/dustjs-linkedin/dustjs-linkedin-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams b/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams +++ b/dustjs-linkedin/dustjs-linkedin.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ember/ember-tests.ts.tscparams b/ember/ember-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ember/ember-tests.ts.tscparams +++ b/ember/ember-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/ember/ember.d.ts.tscparams b/ember/ember.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/ember/ember.d.ts.tscparams +++ b/ember/ember.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/epiceditor/epiceditor-tests.ts.tscparams b/epiceditor/epiceditor-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/epiceditor/epiceditor-tests.ts.tscparams +++ b/epiceditor/epiceditor-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/epiceditor/epiceditor.d.ts.tscparams b/epiceditor/epiceditor.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/epiceditor/epiceditor.d.ts.tscparams +++ b/epiceditor/epiceditor.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/express/express-tests.ts.tscparams b/express/express-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/express/express-tests.ts.tscparams +++ b/express/express-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/extjs/ExtJS-tests.ts.tscparams b/extjs/ExtJS-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/extjs/ExtJS-tests.ts.tscparams +++ b/extjs/ExtJS-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/fabricjs/fabricjs-tests.ts.tscparams b/fabricjs/fabricjs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/fabricjs/fabricjs-tests.ts.tscparams +++ b/fabricjs/fabricjs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/fabricjs/fabricjs.d.ts.tscparams b/fabricjs/fabricjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/fabricjs/fabricjs.d.ts.tscparams +++ b/fabricjs/fabricjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/fancybox/fancybox-tests.ts.tscparams b/fancybox/fancybox-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/fancybox/fancybox-tests.ts.tscparams +++ b/fancybox/fancybox-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/fancybox/fancybox.d.ts.tscparams b/fancybox/fancybox.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/fancybox/fancybox.d.ts.tscparams +++ b/fancybox/fancybox.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/firebase/firebase-tests.ts.tscparams b/firebase/firebase-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/firebase/firebase-tests.ts.tscparams +++ b/firebase/firebase-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/firebase/firebase.d.ts.tscparams b/firebase/firebase.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/firebase/firebase.d.ts.tscparams +++ b/firebase/firebase.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/firefox/firefox-tests.ts.tscparams b/firefox/firefox-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/firefox/firefox-tests.ts.tscparams +++ b/firefox/firefox-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/flexSlider/flexSlider-tests.ts.tscparams b/flexSlider/flexSlider-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/flexSlider/flexSlider-tests.ts.tscparams +++ b/flexSlider/flexSlider-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/flexSlider/flexSlider.d.ts.tscparams b/flexSlider/flexSlider.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/flexSlider/flexSlider.d.ts.tscparams +++ b/flexSlider/flexSlider.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/flot/jquery.flot.d.ts.tscparams b/flot/jquery.flot.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/flot/jquery.flot.d.ts.tscparams +++ b/flot/jquery.flot.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/foundation/foundation-tests.ts.tscparams b/foundation/foundation-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/foundation/foundation-tests.ts.tscparams +++ b/foundation/foundation-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/foundation/foundation.d.ts.tscparams b/foundation/foundation.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/foundation/foundation.d.ts.tscparams +++ b/foundation/foundation.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/fullCalendar/fullCalendar-tests.ts.tscparams b/fullCalendar/fullCalendar-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/fullCalendar/fullCalendar-tests.ts.tscparams +++ b/fullCalendar/fullCalendar-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gamequery/gamequery-tests.ts.tscparams b/gamequery/gamequery-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gamequery/gamequery-tests.ts.tscparams +++ b/gamequery/gamequery-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams b/gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams +++ b/gapi.pagespeedonline/gapi.pagespeedonline.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gapi.translate/gapi.translate.d.ts.tscparams b/gapi.translate/gapi.translate.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gapi.translate/gapi.translate.d.ts.tscparams +++ b/gapi.translate/gapi.translate.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gapi.urlshortener/gapi.urlshortener.d.ts.tscparams b/gapi.urlshortener/gapi.urlshortener.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gapi.urlshortener/gapi.urlshortener.d.ts.tscparams +++ b/gapi.urlshortener/gapi.urlshortener.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gapi.youtube/gapi.youtube.d.ts.tscparams b/gapi.youtube/gapi.youtube.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gapi.youtube/gapi.youtube.d.ts.tscparams +++ b/gapi.youtube/gapi.youtube.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams b/gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams +++ b/gapi.youtubeAnalytics/gapi.youtubeAnalytics.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/gapi/gapi.d.ts.tscparams b/gapi/gapi.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/gapi/gapi.d.ts.tscparams +++ b/gapi/gapi.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/globalize/globalize-tests.ts.tscparams b/globalize/globalize-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/globalize/globalize-tests.ts.tscparams +++ b/globalize/globalize-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/globalize/globalize.d.ts.tscparams b/globalize/globalize.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/globalize/globalize.d.ts.tscparams +++ b/globalize/globalize.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/goJS/goJS-tests.ts.tscparams b/goJS/goJS-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/goJS/goJS-tests.ts.tscparams +++ b/goJS/goJS-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/goJS/goJS.d.ts.tscparams b/goJS/goJS.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/goJS/goJS.d.ts.tscparams +++ b/goJS/goJS.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/google.analytics/ga-tests.ts.tscparams b/google.analytics/ga-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/google.analytics/ga-tests.ts.tscparams +++ b/google.analytics/ga-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/google.analytics/ga.d.ts.tscparams b/google.analytics/ga.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/google.analytics/ga.d.ts.tscparams +++ b/google.analytics/ga.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/handlebars/handlebars-tests.ts.tscparams b/handlebars/handlebars-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/handlebars/handlebars-tests.ts.tscparams +++ b/handlebars/handlebars-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/handlebars/handlebars.d.ts.tscparams b/handlebars/handlebars.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/handlebars/handlebars.d.ts.tscparams +++ b/handlebars/handlebars.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/highcharts/highcharts-tests.ts.tscparams b/highcharts/highcharts-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/highcharts/highcharts-tests.ts.tscparams +++ b/highcharts/highcharts-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/highcharts/highcharts.d.ts.tscparams b/highcharts/highcharts.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/highcharts/highcharts.d.ts.tscparams +++ b/highcharts/highcharts.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/history/history-tests.ts.tscparams b/history/history-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/history/history-tests.ts.tscparams +++ b/history/history-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/history/history.d.ts.tscparams b/history/history.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/history/history.d.ts.tscparams +++ b/history/history.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/humane/humane-tests.ts.tscparams b/humane/humane-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/humane/humane-tests.ts.tscparams +++ b/humane/humane-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/humane/humane.d.ts.tscparams b/humane/humane.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/humane/humane.d.ts.tscparams +++ b/humane/humane.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/i18next/i18next-tests.ts.tscparams b/i18next/i18next-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/i18next/i18next-tests.ts.tscparams +++ b/i18next/i18next-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/i18next/i18next.d.ts.tscparams b/i18next/i18next.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/i18next/i18next.d.ts.tscparams +++ b/i18next/i18next.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/icheck/icheck-tests.ts.tscparams b/icheck/icheck-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/icheck/icheck-tests.ts.tscparams +++ b/icheck/icheck-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jake/jake-tests.ts.tscparams b/jake/jake-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jake/jake-tests.ts.tscparams +++ b/jake/jake-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jake/jake.d.ts.tscparams b/jake/jake.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jake/jake.d.ts.tscparams +++ b/jake/jake.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jasmine-jquery/jasmine-jquery-tests.ts.tscparams b/jasmine-jquery/jasmine-jquery-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jasmine-jquery/jasmine-jquery-tests.ts.tscparams +++ b/jasmine-jquery/jasmine-jquery-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jasmine-jquery/jasmine-jquery.d.ts.tscparams b/jasmine-jquery/jasmine-jquery.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jasmine-jquery/jasmine-jquery.d.ts.tscparams +++ b/jasmine-jquery/jasmine-jquery.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jasmine-matchers/jasmine-matchers-tests.ts.tscparams b/jasmine-matchers/jasmine-matchers-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jasmine-matchers/jasmine-matchers-tests.ts.tscparams +++ b/jasmine-matchers/jasmine-matchers-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jointjs/jointjs.d.ts.tscparams b/jointjs/jointjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jointjs/jointjs.d.ts.tscparams +++ b/jointjs/jointjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jqrangeslider/jqrangeslider-tests.ts.tscparams b/jqrangeslider/jqrangeslider-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jqrangeslider/jqrangeslider-tests.ts.tscparams +++ b/jqrangeslider/jqrangeslider-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jqrangeslider/jqrangeslider.d.ts.tscparams b/jqrangeslider/jqrangeslider.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jqrangeslider/jqrangeslider.d.ts.tscparams +++ b/jqrangeslider/jqrangeslider.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.address/jquery.address.d.ts.tscparams b/jquery.address/jquery.address.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.address/jquery.address.d.ts.tscparams +++ b/jquery.address/jquery.address.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.bbq/jquery.bbq-tests.ts.tscparams b/jquery.bbq/jquery.bbq-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.bbq/jquery.bbq-tests.ts.tscparams +++ b/jquery.bbq/jquery.bbq-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.bbq/jquery.bbq.d.ts.tscparams b/jquery.bbq/jquery.bbq.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.bbq/jquery.bbq.d.ts.tscparams +++ b/jquery.bbq/jquery.bbq.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.colorbox/jquery.colorbox-tests.ts.tscparams b/jquery.colorbox/jquery.colorbox-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.colorbox/jquery.colorbox-tests.ts.tscparams +++ b/jquery.colorbox/jquery.colorbox-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.colorbox/jquery.colorbox.d.ts.tscparams b/jquery.colorbox/jquery.colorbox.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.colorbox/jquery.colorbox.d.ts.tscparams +++ b/jquery.colorbox/jquery.colorbox.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams b/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams +++ b/jquery.contextMenu/jquery.contextMenu.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.cycle/jquery.cycle-tests.ts.tscparams b/jquery.cycle/jquery.cycle-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.cycle/jquery.cycle-tests.ts.tscparams +++ b/jquery.cycle/jquery.cycle-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.dataTables/jquery.dataTables-tests.ts.tscparams b/jquery.dataTables/jquery.dataTables-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.dataTables/jquery.dataTables-tests.ts.tscparams +++ b/jquery.dataTables/jquery.dataTables-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.dynatree/jquery.dynatree.d.ts.tscparams b/jquery.dynatree/jquery.dynatree.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.dynatree/jquery.dynatree.d.ts.tscparams +++ b/jquery.dynatree/jquery.dynatree.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.jnotify/jquery.jnotify-tests.ts.tscparams b/jquery.jnotify/jquery.jnotify-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.jnotify/jquery.jnotify-tests.ts.tscparams +++ b/jquery.jnotify/jquery.jnotify-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.jnotify/jquery.jnotify.d.ts.tscparams b/jquery.jnotify/jquery.jnotify.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.jnotify/jquery.jnotify.d.ts.tscparams +++ b/jquery.jnotify/jquery.jnotify.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.noty/jquery.noty.d.ts.tscparams b/jquery.noty/jquery.noty.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.noty/jquery.noty.d.ts.tscparams +++ b/jquery.noty/jquery.noty.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.payment/jquery.payment.d.ts.tscparams b/jquery.payment/jquery.payment.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.payment/jquery.payment.d.ts.tscparams +++ b/jquery.payment/jquery.payment.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.pickadate/jquery.pickadate-tests.ts.tscparams b/jquery.pickadate/jquery.pickadate-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.pickadate/jquery.pickadate-tests.ts.tscparams +++ b/jquery.pickadate/jquery.pickadate-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.pickadate/jquery.pickadate.d.ts.tscparams b/jquery.pickadate/jquery.pickadate.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.pickadate/jquery.pickadate.d.ts.tscparams +++ b/jquery.pickadate/jquery.pickadate.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.timeago/jquery.timeago-tests.ts.tscparams b/jquery.timeago/jquery.timeago-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.timeago/jquery.timeago-tests.ts.tscparams +++ b/jquery.timeago/jquery.timeago-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.timepicker/jquery.timepicker-tests.ts.tscparams b/jquery.timepicker/jquery.timepicker-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.timepicker/jquery.timepicker-tests.ts.tscparams +++ b/jquery.timepicker/jquery.timepicker-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.timepicker/jquery.timepicker.d.ts.tscparams b/jquery.timepicker/jquery.timepicker.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.timepicker/jquery.timepicker.d.ts.tscparams +++ b/jquery.timepicker/jquery.timepicker.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams b/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams +++ b/jquery.ui.layout/jquery.ui.layout.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.validation/jquery.validation-tests.ts.tscparams b/jquery.validation/jquery.validation-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.validation/jquery.validation-tests.ts.tscparams +++ b/jquery.validation/jquery.validation-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.watermark/jquery.watermark-tests.ts.tscparams b/jquery.watermark/jquery.watermark-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery.watermark/jquery.watermark-tests.ts.tscparams +++ b/jquery.watermark/jquery.watermark-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery/jquery-tests.ts.tscparams b/jquery/jquery-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquery/jquery-tests.ts.tscparams +++ b/jquery/jquery-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquerymobile/jquerymobile-tests.ts.tscparams b/jquerymobile/jquerymobile-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquerymobile/jquerymobile-tests.ts.tscparams +++ b/jquerymobile/jquerymobile-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquerymobile/jquerymobile.d.ts.tscparams b/jquerymobile/jquerymobile.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jquerymobile/jquerymobile.d.ts.tscparams +++ b/jquerymobile/jquerymobile.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jqueryui/jqueryui-tests.ts.tscparams b/jqueryui/jqueryui-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jqueryui/jqueryui-tests.ts.tscparams +++ b/jqueryui/jqueryui-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jqueryui/jqueryui.d.ts.tscparams b/jqueryui/jqueryui.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jqueryui/jqueryui.d.ts.tscparams +++ b/jqueryui/jqueryui.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/js-signals/js-signals.d.ts.tscparams b/js-signals/js-signals.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/js-signals/js-signals.d.ts.tscparams +++ b/js-signals/js-signals.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jscrollpane/jscrollpane.d.ts.tscparams b/jscrollpane/jscrollpane.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jscrollpane/jscrollpane.d.ts.tscparams +++ b/jscrollpane/jscrollpane.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsdeferred/jsdeferred-tests.ts.tscparams b/jsdeferred/jsdeferred-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsdeferred/jsdeferred-tests.ts.tscparams +++ b/jsdeferred/jsdeferred-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsdeferred/jsdeferred.d.ts.tscparams b/jsdeferred/jsdeferred.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsdeferred/jsdeferred.d.ts.tscparams +++ b/jsdeferred/jsdeferred.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsfl/jsfl.d.ts.tscparams b/jsfl/jsfl.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsfl/jsfl.d.ts.tscparams +++ b/jsfl/jsfl.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsfl/xJSFL.d.ts.tscparams b/jsfl/xJSFL.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsfl/xJSFL.d.ts.tscparams +++ b/jsfl/xJSFL.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsoneditoronline/jsoneditoronline-tests.ts.tscparams b/jsoneditoronline/jsoneditoronline-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsoneditoronline/jsoneditoronline-tests.ts.tscparams +++ b/jsoneditoronline/jsoneditoronline-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsoneditoronline/jsoneditoronline.d.ts.tscparams b/jsoneditoronline/jsoneditoronline.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsoneditoronline/jsoneditoronline.d.ts.tscparams +++ b/jsoneditoronline/jsoneditoronline.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jsplumb/jquery.jsPlumb.d.ts.tscparams b/jsplumb/jquery.jsPlumb.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jsplumb/jquery.jsPlumb.d.ts.tscparams +++ b/jsplumb/jquery.jsPlumb.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jstorage/jstorage-tests.ts.tscparams b/jstorage/jstorage-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/jstorage/jstorage-tests.ts.tscparams +++ b/jstorage/jstorage-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockback/knockback.d.ts.tscparams b/knockback/knockback.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockback/knockback.d.ts.tscparams +++ b/knockback/knockback.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams +++ b/knockout.deferred.updates/knockout.deferred.updates-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams b/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams +++ b/knockout.deferred.updates/knockout.deferred.updates.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.editables/ko.editables.d.ts.tscparams b/knockout.editables/ko.editables.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.editables/ko.editables.d.ts.tscparams +++ b/knockout.editables/ko.editables.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.es5/knockout.es5-tests.ts.tscparams b/knockout.es5/knockout.es5-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.es5/knockout.es5-tests.ts.tscparams +++ b/knockout.es5/knockout.es5-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.es5/knockout.es5.d.ts.tscparams b/knockout.es5/knockout.es5.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.es5/knockout.es5.d.ts.tscparams +++ b/knockout.es5/knockout.es5.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.mapping/knockout.mapping.d.ts.tscparams b/knockout.mapping/knockout.mapping.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.mapping/knockout.mapping.d.ts.tscparams +++ b/knockout.mapping/knockout.mapping.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.postbox/knockout-postbox.d.ts.tscparams b/knockout.postbox/knockout-postbox.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.postbox/knockout-postbox.d.ts.tscparams +++ b/knockout.postbox/knockout-postbox.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.validation/knockout.validation.d.ts.tscparams b/knockout.validation/knockout.validation.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.validation/knockout.validation.d.ts.tscparams +++ b/knockout.validation/knockout.validation.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams b/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams +++ b/knockout.viewmodel/knockout.viewmodel.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout/all-tests.ts.tscparams b/knockout/all-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout/all-tests.ts.tscparams +++ b/knockout/all-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout/knockout.amd.d.ts.tscparams b/knockout/knockout.amd.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout/knockout.amd.d.ts.tscparams +++ b/knockout/knockout.amd.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout/knockout.d.ts.tscparams b/knockout/knockout.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout/knockout.d.ts.tscparams +++ b/knockout/knockout.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout/knockoutamd-tests.ts.tscparams b/knockout/knockoutamd-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout/knockoutamd-tests.ts.tscparams +++ b/knockout/knockoutamd-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams b/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams +++ b/knockout/tests/knockout-templatingBehaviors-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout/tests/knockout-tests.ts.tscparams b/knockout/tests/knockout-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/knockout/tests/knockout-tests.ts.tscparams +++ b/knockout/tests/knockout-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/kolite/kolite-tests.ts.tscparams b/kolite/kolite-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/kolite/kolite-tests.ts.tscparams +++ b/kolite/kolite-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/kolite/kolite.d.ts.tscparams b/kolite/kolite.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/kolite/kolite.d.ts.tscparams +++ b/kolite/kolite.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/less/less-tests.ts.tscparams b/less/less-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/less/less-tests.ts.tscparams +++ b/less/less-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/less/less.d.ts.tscparams b/less/less.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/less/less.d.ts.tscparams +++ b/less/less.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/levelup/levelup-tests.ts.tscparams b/levelup/levelup-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/levelup/levelup-tests.ts.tscparams +++ b/levelup/levelup-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/levelup/levelup.d.ts.tscparams b/levelup/levelup.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/levelup/levelup.d.ts.tscparams +++ b/levelup/levelup.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/libxmljs/libxmljs-tests.ts.tscparams b/libxmljs/libxmljs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/libxmljs/libxmljs-tests.ts.tscparams +++ b/libxmljs/libxmljs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/libxmljs/libxmljs.d.ts.tscparams b/libxmljs/libxmljs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/libxmljs/libxmljs.d.ts.tscparams +++ b/libxmljs/libxmljs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/linq/linq-tests.ts.tscparams b/linq/linq-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/linq/linq-tests.ts.tscparams +++ b/linq/linq-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/linq/linq.3.0.3-Beta4.d.ts.tscparams b/linq/linq.3.0.3-Beta4.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/linq/linq.3.0.3-Beta4.d.ts.tscparams +++ b/linq/linq.3.0.3-Beta4.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/linq/linq.d.ts.tscparams b/linq/linq.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/linq/linq.d.ts.tscparams +++ b/linq/linq.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/linq/linq.jquery.d.ts.tscparams b/linq/linq.jquery.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/linq/linq.jquery.d.ts.tscparams +++ b/linq/linq.jquery.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/marionette/marionette.d.ts.tscparams b/marionette/marionette.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/marionette/marionette.d.ts.tscparams +++ b/marionette/marionette.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/meteor/meteor-tests.ts.tscparams b/meteor/meteor-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/meteor/meteor-tests.ts.tscparams +++ b/meteor/meteor-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/meteor/meteor.d.ts.tscparams b/meteor/meteor.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/meteor/meteor.d.ts.tscparams +++ b/meteor/meteor.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/modernizr/modernizr-tests.ts.tscparams b/modernizr/modernizr-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/modernizr/modernizr-tests.ts.tscparams +++ b/modernizr/modernizr-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/modernizr/modernizr.d.ts.tscparams b/modernizr/modernizr.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/modernizr/modernizr.d.ts.tscparams +++ b/modernizr/modernizr.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/mongodb/mongodb-tests.ts.tscparams b/mongodb/mongodb-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/mongodb/mongodb-tests.ts.tscparams +++ b/mongodb/mongodb-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/mongodb/mongodb.d.ts.tscparams b/mongodb/mongodb.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/mongodb/mongodb.d.ts.tscparams +++ b/mongodb/mongodb.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/msnodesql/msnodesql-tests.ts.tscparams b/msnodesql/msnodesql-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/msnodesql/msnodesql-tests.ts.tscparams +++ b/msnodesql/msnodesql-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/msnodesql/msnodesql.d.ts.tscparams b/msnodesql/msnodesql.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/msnodesql/msnodesql.d.ts.tscparams +++ b/msnodesql/msnodesql.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/mustache/mustache-tests.ts.tscparams b/mustache/mustache-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/mustache/mustache-tests.ts.tscparams +++ b/mustache/mustache-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/mustache/mustache.d.ts.tscparams b/mustache/mustache.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/mustache/mustache.d.ts.tscparams +++ b/mustache/mustache.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/noVNC/noVNC-tests.ts.tscparams b/noVNC/noVNC-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/noVNC/noVNC-tests.ts.tscparams +++ b/noVNC/noVNC-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/noVNC/noVNC.d.ts.tscparams b/noVNC/noVNC.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/noVNC/noVNC.d.ts.tscparams +++ b/noVNC/noVNC.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node-azure/azure-tests.ts.tscparams b/node-azure/azure-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node-azure/azure-tests.ts.tscparams +++ b/node-azure/azure-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node-azure/azure.d.ts.tscparams b/node-azure/azure.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node-azure/azure.d.ts.tscparams +++ b/node-azure/azure.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node-ffi/node-ffi-tests.ts.tscparams b/node-ffi/node-ffi-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node-ffi/node-ffi-tests.ts.tscparams +++ b/node-ffi/node-ffi-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node-ffi/node-ffi.d.ts.tscparams b/node-ffi/node-ffi.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node-ffi/node-ffi.d.ts.tscparams +++ b/node-ffi/node-ffi.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node-fibers/node-fibers-tests.ts.tscparams b/node-fibers/node-fibers-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node-fibers/node-fibers-tests.ts.tscparams +++ b/node-fibers/node-fibers-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node-fibers/node-fibers.d.ts.tscparams b/node-fibers/node-fibers.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node-fibers/node-fibers.d.ts.tscparams +++ b/node-fibers/node-fibers.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node/node-0.8.8.d.ts.tscparams b/node/node-0.8.8.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node/node-0.8.8.d.ts.tscparams +++ b/node/node-0.8.8.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node_redis/node_redis-tests.ts.tscparams b/node_redis/node_redis-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node_redis/node_redis-tests.ts.tscparams +++ b/node_redis/node_redis-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/node_redis/node_redis.d.ts.tscparams b/node_redis/node_redis.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/node_redis/node_redis.d.ts.tscparams +++ b/node_redis/node_redis.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/nodemailer/nodemailer-tests.ts.tscparams b/nodemailer/nodemailer-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/nodemailer/nodemailer-tests.ts.tscparams +++ b/nodemailer/nodemailer-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/nodemailer/nodemailer.d.ts.tscparams b/nodemailer/nodemailer.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/nodemailer/nodemailer.d.ts.tscparams +++ b/nodemailer/nodemailer.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/parallel/parallel-tests.ts.tscparams b/parallel/parallel-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/parallel/parallel-tests.ts.tscparams +++ b/parallel/parallel-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/pdf/pdf-tests.ts.tscparams b/pdf/pdf-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/pdf/pdf-tests.ts.tscparams +++ b/pdf/pdf-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/pdf/pdf.d.ts.tscparams b/pdf/pdf.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/pdf/pdf.d.ts.tscparams +++ b/pdf/pdf.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/persona/persona-tests.ts.tscparams b/persona/persona-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/persona/persona-tests.ts.tscparams +++ b/persona/persona-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/persona/persona.d.ts.tscparams b/persona/persona.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/persona/persona.d.ts.tscparams +++ b/persona/persona.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/phantomjs/phantomjs.d.ts.tscparams b/phantomjs/phantomjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/phantomjs/phantomjs.d.ts.tscparams +++ b/phantomjs/phantomjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/phonegap/phonegap-tests.ts.tscparams b/phonegap/phonegap-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/phonegap/phonegap-tests.ts.tscparams +++ b/phonegap/phonegap-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/phonegap/phonegap.d.ts.tscparams b/phonegap/phonegap.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/phonegap/phonegap.d.ts.tscparams +++ b/phonegap/phonegap.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/pixi/pixi-tests.ts.tscparams b/pixi/pixi-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/pixi/pixi-tests.ts.tscparams +++ b/pixi/pixi-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/pixi/pixi.d.ts.tscparams b/pixi/pixi.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/pixi/pixi.d.ts.tscparams +++ b/pixi/pixi.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/popcorn/popcorn.d.ts.tscparams b/popcorn/popcorn.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/popcorn/popcorn.d.ts.tscparams +++ b/popcorn/popcorn.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/pouchDB/pouch-tests.ts.tscparams b/pouchDB/pouch-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/pouchDB/pouch-tests.ts.tscparams +++ b/pouchDB/pouch-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/pouchDB/pouch.d.ts.tscparams b/pouchDB/pouch.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/pouchDB/pouch.d.ts.tscparams +++ b/pouchDB/pouch.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/q/Q-tests.ts.tscparams b/q/Q-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/q/Q-tests.ts.tscparams +++ b/q/Q-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/q/Q.d.ts.tscparams b/q/Q.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/q/Q.d.ts.tscparams +++ b/q/Q.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/qunit/qunit-tests.ts.tscparams b/qunit/qunit-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/qunit/qunit-tests.ts.tscparams +++ b/qunit/qunit-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/qunit/qunit.d.ts.tscparams b/qunit/qunit.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/qunit/qunit.d.ts.tscparams +++ b/qunit/qunit.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/raphael/raphael-tests.ts.tscparams b/raphael/raphael-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/raphael/raphael-tests.ts.tscparams +++ b/raphael/raphael-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/raphael/raphael.d.ts.tscparams b/raphael/raphael.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/raphael/raphael.d.ts.tscparams +++ b/raphael/raphael.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/restangular/restangular-tests.ts.tscparams b/restangular/restangular-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/restangular/restangular-tests.ts.tscparams +++ b/restangular/restangular-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/restangular/restangular.d.ts.tscparams b/restangular/restangular.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/restangular/restangular.d.ts.tscparams +++ b/restangular/restangular.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/restify/restify-tests.ts.tscparams b/restify/restify-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/restify/restify-tests.ts.tscparams +++ b/restify/restify-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/restify/restify.d.ts.tscparams b/restify/restify.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/restify/restify.d.ts.tscparams +++ b/restify/restify.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/reveal/reveal-tests.ts.tscparams b/reveal/reveal-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/reveal/reveal-tests.ts.tscparams +++ b/reveal/reveal-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/reveal/reveal.d.ts.tscparams b/reveal/reveal.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/reveal/reveal.d.ts.tscparams +++ b/reveal/reveal.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/routie/routie.d.ts.tscparams b/routie/routie.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/routie/routie.d.ts.tscparams +++ b/routie/routie.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/royalslider/royalslider-tests.ts.tscparams b/royalslider/royalslider-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/royalslider/royalslider-tests.ts.tscparams +++ b/royalslider/royalslider-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/sammyjs/sammyjs-tests.ts.tscparams b/sammyjs/sammyjs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/sammyjs/sammyjs-tests.ts.tscparams +++ b/sammyjs/sammyjs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/sammyjs/sammyjs.d.ts.tscparams b/sammyjs/sammyjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/sammyjs/sammyjs.d.ts.tscparams +++ b/sammyjs/sammyjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/scroller/scroller-tests.ts.tscparams b/scroller/scroller-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/scroller/scroller-tests.ts.tscparams +++ b/scroller/scroller-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/select2/select2-tests.ts.tscparams b/select2/select2-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/select2/select2-tests.ts.tscparams +++ b/select2/select2-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/sharepoint/SharePoint-tests.ts.tscparams b/sharepoint/SharePoint-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/sharepoint/SharePoint-tests.ts.tscparams +++ b/sharepoint/SharePoint-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/sharepoint/SharePoint.d.ts.tscparams b/sharepoint/SharePoint.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/sharepoint/SharePoint.d.ts.tscparams +++ b/sharepoint/SharePoint.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/siesta/siesta-tests.ts.tscparams b/siesta/siesta-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/siesta/siesta-tests.ts.tscparams +++ b/siesta/siesta-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/siesta/siesta.d.ts.tscparams b/siesta/siesta.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/siesta/siesta.d.ts.tscparams +++ b/siesta/siesta.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/signalr/signalr-tests.ts.tscparams b/signalr/signalr-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/signalr/signalr-tests.ts.tscparams +++ b/signalr/signalr-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/signalr/signalr.d.ts.tscparams b/signalr/signalr.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/signalr/signalr.d.ts.tscparams +++ b/signalr/signalr.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/sinon-chai/sinon-chai-tests.ts.tscparams b/sinon-chai/sinon-chai-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/sinon-chai/sinon-chai-tests.ts.tscparams +++ b/sinon-chai/sinon-chai-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/sinon-chai/sinon-chai.d.ts.tscparams b/sinon-chai/sinon-chai.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/sinon-chai/sinon-chai.d.ts.tscparams +++ b/sinon-chai/sinon-chai.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/slickgrid/SlickGrid-tests.ts.tscparams b/slickgrid/SlickGrid-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/slickgrid/SlickGrid-tests.ts.tscparams +++ b/slickgrid/SlickGrid-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/slickgrid/SlickGrid.d.ts.tscparams b/slickgrid/SlickGrid.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/slickgrid/SlickGrid.d.ts.tscparams +++ b/slickgrid/SlickGrid.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/socket.io/socket.io-tests.ts.tscparams b/socket.io/socket.io-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/socket.io/socket.io-tests.ts.tscparams +++ b/socket.io/socket.io-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/socket.io/socket.io.d.ts.tscparams b/socket.io/socket.io.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/socket.io/socket.io.d.ts.tscparams +++ b/socket.io/socket.io.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/soundjs/soundjs-tests.ts.tscparams b/soundjs/soundjs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/soundjs/soundjs-tests.ts.tscparams +++ b/soundjs/soundjs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/soundjs/soundjs.d.ts.tscparams b/soundjs/soundjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/soundjs/soundjs.d.ts.tscparams +++ b/soundjs/soundjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/spin/spin-tests.ts.tscparams b/spin/spin-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/spin/spin-tests.ts.tscparams +++ b/spin/spin-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/spin/spin.d.ts.tscparams b/spin/spin.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/spin/spin.d.ts.tscparams +++ b/spin/spin.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/stripe/stripe.d.ts.tscparams b/stripe/stripe.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/stripe/stripe.d.ts.tscparams +++ b/stripe/stripe.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/swiper/swiper-tests.ts.tscparams b/swiper/swiper-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/swiper/swiper-tests.ts.tscparams +++ b/swiper/swiper-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/swiper/swiper.d.ts.tscparams b/swiper/swiper.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/swiper/swiper.d.ts.tscparams +++ b/swiper/swiper.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/swipeview/swipeview-tests.ts.tscparams b/swipeview/swipeview-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/swipeview/swipeview-tests.ts.tscparams +++ b/swipeview/swipeview-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/teechart/teechart.d.ts.tscparams b/teechart/teechart.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/teechart/teechart.d.ts.tscparams +++ b/teechart/teechart.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/threejs/three-r55.d.ts.tscparams b/threejs/three-r55.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/threejs/three-r55.d.ts.tscparams +++ b/threejs/three-r55.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/threejs/three.d.ts.tscparams b/threejs/three.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/threejs/three.d.ts.tscparams +++ b/threejs/three.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/through/through-tests.ts.tscparams b/through/through-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/through/through-tests.ts.tscparams +++ b/through/through-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/through/through.d.ts.tscparams b/through/through.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/through/through.d.ts.tscparams +++ b/through/through.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/toastr/toastr-tests.ts.tscparams b/toastr/toastr-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/toastr/toastr-tests.ts.tscparams +++ b/toastr/toastr-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/tweenjs/tweenjs-tests.ts.tscparams b/tweenjs/tweenjs-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/tweenjs/tweenjs-tests.ts.tscparams +++ b/tweenjs/tweenjs-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/underscore-ko/underscore-ko.d.ts.tscparams b/underscore-ko/underscore-ko.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/underscore-ko/underscore-ko.d.ts.tscparams +++ b/underscore-ko/underscore-ko.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/underscore/underscore-tests.ts.tscparams b/underscore/underscore-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/underscore/underscore-tests.ts.tscparams +++ b/underscore/underscore-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/unity-webapi/unity-webapi-tests.ts.tscparams b/unity-webapi/unity-webapi-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/unity-webapi/unity-webapi-tests.ts.tscparams +++ b/unity-webapi/unity-webapi-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/unity-webapi/unity-webapi.d.ts.tscparams b/unity-webapi/unity-webapi.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/unity-webapi/unity-webapi.d.ts.tscparams +++ b/unity-webapi/unity-webapi.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/urijs/URI.d.ts.tscparams b/urijs/URI.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/urijs/URI.d.ts.tscparams +++ b/urijs/URI.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/viewporter/viewporter-tests.ts.tscparams b/viewporter/viewporter-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/viewporter/viewporter-tests.ts.tscparams +++ b/viewporter/viewporter-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/vimeo/froogaloop.d.ts.tscparams b/vimeo/froogaloop.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/vimeo/froogaloop.d.ts.tscparams +++ b/vimeo/froogaloop.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webaudioapi/waa-nightly.d.ts.tscparams b/webaudioapi/waa-nightly.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webaudioapi/waa-nightly.d.ts.tscparams +++ b/webaudioapi/waa-nightly.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webaudioapi/waa-tests.ts.tscparams b/webaudioapi/waa-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webaudioapi/waa-tests.ts.tscparams +++ b/webaudioapi/waa-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webaudioapi/waa.d.ts.tscparams b/webaudioapi/waa.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webaudioapi/waa.d.ts.tscparams +++ b/webaudioapi/waa.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webrtc/MediaStream-tests.ts.tscparams b/webrtc/MediaStream-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webrtc/MediaStream-tests.ts.tscparams +++ b/webrtc/MediaStream-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webrtc/MediaStream.d.ts.tscparams b/webrtc/MediaStream.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webrtc/MediaStream.d.ts.tscparams +++ b/webrtc/MediaStream.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webrtc/RTCPeerConnection-tests.ts.tscparams b/webrtc/RTCPeerConnection-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webrtc/RTCPeerConnection-tests.ts.tscparams +++ b/webrtc/RTCPeerConnection-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/webrtc/RTCPeerConnection.d.ts.tscparams b/webrtc/RTCPeerConnection.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/webrtc/RTCPeerConnection.d.ts.tscparams +++ b/webrtc/RTCPeerConnection.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/winjs/winjs.d.ts.tscparams b/winjs/winjs.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/winjs/winjs.d.ts.tscparams +++ b/winjs/winjs.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/youtube/youtube.d.ts.tscparams b/youtube/youtube.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/youtube/youtube.d.ts.tscparams +++ b/youtube/youtube.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/zepto/zepto-tests.ts.tscparams b/zepto/zepto-tests.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/zepto/zepto-tests.ts.tscparams +++ b/zepto/zepto-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/zeroclipboard/zeroclipboard.d.ts.tscparams b/zeroclipboard/zeroclipboard.d.ts.tscparams index e69de29bb2..e16c76dff8 100644 --- a/zeroclipboard/zeroclipboard.d.ts.tscparams +++ b/zeroclipboard/zeroclipboard.d.ts.tscparams @@ -0,0 +1 @@ +"" From c41200f038b9cf581f30e87dcd2e7c4d44a5dd00 Mon Sep 17 00:00:00 2001 From: basarat Date: Thu, 3 Oct 2013 13:47:58 +1000 Subject: [PATCH 018/150] Update easeljs.d.ts --- easeljs/easeljs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easeljs/easeljs.d.ts b/easeljs/easeljs.d.ts index bf61a1402d..8bea78425b 100644 --- a/easeljs/easeljs.d.ts +++ b/easeljs/easeljs.d.ts @@ -596,11 +596,11 @@ declare module createjs { autoClear: boolean; canvas: HTMLCanvasElement; mouseInBounds: boolean; + mouseMoveOutside: boolean; mouseX: number; mouseY: number; snapToPixelEnabled: boolean; tickOnUpdate: boolean; - mouseMoveOutside: boolean; new (): Stage; new (canvas: HTMLElement): Stage; From 2a9d078d0c4074ac3ddb6d7572e623b151efd84b Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 3 Oct 2013 12:31:37 +0900 Subject: [PATCH 019/150] Fixed --noImplicitAny trouble about expect.js --- expect.js/expect.js-tests.ts.tscparams | 1 + expect.js/expect.js.d.ts | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 expect.js/expect.js-tests.ts.tscparams diff --git a/expect.js/expect.js-tests.ts.tscparams b/expect.js/expect.js-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/expect.js/expect.js-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/expect.js/expect.js.d.ts b/expect.js/expect.js.d.ts index c943f4e4f2..82f85b19d9 100644 --- a/expect.js/expect.js.d.ts +++ b/expect.js/expect.js.d.ts @@ -10,35 +10,35 @@ declare module Expect { /** * Check if the value is truthy */ - ok(); + ok(): void; /** * Assert that the function throws. * * @param fn callback to match error string against */ - throwError(fn?: Function); + throwError(fn?: Function): void; /** * Assert that the function throws. * * @param fn callback to match error string against */ - throwException(fn?: Function); + throwException(fn?: Function): void; /** * Assert that the function throws. * * @param regexp regexp to match error string against */ - throwError(regexp: RegExp); + throwError(regexp: RegExp): void; /** * Assert that the function throws. * * @param fn callback to match error string against */ - throwException(regexp: RegExp); + throwException(regexp: RegExp): void; /** * Checks if the array is empty. From a410fe3316ade3385745c6b3836b68e1674c89bf Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 3 Oct 2013 12:33:02 +0900 Subject: [PATCH 020/150] Fixed --noImplicitAny trouble about rx.js --- rx.js/rx.js.aggregates.d.ts.tscparams | 1 + rx.js/rx.js.binding.d.ts.tscparams | 1 + rx.js/rx.js.coincidence.d.ts.tscparams | 1 + rx.js/rx.js.d.ts.tscparams | 1 + rx.js/rx.js.joinpatterns.d.ts.tscparams | 1 + rx.js/rx.js.jquery.d.ts.tscparams | 1 + rx.js/rx.js.time.d.ts.tscparams | 1 + 7 files changed, 7 insertions(+) create mode 100644 rx.js/rx.js.aggregates.d.ts.tscparams create mode 100644 rx.js/rx.js.binding.d.ts.tscparams create mode 100644 rx.js/rx.js.coincidence.d.ts.tscparams create mode 100644 rx.js/rx.js.d.ts.tscparams create mode 100644 rx.js/rx.js.joinpatterns.d.ts.tscparams create mode 100644 rx.js/rx.js.jquery.d.ts.tscparams create mode 100644 rx.js/rx.js.time.d.ts.tscparams diff --git a/rx.js/rx.js.aggregates.d.ts.tscparams b/rx.js/rx.js.aggregates.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.aggregates.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rx.js/rx.js.binding.d.ts.tscparams b/rx.js/rx.js.binding.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.binding.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rx.js/rx.js.coincidence.d.ts.tscparams b/rx.js/rx.js.coincidence.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.coincidence.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rx.js/rx.js.d.ts.tscparams b/rx.js/rx.js.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rx.js/rx.js.joinpatterns.d.ts.tscparams b/rx.js/rx.js.joinpatterns.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.joinpatterns.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rx.js/rx.js.jquery.d.ts.tscparams b/rx.js/rx.js.jquery.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.jquery.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rx.js/rx.js.time.d.ts.tscparams b/rx.js/rx.js.time.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rx.js/rx.js.time.d.ts.tscparams @@ -0,0 +1 @@ +"" From 9ad2e474c3e0bce89b4eb48ee47aa776b538aa6a Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 3 Oct 2013 12:33:45 +0900 Subject: [PATCH 021/150] Fixed --noImplicitAny trouble about tween.js --- tween.js/tween.js.d.ts.tscparams | 1 + 1 file changed, 1 insertion(+) create mode 100644 tween.js/tween.js.d.ts.tscparams diff --git a/tween.js/tween.js.d.ts.tscparams b/tween.js/tween.js.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/tween.js/tween.js.d.ts.tscparams @@ -0,0 +1 @@ +"" From 688387ff358860384b80dba8e00c0b2be3701e18 Mon Sep 17 00:00:00 2001 From: Christiaan Rakowski Date: Thu, 3 Oct 2013 10:28:47 +0200 Subject: [PATCH 022/150] Notification.confirm with buttonLabels array --- phonegap/phonegap.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/phonegap/phonegap.d.ts b/phonegap/phonegap.d.ts index 0e6d003236..5aea7effa8 100644 --- a/phonegap/phonegap.d.ts +++ b/phonegap/phonegap.d.ts @@ -478,6 +478,7 @@ declare var Media: { interface Notification { alert(message: string, alertCallback: Function, title?: string, buttonName?: string): void; confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string): void; + confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: Array): void; beep(times: number): void; vibrate(milliseconds: number): void; } From e6f2fa8481e34d5b73c303c20c2ad7612a138004 Mon Sep 17 00:00:00 2001 From: kyo-ago Date: Thu, 3 Oct 2013 22:02:28 +0900 Subject: [PATCH 023/150] add toggleClass --- appframework/appframework-tests.ts | 4 ++++ appframework/appframework.d.ts | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/appframework/appframework-tests.ts b/appframework/appframework-tests.ts index a769d2fcdd..d86c73266d 100644 --- a/appframework/appframework-tests.ts +++ b/appframework/appframework-tests.ts @@ -348,6 +348,10 @@ $.feat.cssTransformEnd; return $('').removeClass(''); })(); +((): appFrameworkCollection => { + return $('').toggleClass(''); +})(); + ((): appFrameworkCollection => { return $('').replaceClass('', ''); })(); diff --git a/appframework/appframework.d.ts b/appframework/appframework.d.ts index 5160e0dae2..c7cd4b2072 100644 --- a/appframework/appframework.d.ts +++ b/appframework/appframework.d.ts @@ -739,6 +739,19 @@ interface appFrameworkCollection { */ removeClass(className: string): appFrameworkCollection; + /** + * Adds or removes a css class to elements. + ``` + $().toggleClass("selected"); + ``` + + * @param {String} classes that are space delimited + * @param {Boolean} [state] force toggle to add or remove classes + * @return {Object} appframework object + * @title $().toggleClass(name) + */ + toggleClass(name: string, state?: boolean): appFrameworkCollection; + /** * Replaces a css class on elements. ``` From 119c213c5e5ff63e3e80d8b2d3d286d7a6aa2797 Mon Sep 17 00:00:00 2001 From: kyo-ago Date: Thu, 3 Oct 2013 22:23:35 +0900 Subject: [PATCH 024/150] bug fix --- appframework/appframework-tests.ts | 4 ++-- appframework/appframework.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/appframework/appframework-tests.ts b/appframework/appframework-tests.ts index d86c73266d..16cfe9802f 100644 --- a/appframework/appframework-tests.ts +++ b/appframework/appframework-tests.ts @@ -1,6 +1,6 @@ /// -af(function ($: appFrameworkCollection) {}); +af(($: appFrameworkStatic) => {}); ((): appFrameworkCollection => { return $('div'); //=> all DIV elements on the page @@ -192,7 +192,7 @@ $.feat.cssTransformEnd; ((): appFrameworkCollection => { - return $('').reduce(() => {}); + return $('').reduce((hoge) => { return hoge; }); })(); ((): number => { diff --git a/appframework/appframework.d.ts b/appframework/appframework.d.ts index c7cd4b2072..66cc32e1ba 100644 --- a/appframework/appframework.d.ts +++ b/appframework/appframework.d.ts @@ -53,8 +53,8 @@ interface appFrameworkStatic { * @return {Array} elements * @title $.each(elements,callback) */ - each(collection: any[], fn: (index: number, item: any) => boolean): void; - each(collection: any, fn: (key: string, value: any) => boolean): void; + each(collection: any[], fn: (index: number, item: any) => any): void; + each(collection: any, fn: (key: string, value: any) => any): void; /** * Extends an object with additional arguments From 4f3546a1e560a1dfecda80c8f8a423d630777c1b Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Thu, 3 Oct 2013 12:11:32 -0400 Subject: [PATCH 025/150] Fix noImplicitAny in handlebars.d.ts * diff from the previous change is on line 20 - "options" needed to be optional --- handlebars/handlebars.d.ts | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/handlebars/handlebars.d.ts b/handlebars/handlebars.d.ts index 4a0213edb9..8449fde075 100644 --- a/handlebars/handlebars.d.ts +++ b/handlebars/handlebars.d.ts @@ -6,17 +6,28 @@ declare module Handlebars { function registerHelper(name: string, fn: Function, inverse?: boolean): void; - function registerPartial(name: string, str): void; - function K(); - function createFrame(object); + function registerPartial(name: string, str: any): void; + function K(): void; + function createFrame(object: any): any; function Exception(message: string): void; class SafeString { constructor(str: string); static toString(): string; } - function parse(string: string); - function print(ast); - var logger; - function log(level, str): void; - function compile(environment, options?, context?, asObject?); + function parse(input: string): boolean; + var logger: Logger; + function log(level: number, obj: any): void; + function compile(input: any, options?: any): (context: any, options?: any) => string; + + interface Logger { + DEBUG: number; + INFO: number; + WARN: number; + ERROR: number; + level: number; + + methodMap: { [level: number]: string }; + + log(level: number, obj: string): void; + } } From e67ec88e0d383c5b1a9110dc552349c326583ec5 Mon Sep 17 00:00:00 2001 From: ashwinr Date: Thu, 3 Oct 2013 15:35:44 -0400 Subject: [PATCH 026/150] Update bind method for underscore.d.ts Bind on a parameter. This fixes typing errors caused by binding functions returned by other underscore methods such as partial/memoize/throttle/debounce etc. --- underscore/underscore.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index cd7a2867e5..fb4d87e171 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -861,7 +861,7 @@ declare module _ { * @return `fn` with `this` bound to `object`. **/ export function bind( - func: (...as: any[]) => any, + func: Function, context: any, ...arguments: any[]): () => any; From 8d3766f092463ed3cbb1b1d7db9a19d17540f134 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 4 Oct 2013 09:34:13 +0100 Subject: [PATCH 027/150] New definition and tests for mCustomScrollbar --- mCustomScrollbar/mCustomScrollbar-tests.ts | 150 ++++++++++++++++++++ mCustomScrollbar/mCustomScrollbar.d.ts | 152 +++++++++++++++++++++ 2 files changed, 302 insertions(+) create mode 100644 mCustomScrollbar/mCustomScrollbar-tests.ts create mode 100644 mCustomScrollbar/mCustomScrollbar.d.ts diff --git a/mCustomScrollbar/mCustomScrollbar-tests.ts b/mCustomScrollbar/mCustomScrollbar-tests.ts new file mode 100644 index 0000000000..983dc3a838 --- /dev/null +++ b/mCustomScrollbar/mCustomScrollbar-tests.ts @@ -0,0 +1,150 @@ +/// +/// + +class SimpleTest { + element: JQuery; + + constructor() { + this.element = $(".content"); + + this.element.mCustomScrollbar({ + scrollButtons: { + enable: true + } + }); + } +} + +class SimpleTestAllParams { + element: JQuery; + + constructor() { + this.element = $(".content"); + + this.element.mCustomScrollbar({ + set_width: false, + set_height: false, + horizontalScroll: false, + scrollInertia: 950, + mouseWheel: true, + mouseWheelPixels: "auto", + autoDraggerLength: true, + autoHideScrollbar: false, + scrollButtons: { + enable: false, + scrollType: "continuous", + scrollSpeed: "auto", + scrollAmount: 40 + }, + advanced: { + updateOnBrowserResize: true, + updateOnContentResize: false, + autoExpandHorizontalScroll: false, + autoScrollOnFocus: true, + normalizeMouseWheelDelta: false + }, + contentTouchScroll: true, + callbacks: { + onScrollStart: () => { }, + onScroll: () => { }, + onTotalScroll: () => { }, + onTotalScrollBack: () => { }, + onTotalScrollOffset: 0, + onTotalScrollBackOffset: 0, + whileScrolling: () => { } + }, + theme: "light" + }); + } +} + +class CallbacksTest { + element: JQuery; + + constructor() { + this.element = $(".content"); + + this.element.mCustomScrollbar({ + scrollButtons: { + enable: true + }, + callbacks: { + onScrollStart: () => { + this.OnScrollStart(); + }, + onScroll: () => { + this.OnScroll(); + }, + onTotalScroll: () => { + this.OnTotalScroll(); + }, + onTotalScrollBack: () => { + this.OnTotalScrollBack(); + }, + onTotalScrollOffset: 40, + onTotalScrollBackOffset: 20, + whileScrolling: () => { + this.WhileScrolling(); + } + } + }); + } + + OnScrollStart() { + $(".output .onScrollStart").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500); + } + + OnScroll() { + $(".output .onScroll").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500); + } + + OnTotalScroll() { + $(".output .onTotalScroll").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500); + } + + OnTotalScrollBack() { + $(".output .onTotalScrollBack").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500); + } + + WhileScrolling() { + $(".output .whileScrolling").stop(true, true).css("display", "inline-block").fadeOut(500); + } +} + +class DisableDestroyTest { + element: JQuery; + + constructor() { + this.element = $(".content"); + + this.element.mCustomScrollbar({ + scrollButtons: { + enable: true + } + }); + + $("#disable-scrollbar").click((e) => { + e.preventDefault(); + this.element.mCustomScrollbar("disable", true); + }); + $("#disable-scrollbar-no-reset").click((e) => { + e.preventDefault(); + this.element.mCustomScrollbar("disable"); + }); + $("#enable-scrollbar").click((e) => { + e.preventDefault(); + this.element.mCustomScrollbar("update"); + }); + $("#destroy-scrollbar").click((e) => { + e.preventDefault(); + this.element.mCustomScrollbar("destroy"); + }); + $("#rebuild-scrollbar").click((e) => { + this.element.mCustomScrollbar({ + scrollButtons: { + enable: true + } + }); + }); + } +} \ No newline at end of file diff --git a/mCustomScrollbar/mCustomScrollbar.d.ts b/mCustomScrollbar/mCustomScrollbar.d.ts new file mode 100644 index 0000000000..7ec42603b5 --- /dev/null +++ b/mCustomScrollbar/mCustomScrollbar.d.ts @@ -0,0 +1,152 @@ +// Type definitions for mCustomScrollbar 2.8.2 +// Project: http://manos.malihu.gr/jquery-custom-content-scroller/ +// Definitions by: Sarah Williams +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module MCustomScrollbar { + interface CustomScrollbarOptions { + /** + * Set the width of your content (overwrites CSS width), value in pixels (integer) or percentage (string) + */ + set_width?: any; + /** + * Set the height of your content (overwirtes CSS height), value in pixels (integer) or percentage (string) + */ + set_height?: any; + /** + * Add horizontal scrollbar (default is vertical), value: true, false + */ + horizontalScroll?: boolean; + /** + * Scrolling inertia (easing), value in milliseconds (0 for no scrolling inertia) + */ + scrollInertia?: number; + /** + * Mouse wheel support, value: true, false + */ + mouseWheel?: boolean; + /** + * Mouse wheel scrolling pixels amount, value in pixels (integer) or "auto" (script calculates and sets pixels amount according to content length) + */ + mouseWheelPixels?: any; + /** + * Auto-adjust scrollbar height/width according to content, values: true, false + */ + autoDraggerLength?: boolean; + /** + * Automatically hide the scrollbar when idle or mouse is not over the content + */ + autoHideScrollbar?: boolean; + scrollButtons?: { + /** + * Scroll buttons scroll type, values: "continuous" (scroll continuously while pressing the button), "pixels" (scrolls by a fixed number of pixels on each click") + */ + scrollType?: string; + /** + * Scroll buttons continuous scrolling speed, integer value or "auto" (script calculates and sets the speed according to content length) + */ + scrollSpeed?: any; + /** + * Scroll buttons pixels scrolling amount, value in pixels + */ + scrollAmount?: number; + } + advanced?: { + /** + * Update scrollbars on browser resize (for fluid content blocks and layouts based on percentages), values: true, false. Set to false only when you content has fixed dimensions + */ + updateOnBrowserResize?: boolean; + /** + * Auto-update scrollbars on content resize (useful when adding/changing content progrmatically), value: true, false. Setting this to true makes the script check for content + * length changes (every few milliseconds) and automatically call plugin's update method to adjust the scrollbar accordingly + */ + updateOnContentResize?: boolean; + /** + * Auto-expanding content's width on horizontal scrollbars, values: true, false. Set to true if you have horizontal scrollbr on content that change on-the-fly. Demo contains + * blocks with images and horizontal scrollbars that use this option parameter + */ + autoExpandHorizontalScroll?: boolean; + /** + * Auto-scrolling on elements that have focus (e.g. scrollbar automatically scrolls to form text fields when the TAB key is pressed), values: true, false + */ + autoScrollOnFocus?: boolean; + /** + * Normalize mouse wheel delta (-1/1), values: true, false + */ + normalizeMouseWheelDelta?: boolean; + } + /** + * Additional scrolling method by touch-swipe content (for touch enabled devices), value: true, false + */ + contentTouchScroll?: boolean; + /** + * All of the following callbacks option have examples in the callback demo - http://manos.malihu.gr/tuts/custom-scrollbar-plugin/callbacks_example.html + */ + callbacks?: { + /** + * User defined callback function, triggered on scroll start event. You can call your own function(s) each time a scroll event begins + */ + onScrollStart?: () => void; + /** + * User defined callback function, triggered on scroll event. Call your own function(s) each time a scroll event completes + */ + onScroll?: () => void; + /** + * User defined callback function, triggered when scroll end-limit is reached + */ + onTotalScrollBack?: () => void; + /** + * Scroll end-limit offset, value in pixels + */ + onTotalScrollOffset?: number; + /** + * User defined callback function, triggered while scrolling + */ + whileScrolling?: () => void; + } + /** + * Set a scrollbar ready-to-use theme. See themes demo for all themes - http://manos.malihu.gr/tuts/custom-scrollbar-plugin/scrollbar_themes_demo.html + */ + theme?: string; + } + + interface ScrollToParameterOptions { + /** + * Scroll-to animation speed, value in milliseconds + */ + scrollInertia?: number; + /** + * Scroll scrollbar dragger (instead of content) to a number of pixels, values: true, false + */ + moveDragger?: boolean; + /** + * Trigger user defined callback after scroll-to completes, value: true, false + */ + callbacks?: boolean; + } +} + +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" + * + * @param method Method name to call on scrollbar e.g. "update", "stop" + */ + mCustomScrollbar(method: string): JQuery; + /** + * Calls the scrollTo method on the scrollbar + * + * @param scrollTo Method name as a string "scrollTo" + * @param parameter String or pixel integer value to specify where to scroll to e.g. "bottom", "top" or 20 + * @param options Override default options + */ + mCustomScrollbar(scrollTo: string, parameter: any, options?: MCustomScrollbar.ScrollToParameterOptions): JQuery; +} \ No newline at end of file From 4cf391a754ff2c3398d7923e5a75e38bcd21b4f7 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 4 Oct 2013 09:45:57 +0100 Subject: [PATCH 028/150] Updated to include new mCustomScrollbar details --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 59104d4d55..0db07108da 100755 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ List of Definitions * [Livestamp.js](https://github.com/mattbradley/livestampjs) (by [Vincent Bortone](https://github.com/vbortone)) * [Logg](https://github.com/dpup/node-logg) (by [Bret Little](https://github.com/blittle)) * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) +* [mCustomScrollbar] (https://http://manos.malihu.gr/jquery-custom-content-scroller/) (by [Sarah Williams] (https://github.com/flurg)) * [Meteor](https://www.meteor.com) (by [Dave Allen](https://github.com/fullflavedave)) * [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)) From 0e80e00f0f7427148cc7200a5ab4f370c2b88070 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 4 Oct 2013 10:27:04 +0100 Subject: [PATCH 029/150] Changed project URL to github project --- README.md | 2 +- mCustomScrollbar/mCustomScrollbar.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0db07108da..5f43d8b651 100755 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ List of Definitions * [Livestamp.js](https://github.com/mattbradley/livestampjs) (by [Vincent Bortone](https://github.com/vbortone)) * [Logg](https://github.com/dpup/node-logg) (by [Bret Little](https://github.com/blittle)) * [Marked](https://github.com/chjj/marked) (by [William Orr](https://github.com/worr)) -* [mCustomScrollbar] (https://http://manos.malihu.gr/jquery-custom-content-scroller/) (by [Sarah Williams] (https://github.com/flurg)) +* [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)) * [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)) diff --git a/mCustomScrollbar/mCustomScrollbar.d.ts b/mCustomScrollbar/mCustomScrollbar.d.ts index 7ec42603b5..7e0a529ef6 100644 --- a/mCustomScrollbar/mCustomScrollbar.d.ts +++ b/mCustomScrollbar/mCustomScrollbar.d.ts @@ -1,5 +1,5 @@ // Type definitions for mCustomScrollbar 2.8.2 -// Project: http://manos.malihu.gr/jquery-custom-content-scroller/ +// Project: https://github.com/malihu/malihu-custom-scrollbar-plugin // Definitions by: Sarah Williams // Definitions: https://github.com/borisyankov/DefinitelyTyped From f66d407c43f5c4076707166711464302cc3b799c Mon Sep 17 00:00:00 2001 From: Dmitrij Koniajev Date: Sat, 5 Oct 2013 18:25:36 +0300 Subject: [PATCH 030/150] fixed getTileUrl method signature of ImageMapTypeOptions interface --- googlemaps/google.maps.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 4eef2d2cd5..1bd9c491f3 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -866,7 +866,7 @@ declare module google.maps { export interface ImageMapTypeOptions { alt?: string; - getTileUrl: (Point: number) => string; + getTileUrl: (tileCoord: Point, zoom: number) => string; maxZoom?: number; minZoom?: number; name?: string; From 2374fc4589c24cac1574678dd038dc7bc647d816 Mon Sep 17 00:00:00 2001 From: Christiaan Rakowski Date: Sat, 5 Oct 2013 17:55:17 +0200 Subject: [PATCH 031/150] changed Array to string[], and added test --- phonegap/phonegap-tests.ts | 6 ++++++ phonegap/phonegap.d.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/phonegap/phonegap-tests.ts b/phonegap/phonegap-tests.ts index 273551c11d..78b45609b9 100644 --- a/phonegap/phonegap-tests.ts +++ b/phonegap/phonegap-tests.ts @@ -655,6 +655,12 @@ function test_notification() { onConfirm, 'Game Over', 'Restart,Exit' + ); + navigator.notification.confirm( + 'You are the winner!', + onConfirm, + 'Game Over', + ['Restart','Exit'] ); navigator.notification.beep(2); navigator.notification.vibrate(2500); diff --git a/phonegap/phonegap.d.ts b/phonegap/phonegap.d.ts index 5aea7effa8..6e873163be 100644 --- a/phonegap/phonegap.d.ts +++ b/phonegap/phonegap.d.ts @@ -478,7 +478,7 @@ declare var Media: { interface Notification { alert(message: string, alertCallback: Function, title?: string, buttonName?: string): void; confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string): void; - confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: Array): void; + confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string[]): void; beep(times: number): void; vibrate(milliseconds: number): void; } From 0fb291f31f0d416bc9dc764ebb8871dfdf90298e Mon Sep 17 00:00:00 2001 From: rsmithh Date: Tue, 8 Oct 2013 17:13:21 +0100 Subject: [PATCH 032/150] Update chrome.d.ts Fix argument to BookmarkRemovedEvent --- chrome/chrome.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 3a01db6c1c..4df325b19d 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -114,7 +114,7 @@ declare module chrome.bookmarks { export function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void; export function removeTree(id: string, callback?: Function): void; - var onRemoved: chrome.alarms.AlarmEvent; + var onRemoved: BookmarkRemovedEvent; var onImportEnded: BookmarkImportEndedEvent; var onImportBegan: BookmarkImportBeganEvent; var onChanged: BookmarkChangedEvent; From b8829669a761f3ca8d2f2e5f930632eaf5745c2a Mon Sep 17 00:00:00 2001 From: Tom Kuijsten Date: Wed, 9 Oct 2013 13:43:24 +0200 Subject: [PATCH 033/150] Added generic overload method declarations for the ko.utils.arrayX functions --- knockout/knockout.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index d5f8310cdd..08f7bc88b1 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -242,22 +242,36 @@ interface KnockoutUtils { fieldsIncludedWithJsonPost: any[]; + arrayForEach(array: T[], action: (item: T) => void): void; + arrayForEach(array: any[], action: (any) => void ): void; arrayIndexOf(array: any[], item: any): number; + arrayFirst(array: T[], predicate: (item: T) => boolean, predicateOwner?: any): T; + arrayFirst(array: any[], predicate: (item) => boolean, predicateOwner?: any): any; arrayRemoveItem(array: any[], itemToRemove: any): void; + arrayGetDistinctValues(array: T[]): T[]; + arrayGetDistinctValues(array: any[]): any[]; + arrayMap(array: T[], mapping: (item: T) => U): U[]; + arrayMap(array: any[], mapping: (item) => any): any[]; + arrayFilter(array: T[], predicate: (item: T) => boolean): T[]; + arrayFilter(array: any[], predicate: (item) => boolean): any[]; + arrayPushAll(array: T[], valuesToPush: T[]): T[]; + arrayPushAll(array: any[], valuesToPush: any[]): any[]; + arrayPushAll(array: KnockoutObservableArray, valuesToPush: T[]): T[]; + arrayPushAll(array: KnockoutObservableArray, valuesToPush: any[]): any[]; extend(target, source); From 6b8d398be958896265317974a5e2606cb38c187e Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 10 Oct 2013 17:02:39 +0100 Subject: [PATCH 034/150] Added errorList / errorMap properties and valid / size / hideErrors functions with associated tests --- jquery.validation/jquery.validation-tests.ts | 6 ++++++ jquery.validation/jquery.validation.d.ts | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/jquery.validation/jquery.validation-tests.ts b/jquery.validation/jquery.validation-tests.ts index 922baaafe5..b8f7a16aec 100644 --- a/jquery.validation/jquery.validation-tests.ts +++ b/jquery.validation/jquery.validation-tests.ts @@ -190,6 +190,12 @@ function test_methods() { var validator = $("#myform").validate(); validator.resetForm(); validator.showErrors({ "firstname": "I know that your firstname is Pete, Pete!" }); + validator.hideErrors(); + var isValid: boolean = validator.valid(); + var size: number = validator.size(); + var errorMap: Object = validator.errorMap; + var errorList: ErrorListItem[] = validator.errorList; + $("#summary").text(validator.numberOfInvalids() + " field(s) are invalid"); jQuery.validator.setDefaults({ debug: true diff --git a/jquery.validation/jquery.validation.d.ts b/jquery.validation/jquery.validation.d.ts index 3a9303fe66..2b708666c4 100644 --- a/jquery.validation/jquery.validation.d.ts +++ b/jquery.validation/jquery.validation.d.ts @@ -36,6 +36,12 @@ interface ValidationOptions wrapper?: string; } +interface ErrorListItem +{ + message: string; + element: HTMLElement; +} + interface Validator { addClassRules(name: string, rules: any): void; @@ -49,6 +55,12 @@ interface Validator setDefaults(defaults: ValidationOptions): void; settings: ValidationOptions; showErrors(errors: any): void; + hideErrors(): void; + valid(): boolean; + size(): number; + + errorMap: Object; + errorList: ErrorListItem[]; } interface JQuery From e97c31c8fdc8804a6328d1556f19449d2923d390 Mon Sep 17 00:00:00 2001 From: Sean Clark Hess Date: Thu, 10 Oct 2013 15:37:18 -0600 Subject: [PATCH 035/150] Q: reversed the order of function overrides to put promises first for nested promises --- q/Q.d.ts | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/q/Q.d.ts b/q/Q.d.ts index a8b4b3e335..95d1007212 100644 --- a/q/Q.d.ts +++ b/q/Q.d.ts @@ -8,10 +8,10 @@ declare function Q(promise: Q.IPromise): Q.Promise; declare module Q { interface IPromise { - then(onFulfill: (value: T) => U, onReject?: (reason) => U): IPromise; + then(onFulfill: (value: T) => IPromise, onReject?: (reason) => IPromise): IPromise; then(onFulfill: (value: T) => IPromise, onReject?: (reason) => U): IPromise; then(onFulfill: (value: T) => U, onReject?: (reason) => IPromise): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason) => IPromise): IPromise; + then(onFulfill: (value: T) => U, onReject?: (reason) => U): IPromise; } interface Deferred { @@ -26,10 +26,10 @@ declare module Q { fin(finallyCallback: () => any): Promise; finally(finallyCallback: () => any): Promise; - then(onFulfill: (value: T) => U, onReject?: (reason) => U, onProgress?: Function): Promise; + then(onFulfill: (value: T) => IPromise, onReject?: (reason) => IPromise, onProgress?: Function): Promise; then(onFulfill: (value: T) => IPromise, onReject?: (reason) => U, onProgress?: Function): Promise; then(onFulfill: (value: T) => U, onReject?: (reason) => IPromise, onProgress?: Function): Promise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason) => IPromise, onProgress?: Function): Promise; + then(onFulfill: (value: T) => U, onReject?: (reason) => U, onProgress?: Function): Promise; spread(onFulfilled: Function, onRejected?: Function): Promise; @@ -71,22 +71,22 @@ declare module Q { } // if no fulfill, reject, or progress provided, returned promise will be of same type - export function when(value: T): Promise; export function when(value: IPromise): Promise; + export function when(value: T): Promise; // If a non-promise value is provided, it will not reject or progress - export function when(value: T, onFulfilled: (val: T) => U): Promise; export function when(value: T, onFulfilled: (val: T) => IPromise): Promise; + export function when(value: T, onFulfilled: (val: T) => U): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason) => U, onProgress?: (progress) => any): Promise; + export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason) => IPromise, onProgress?: (progress) => any): Promise; export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason) => U, onProgress?: (progress) => any): Promise; export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason) => IPromise, onProgress?: (progress) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason) => IPromise, onProgress?: (progress) => any): Promise; + export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason) => U, onProgress?: (progress) => any): Promise; //export function try(method: Function, ...args: any[]): Promise; // <- This is broken currently - not sure how to fix. - export function fbind(method: (...args: any[]) => T, ...args: any[]): (...args: any[]) => Promise; export function fbind(method: (...args: any[]) => IPromise, ...args: any[]): (...args: any[]) => Promise; + export function fbind(method: (...args: any[]) => T, ...args: any[]): (...args: any[]) => Promise; export function fcall(method: (...args) => T, ...args: any[]): Promise; @@ -110,14 +110,15 @@ declare module Q { export function allResolved(promises: any[]): Promise[]>; export function allResolved(promises: IPromise[]): Promise[]>; - export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason) => U): Promise; + export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason) => IPromise): Promise; export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason) => U): Promise; export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason) => IPromise): Promise; - export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason) => IPromise): Promise; - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason) => U): Promise; + export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason) => U): Promise; + + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason) => IPromise): Promise; export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason) => U): Promise; export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason) => IPromise): Promise; - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason) => IPromise): Promise; + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason) => U): Promise; export function timeout(promise: Promise, ms: number, message?: string): Promise; @@ -132,8 +133,8 @@ declare module Q { export function reject(reason?): Promise; - export function promise(resolver: (resolve: (val: T) => void , reject: (reason) => void , notify: (progress) => void ) => void ): Promise; export function promise(resolver: (resolve: (val: IPromise) => void , reject: (reason) => void , notify: (progress) => void ) => void ): Promise; + export function promise(resolver: (resolve: (val: T) => void , reject: (reason) => void , notify: (progress) => void ) => void ): Promise; export function promised(callback: (...any) => T): (...any) => Promise; @@ -147,8 +148,8 @@ declare module Q { export var oneerror: () => void; export var longStackSupport: boolean; - export function resolve(object: T): Promise; export function resolve(object: IPromise): Promise; + export function resolve(object: T): Promise; } declare module "q" { From 7405a33a7cda99f9026fce204c5b4b5b953055db Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Thu, 10 Oct 2013 19:31:06 -0400 Subject: [PATCH 036/150] Fixes for underscore.d.ts * the type of elements in the array returned by pluck have no correlation to the type of elements in the source array - they actually relate to the values of the provided property name * bind wasn't working for a function typed as "Function". In our use case, we call _.throttle() then use the result in _.bind(). * the hash function passed into memoize may take multiple arguments --- underscore/underscore.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index cd7a2867e5..3da42ecbaa 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -382,7 +382,7 @@ declare module _ { **/ export function pluck( list: Collection, - propertyName: string): T[]; + propertyName: string): any[]; /** * Returns the maximum value in list. @@ -839,7 +839,7 @@ declare module _ { start: number, stop: number, step?: number): number[]; - + /** * @see _.range * @param stop Stop here. @@ -861,7 +861,7 @@ declare module _ { * @return `fn` with `this` bound to `object`. **/ export function bind( - func: (...as: any[]) => any, + func: Function, context: any, ...arguments: any[]): () => any; @@ -900,7 +900,7 @@ declare module _ { **/ export function memoize( fn: Function, - hashFn?: (n: any) => string): Function; + hashFn?: (...args: any[]) => string): Function; /** * Much like setTimeout, invokes function after wait milliseconds. If you pass the optional arguments, @@ -1624,7 +1624,7 @@ declare class _ { * @see _.shuffle **/ shuffle(): T[]; - + /** * Wrapped type `any[]`. * @see _.sample From 6b1d7dfc652f47ab1af8c8eb935ff0f4b4bed6ab Mon Sep 17 00:00:00 2001 From: rsmithh Date: Fri, 11 Oct 2013 10:37:44 +0100 Subject: [PATCH 037/150] Added chrome.identity.getAuthToken --- chrome/chrome.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 4df325b19d..635cbc4d34 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1056,6 +1056,15 @@ declare module chrome.history { var onVisitRemoved: HistoryVisitRemovedEvent; } + +//////////////////// +// Identity +//////////////////// +declare module chrome.identity { + var getAuthToken: (options:{}, cb:(token:{})=>void)=>void; +} + + //////////////////// // Internationalization //////////////////// From f83a65a5deefc1d85ae14e5ea8cbbf6a058222d3 Mon Sep 17 00:00:00 2001 From: Maksim Kozhukh Date: Fri, 11 Oct 2013 16:06:19 +0300 Subject: [PATCH 038/150] Defenitions for dhtmlxScheduler and dhtmlxGantt --- README.md | 2 + dhtmlxgantt/dhtmlxgantt-test.ts | 33 + dhtmlxgantt/dhtmlxgantt.d.ts | 989 ++++++++++++++ dhtmlxscheduler/dhtmlxscheduler-test.ts | 33 + dhtmlxscheduler/dhtmlxscheduler.d.ts | 1604 +++++++++++++++++++++++ 5 files changed, 2661 insertions(+) create mode 100644 dhtmlxgantt/dhtmlxgantt-test.ts create mode 100644 dhtmlxgantt/dhtmlxgantt.d.ts create mode 100644 dhtmlxscheduler/dhtmlxscheduler-test.ts create mode 100644 dhtmlxscheduler/dhtmlxscheduler.d.ts diff --git a/README.md b/README.md index ef760fe8ae..33f7c032a9 100755 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ List of Definitions * [CodeMirror](http://codemirror.net) (by [François de Campredon](https://github.com/fdecampredon)) * [Commander](http://github.com/visionmedia/commander.js) (by [Marcelo Dezem](https://github.com/mdezem)) * [d3.js](http://d3js.org/) (from TypeScript samples) +* [dhtmlxGantt](http://dhtmlx.com/docs/products/dhtmlxGantt) (by [Maksim Kozhukh](http://github.com/mkozhukh)) +* [dhtmlxScheduler](http://dhtmlx.com/docs/products/dhtmlxScheduler) (by [Maksim Kozhukh](http://github.com/mkozhukh)) * [docCookies](https://developer.mozilla.org/en-US/docs/Web/API/document.cookie) (by [Jon Egerton](https://github.com/jonegerton)) * [domo](http://domo-js.com/) (by [Steve Fenton](https://github.com/Steve-Fenton)) * [dust](http://linkedin.github.com/dustjs) (by [Marcelo Dezem](https://github.com/mdezem)) diff --git a/dhtmlxgantt/dhtmlxgantt-test.ts b/dhtmlxgantt/dhtmlxgantt-test.ts new file mode 100644 index 0000000000..00546bd0c3 --- /dev/null +++ b/dhtmlxgantt/dhtmlxgantt-test.ts @@ -0,0 +1,33 @@ +/// + +//date operations +var start: Date = gantt.date.week_start(new Date()); +var next: Date = gantt.date.add(new Date(), 1, "week"); + +//hotkeys +gantt.keys.edit_cancel = 13; + +//config options +gantt.config.details_on_create = true; +gantt.config.scale_height = 40; +gantt.config.xml_date = "%m-%d-%Y"; + +//templates +gantt.templates.task_class = function (start: Date, end: Date, task: any) { + if (task.some) + return "classA"; + else + return "classB"; +} + +//locale +gantt.locale.labels.new_task = "New task"; + +//API +gantt.init("scheduler_here", start); +gantt.load("/data/events"); + +//events +gantt.attachEvent("onBeforeLightbox", function (id: string) { + gantt.showTask(id); +}); \ No newline at end of file diff --git a/dhtmlxgantt/dhtmlxgantt.d.ts b/dhtmlxgantt/dhtmlxgantt.d.ts new file mode 100644 index 0000000000..fbdba35432 --- /dev/null +++ b/dhtmlxgantt/dhtmlxgantt.d.ts @@ -0,0 +1,989 @@ +// Type definitions for dhtmlxGantt 2.0 +// Project: http://dhtmlx.com/docs/products/dhtmlxGantt +// Definitions by: Maksim Kozhukh +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +interface GanttTemplates{ + /** + * specifies the format of dates that are set by means of API methods. Used to parse incoming dates + * @param date the date which needs formatting + */ + api_date(date: Date): string; + + /** + * specifies the format of dates in the "Start time" column + * @param date the date which needs formatting + */ + date_grid(date: Date): string; + + /** + * specifies the date format of the time scale (X-Axis) + * @param date the date which needs formatting + */ + date_scale(date: Date): string; + + /** + * specifies the text of tooltips that are displayed when the user creates a new dependency link + * @param from the id of the source task + * @param from_start true, if the link is being dragged from the start of the source task, false - if
from the end of the task + * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) + * @param to_start true, if the link is being dragged to the start of the target task, false - if
to the end of the task + */ + drag_link(from: any, from_start: boolean, to: any, to_start: boolean): string; + + /** + * specifies the CSS class that will be applied to the link receiver (pop-up circle near the task bar) + * @param from the id of the source task + * @param from_start true, if the link is being dragged from the start of the source task, false - if
from the end of the task + * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) + * @param to_start true, if the link is being dragged to the start of the target task, false - if
to the end of the task + */ + drag_link_class(from: any, from_start: boolean, to: any, to_start: boolean): string; + + /** + * specifies the custom content inserted before the labels of child items in the tree column + * @param task the task object + */ + grid_blank(task: any): string; + + /** + * specifies the icon of child items in the tree column + * @param task the task object + */ + grid_file(task: any): string; + + /** + * specifies the icon of parent items in the tree column + * @param task the task object + */ + grid_folder(task: any): string; + + /** + * specifies the CSS class that will be applied to the headers of the table's columns + * @param column the column's configuration object + * @param config the column's id ('name' attribute) + */ + grid_header_class(column: any, config: string): string; + + /** + * specifies the indent of the child items in a branch (in the tree column) + * @param task the task object + */ + grid_indent(task: any): string; + + /** + * specifies the icon of the open/close sign in the tree column + * @param task the task object + */ + grid_open(task: any): string; + + /** + * specifies the CSS class that will be applied to a grid row + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + grid_row_class(start: Date, end: Date, task: any): string; + + /** + * specifies the CSS class that will be applied to a link + * @param link the link object + */ + link_class(link: any): string; + + /** + * specifies the text in the header of the link's "delete" confirm window + * @param link the link object + */ + link_description(link: any): string; + + /** + * specifies the text in the completed part of the task bar + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + progress_text(start: Date, end: Date, task: any): string; + + /** + * specifies the content of the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_content(start: Date, end: Date, task: any): string; + + /** + * specifies the date of the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_date(start: Date, end: Date, task: any): string; + + /** + * specifies the title of the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_title(start: Date, end: Date, task: any): string; + + /** + * specifies the CSS class that will be applied to the time scale of the timeline area + * @param date the date of a cell + */ + scale_cell_class(date: Date): string; + + /** + * specifies the CSS class that will be applied to the cells of the timeline area + * @param item the task object assigned to the row + * @param date the date of a cell + */ + task_cell_class(item: Date, date: Date): string; + + /** + * specifies the CSS class that will be applied to task bars + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_class(start: Date, end: Date, task: any): string; + + /** + * specifies the date format of the label in the 'Time period' section of the lightbox + * @param date the date which needs formatting + */ + task_date(date: Date): string; + + /** + * specifies the CSS class that will be applied to the row of the timeline area + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_row_class(start: Date, end: Date, task: any): string; + + /** + * specifies the text in the task bars and the header of the lightbox + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_text(start: Date, end: Date, task: any): string; + + /** + * specifies the date period in the header of the lightbox + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_time(start: Date, end: Date, task: any): string; + + /** + * specifies the format of the drop-down time selector in the lightbox + * @param date the date which needs formatting + */ + time_picker(date: Date): string; + + /** + * specifies the format of start and end dates displayed in the tooltip + * @param date the date which needs formatting + */ + tooltip_date_format(date: Date): string; + + /** + * specifies the text of tooltips + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + tooltip_text(start: Date, end: Date, task: any): string; + + /** + * a string from an XML file is converted into a date object in conformity with this template + * @param date the date which needs formatting + */ + xml_date(date: Date): string; + + /** + * a date object is converted into a string in conformity with this template. Used to send data back to the server + * @param date the date which needs formatting + */ + xml_format(date: Date): string; + + /** + * specifies the text assigned to tasks bars on the right side + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + rightside_text(start: Date, end: Date, task: any): string; + + /** + * specifies the text assigned to tasks bars on the left side + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + leftside_text(start: Date, end: Date, task: any): string; +} + +interface GanttConfigOptions{ + /** + * sets the date format that will be used by the addTask() method to +parse the start_date, end_date properties in case they are specified as strings + */ + api_date: string; + + /** + * enables automatic adjusting of the grid's columns to the grid's width + */ + autofit: boolean; + + /** + * stores a collection of buttons resided in the left bottom corner of the lightbox + */ + buttons_left: any; + + /** + * stores a collection of buttons resided in the right bottom corner of the lightbox + */ + buttons_right: any; + + /** + * configures the columns of the table + */ + columns: any; + + /** + * sets the format of dates in the "Start time" column of the table + */ + date_grid: string; + + /** + * sets the format of the time scale (X-Axis) + */ + date_scale: string; + + /** + * 'says' to open the lightbox while creating new events by clicking on the '+' button + */ + details_on_create: boolean; + + /** + * 'says' to open the lightbox after double clicking on a task + */ + details_on_dblclick: boolean; + + /** + * enables the possibility to drag the lightbox by the header + */ + drag_lightbox: boolean; + + /** + * enables creating dependency links by drag-and-drop + */ + drag_links: boolean; + + /** + * stores the types of available drag-and-drop modes + */ + drag_mode: any; + + /** + * enables the possibility to move tasks by drag-and-drop + */ + drag_move: boolean; + + /** + * enables the possibility to change the task progress by dragging the progress knob + */ + drag_progress: boolean; + + /** + * enables the possibility to resize tasks by drag-and-drop + */ + drag_resize: boolean; + + /** + * sets the number of 'gantt.config.duration_unit' units that will correspond to one unit of the 'duration' data property. + */ + duration_step: number; + + /** + * sets the duration unit in milliseconds + */ + duration_unit: number; + + /** + * sets the end value of the time scale (X–Axis) + */ + end_date: Date; + + /** + * 'says' the Gantt chart to re-render the scale each time a task doesn't fit into the existing scale interval + */ + fit_tasks: boolean; + + /** + * sets the maximum width of the grid + */ + grid_width: number; + + /** + * sets whether the timeline area will be initially scrolled to display the earliest task + */ + initial_scroll: boolean; + + /** + * specifies the lightbox object + */ + lightbox: any; + + /** + * increases the height of the lightbox + */ + lightbox_additional_height: number; + + /** + * sets the size of the link arrow + */ + link_arrow_size: number; + + /** + * sets the name of the attribute that will specify the id of the link's HTML element + */ + link_attribute: string; + + /** + * sets the width of dependency links in the timeline area + */ + link_line_width: number; + + /** + * sets the width of the area (over the link) sensitive to clicks + */ + link_wrapper_width: number; + + /** + * stores the types of links dependencies + */ + links: any; + + /** + * sets the minimum width for a column + */ + min_column_width: number; + + /** + * sets the minimum step (in milliseconds) for task's time values + */ + min_duration: number; + + /** + * activates the 'branch' mode that allows dragging tasks only within the parent branch + */ + order_branch: boolean; + + /** + * defines whether the task form will appear from the left/right side of the screen or near the selected task + */ + quick_info_detached: boolean; + + /** + * stores a collection of buttons resided in the pop-up edit form + */ + quickinfo_buttons: any; + + /** + * activates the read-only mode for the Gantt chart + */ + readonly: boolean; + + /** + * enables rounding the task's start and end dates to the nearest scale marks + */ + round_dnd_dates: boolean; + + /** + * sets the default height for rows of the table + */ + row_height: number; + + /** + * sets the height of the time scale and the header of the grid + */ + scale_height: number; + + /** + * sets the unit of the time scale (X-Axis) + */ + scale_unit: string; + + /** + * enables selection of tasks in the Gantt chart + */ + select_task: boolean; + + /** + * enables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server + */ + server_utc: boolean; + + /** + * enables showing a progress/spinner while data is loading + */ + show_progress: boolean; + + /** + * enables sorting in the table + */ + sort: boolean; + + /** + * sets the start value of the time scale (X–Axis) + */ + start_date: Date; + + /** + * sets the start day of weeks + */ + start_on_monday: boolean; + + /** + * sets the step of the time scale (X-Axis) + */ + step: number; + + /** + * specifies the second time scale(s) + */ + subscales: any; + + /** + * sets the name of the attribute that will specify the id of the task's HTML element + */ + task_attribute: string; + + /** + * sets the format of the date label in the 'Time period' section of the lightbox + */ + task_date: string; + + /** + * sets the height of task bars in the timeline area + */ + task_height: number; + + /** + * sets the offset (in pixels) of the nearest task from the left border in the timeline + */ + task_scroll_offset: number; + + /** + * sets the format of the time drop-down selector in the lightbox + */ + time_picker: string; + + /** + * sets the minimum step (in minutes) for the task's time values + */ + time_step: number; + + /** + * sets the timeout in milliseconds before the tooltip is displayed for a task + */ + tooltip_timeout: number; + + /** + * enables/disables the touch support for the Gantt chart + */ + touch: any; + + /** + * defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture + */ + touch_drag: any; + + /** + * sets the date format that is used to parse data from the data set + */ + xml_date: string; +} + + +interface GanttDateHelpers{ + add(origin: Date, count: number, unit: string): Date; + copy(origin: Date): Date; + + date_part(origin: Date): Date; + time_part(origin: Date): Date; + + day_start(origin: Date): Date; + month_start(origin: Date): Date; + week_start(origin: Date): Date; + year_start(origin: Date): Date; + + getISOWeek(origin: Date): number; + getUTCISOWeek(origin: Date): number; + + date_to_str(format: string): any; + str_to_date(format: string): any; + convert_to_utc(origin: Date): Date; + to_fixed(value: number): string; +} + +interface GanttHotkeys{ + edit_save: number; + edit_cancel: number; +} + +//Gantt.locale + +interface GanttLocaleDate{ + month_full: string[]; + month_short: string[]; + day_full: string[]; + day_short: string[]; +} + +interface GanttLocaleLabels{ + new_task: string; + icon_save: string; + icon_cancel: string; + icon_details: string; + icon_edit: string; + icon_delete: string; + confirm_closing: string; + confirm_deleting: string; + section_description: string; + section_time: string; + confirm_link_deleting: string; + link_from: string; + link_to: string; + link_start: string; + link_end: string; + minutes: string; + hours: string; + days: string; + weeks: string; + months: string; + years: string; +} + +interface GanttLocale{ + date: GanttLocaleDate; + labels: GanttLocaleLabels; +} + +interface GanttStatic{ + templates: GanttTemplates; + config: GanttConfigOptions; + date: GanttDateHelpers; + keys: GanttHotkeys; + skin: String; + version: String; + locale: GanttLocale; + $click: any; + + /** + * adds a new dependency link + * @param link the link object + */ + addLink(link: any): any; + + /** + * adds a new task + * @param task the task object + * @param parent the parent's id + */ + addTask(task: any, parent: string): any; + + /** + * attaches the handler to an inner event of dhtmlxGantt + * @param name the event's name, case-insensitive + * @param handler the handler function + */ + attachEvent(name: string, handler: (...args: any[])=>any): any; + + /** + * calls an inner event + * @param name the event's name, case-insensitive + * @param params an array of the event-related data + */ + callEvent(name: string, params: any): boolean; + + /** + * changes the link's id + * @param id the current link's id + * @param new_id the new link's id + */ + changeLinkId(id: any, new_id: any); + + /** + * changes the task's id + * @param id the current task's id + * @param new_id the new task's id + */ + changeTaskId(id: any, new_id: any); + + /** + * checks whether an event has some handler(s) specified + * @param name the event's name + */ + checkEvent(name: string): boolean; + + /** + * removes all tasks from the Gantt chart + */ + clearAll(); + + /** + * closes the branch with the specified id + * @param id the branch id + */ + close(id : any); + + /** + * deletes the specified dependency link + * @param id the dependency link's id + */ + deleteLink(id: any); + + /** + * deletes the specified task + * @param id the task's id + */ + deleteTask(id: string); + + /** + * detaches all handlers from events (which were attached before by the attachEvent() method) + */ + detachAllEvents(); + + /** + * detaches a handler from an event (which was attached before by the attachEvent() method) + * @param id the event's id + */ + detachEvent(id: string); + + /** + * iterates over specified tasks of the Gantt chart + * @param code a function that will iterate over tasks. Takes a task object as a parameter + * @param parent the parent id. If specified, the function will iterate over childs of the
specified parent + * @param master the object, that 'this' will refer to + */ + eachTask(code : (...args: any[])=>any, parent?: any, master?: any); + + /** + * returns the 1st-level child tasks of the specified parent branch + * @param id the parent branch's id + */ + getChildren(id: any): any; + + /** + * get the index of a task in the tree + * @param id the task id + */ + getGlobalTaskIndex(id: any); + + /** + * gets the label of a select control in the lightbox + * @param property the name of a data property that the control is mapped to + * @param key the option's id. This parameter is compared with the task's data property to
assign the select's option to the task + */ + getLabel(property: string, key: any); + + /** + * gets the lightbox's HTML object element + */ + getLightbox(): HTMLElement; + + /** + * returns the object of the lightbox's section + * @param name the name of the section + */ + getLightboxSection(name: string): any; + + /** + * returns values of the lightbox's sections + */ + getLightboxValues(): any; + + /** + * returns the dependency link object by the specified id + * @param id the link id + */ + getLink(id: any): any; + + /** + * returns the HTML element of the specified dependency link + * @param id the link id + */ + getLinkNode(id: any): HTMLElement; + + /** + * returns the id of the next item (no matter what the level of nesting is: the same or different) + * @param id the task id + */ + getNext(id: any): any; + + /** + * returns the id of the previous item (no matter what the level of nesting is: the same or different) + * @param id the task id + */ + getPrev(id: any): any; + + /** + * returns the scroll position + */ + getScrollState(): any; + + /** + * returns the id of the selected task + */ + getSelectedId(): any; + + /** + * gets the current state of the Gantt chart + */ + getState(): any; + + /** + * returns the task object + * @param id the task id + */ + getTask(id: any): any; + + /** + * returns a collection of tasks which occur during the specified period + * @param from the start date of the period + * @param to the end date of the period + */ + getTaskByTime(from?: Date, to?: Date): any; + + /** + * get the index of a task in the branch + * @param id the task id + */ + getTaskIndex(id: any): number; + + /** + * returns the HTML element of the task bar + * @param id the task id + */ + getTaskNode(id: any): HTMLElement; + + /** + * returns the HTML element of the task row in the table + * @param id the task id + */ + getTaskRowNode(id: any): HTMLElement; + + /** + * checks whether the specified item has child tasks + * @param id the task id + */ + hasChild(id: any): boolean; + + /** + * hides the lightbox modal overlay that blocks interactions with the remaining screen + * @param box an element to hide + */ + hideCover(box?: HTMLElement); + + /** + * closes the lightbox if it's currently active + */ + hideLightbox(); + + /** + * hides the pop-up task form (if it's currently active) + */ + hideQuickInfo(); + + /** + * constructor. Initializes a dhtmlxGantt object + * @param container an HTML container ( or its id) where a dhtmlxGantt object will be initialized + * @param from the start value of the time scale (X–Axis) + * @param to the end value of the time scale (X–Axis) + */ + init(container: any, from?: Date, to?: Date); + + /** + * checks whether the specified link is correct + * @param link the link object + */ + isLinkAllowed(link: any): boolean; + + /** + * checks whether the specified link exists + * @param id the link id + */ + isLinkExists(id: any): boolean; + + /** + * checks whether the specified task exists + * @param id the task id + */ + isTaskExists(id: any): boolean; + + /** + * checks whether the specifies task is currently rendered in the Gantt chart + * @param id the task's id + */ + isTaskVisible(id: any): boolean; + + /** + * loads data to the gantt from an external data source + * @param url the server-side url (may be a static file or a server side script that outputs data) + * @param type ('json', 'xml', 'oldxml') the data type. The default value - 'json' + * @param callback the callback function + */ + load(url: string, type?: string, callback?: (...args: any[])=>any); + + /** + * gets the id of a task from the specified HTML event + * @param e a native event + */ + locate(e: Event): string; + + /** + * moves a task to a new position + * @param sid the id of the task to move + * @param tindex the index of the position that the task will be moved to
(the index in the whole tree) + * @param parent the parent id. If specified, the tindex will refer to the index in the
'parent' branch + */ + moveTask(sid: any, tindex: number, parent?: any); + + /** + * opens the branch with the specified id + * @param id the branch id + */ + open(id: any); + + /** + * loads data from a client-side resource + * @param url a string or object which represents data + * @param type ( 'json', 'xml' ) the data type. The default value - 'json' + */ + parse(url: any, type?: string); + + /** + * refreshes data in the Gantt chart + */ + refreshData(); + + /** + * refreshes the specifies link + * @param id the link id + */ + refreshLink(id: any); + + /** + * refreshes the task and its related links + * @param id the task id + */ + refreshTask(id: any); + + /** + * renders the whole Gantt chart + */ + render(); + + /** + * removes the current lightbox's HTML object element + */ + resetLightbox(); + + /** + * forces the lightbox to resize + */ + resizeLightbox(); + + /** + * scrolls the Gantt container to the specified position + * @param x the value of the horizontal scroll + * @param y the value of the vertical scroll + */ + scrollTo(x: number, y: number); + + /** + * selects the specified task + * @param id the task id + */ + selectTask(id: any): any; + + /** + * serializes the data into JSON or XML format. + * @param type the format that the data will be serialized into.
Possible values: 'json' (default ), 'xml'. + */ + serialize(type?: string); + + /** + * returns a list of options + * @param list_name the name of a list + * @param options an array of options + */ + serverList(list_name: string, options?: any); + + /** + * resizes the Gantt chart + */ + setSizes(); + + /** + * shows the lightbox modal overlay that blocks interactions with the remaining screen + * @param box an element to hide + */ + showCover(box?: HTMLElement); + + /** + * opens the lightbox for the specified task + * @param id the task id + */ + showLightbox(id : any); + + /** + * displays the pop-up task form for the specified task + * @param id the task id + */ + showQuickInfo(id: any); + + /** + * makes the specified task visible on the screen + * @param id the task id + */ + showTask(id: any); + + /** + * sorts the tasks in the grid + * @param field the name of the column that the grid will be sorted by or a custom
sorting function + * @param desc specifies the sorting direction: true - descending sort and false - ascending
sort. By default, false + * @param parent the id of the parent task. Specify the parameter if you want to sort tasks only in
the branch of the specified parent. + */ + sort(field: any, desc?: boolean, parent?: any); + + /** + * removes selection from the selected task + */ + unselectTask(); + + /** + * updates the specified dependency link + * @param id the task id + */ + updateLink(id: string); + + /** + * updates the specified task + * @param id the task id + */ + updateTask(id: string); +} + + + +declare var gantt: GanttStatic; \ No newline at end of file diff --git a/dhtmlxscheduler/dhtmlxscheduler-test.ts b/dhtmlxscheduler/dhtmlxscheduler-test.ts new file mode 100644 index 0000000000..bfdef0863a --- /dev/null +++ b/dhtmlxscheduler/dhtmlxscheduler-test.ts @@ -0,0 +1,33 @@ +/// + +//date operations +var start: Date = scheduler.date.week_start(new Date()); +var next: Date = scheduler.date.add(new Date(), 1, "week"); + +//hotkeys +scheduler.keys.edit_cancel = 13; + +//config options +scheduler.config.details_on_create = true; +scheduler.config.xml_date = "%m-%d-%Y"; +scheduler.xy.bar_height = 40; + +//templates +scheduler.templates.event_class = function (start: Date, end: Date, event: any) { + if (event.some) + return "classA"; + else + return "classB"; +} + +//locale +scheduler.locale.labels.week_tab = "7 days"; + +//API +scheduler.init("scheduler_here", start); +scheduler.load("/data/events"); + +//events +scheduler.attachEvent("onEmptyClick", function (ev: Event) { + var date: Date = scheduler.getActionData(ev).date; +}); \ No newline at end of file diff --git a/dhtmlxscheduler/dhtmlxscheduler.d.ts b/dhtmlxscheduler/dhtmlxscheduler.d.ts new file mode 100644 index 0000000000..011532573b --- /dev/null +++ b/dhtmlxscheduler/dhtmlxscheduler.d.ts @@ -0,0 +1,1604 @@ +// Type definitions for dhtmlxScheduler 4.0 +// Project: http://dhtmlx.com/docs/products/dhtmlxScheduler +// Definitions by: Maksim Kozhukh +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +interface SchedulerTemplates{ + /** + * specifies the date in the header of the view + * @param start the start date of the view + * @param end the end date of the view + */ + agenda_date(start : Date, end : Date): string; + + /** + * specifies the text in the second column of the Agenda view + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + agenda_text(start: Date, end: Date, event: any): string; + + /** + * specifies the date in the first column of the Agenda view + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + agenda_time(start: Date, end: Date, event: any): string; + + /** + * specifies the format for dates that are set by means of API methods. Used to parse incoming dates + * @param date the date which needs formatting + */ + api_date(date: Date): string; + + /** + * specifies the format of the day in a cell + * @param date the cell date + */ + calendar_date(date: Date): string; + + /** + * specifies the date in the header of the calendar + * @param date the date which needs formatting + */ + calendar_month(date: Date): string; + + /** + * specifies the day name in the week sub-header of the view + * @param date the date which needs formatting + */ + calendar_scale_date(date: Date): string; + + /** + * specifies the date format of the lightbox start and end date inputs + * @param date the date which needs formatting + */ + calendar_time(date: Date): string; + + /** + * specifies the date in the header of the Day and Units views + * @param date the date which needs formatting + */ + day_date(date: Date): string; + + /** + * specifies the date in the sub-header of the Day view + * @param date the date which needs formatting + */ + day_scale_date(date: Date): string; + + /** + * specifies the date of an event. Applied to one-day events only + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + event_bar_date(start: Date, end: Date, event: any): string; + + /** + * specifies the event text. Applied to all events + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + event_bar_text(start: Date, end: Date, event: any): string; + + /** + * specifies the css style for the event container + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + event_class(start: Date, end: Date, event: any): string; + + /** + * specifies the time part of the start and end dates of the event. Mostly used by other templates for presenting time periods + * @param date the date which needs formatting + */ + event_date(date: Date): string; + + /** + * specifies the event header + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + event_header(start: Date, end: Date, event: any): string; + + /** + * specifies the event text + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + event_text(start: Date, end: Date, event: any): string; + + /** + * specifies the items of the Y-Axis + * @param date the date which needs formatting + */ + hour_scale(date: Date): string; + + /** + * specifies the format of requests in the dynamic loading mode + * @param date the date which needs formatting + */ + load_format(date: Date): string; + + /** + * specified the date in the header of the view + * @param start the start date of the view + * @param end the end date of the view + */ + map_date(start : Date, end : Date): string; + + /** + * specifies the text in the second column of the view + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + map_text(start: Date, end: Date, event: any): string; + + /** + * specifies the date in the first column of the view + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + map_time(start: Date, end: Date, event: any): string; + + /** + * specifies the date of the event in the Google Maps popup marker + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + marker_date(start: Date, end: Date, event: any): string; + + /** + * specifies the text of the event in the Google Maps popup marker + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + marker_text(start: Date, end: Date, event: any): string; + + /** + * specifies the date in the header of the view + * @param date the date which needs formatting + */ + month_date(date: Date): string; + + /** + * specifies the css class that will be applied to a day cell + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + month_date_class(start: Date, end: Date, event: any): string; + + /** + * specifies the format of the day in a cell + * @param date the date which needs formatting + */ + month_day(date: Date): string; + + /** + * specifies the presentation of the 'View more' link in the cell of the Month view + * @param date the date of a month cell + * @param count the number of events in the cell + */ + month_events_link(date: Date, count: number): string; + + /** + * specifies the date format of the X-Axis of the view + * @param date the date which needs formatting + */ + month_scale_date(date: Date): string; + + /** + * specifies the content of the pop-up edit form + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + quick_info_content(start: Date, end: Date, event: any): string; + + /** + * specifies the date of the pop-up edit form + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + quick_info_date(start: Date, end: Date, event: any): string; + + /** + * specifies the title of the pop-up edit form + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + quick_info_title(start: Date, end: Date, event: any): string; + + /** + * specifies the drop-down time selector in the lightbox + */ + time_picker(): string; + + /** + * specifies the format of start and end dates displayed in the tooltip + * @param date the date which needs formatting + */ + tooltip_date_format(date: Date): string; + + /** + * specifies the text of tooltips + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + tooltip_text(start: Date, end: Date, event: any): string; + + /** + * specifies the event text + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + * @param cellDate the date of a day cell that an one-day event or a single occurrence of the recurring event displayes in + * @param pos the position a single occurrence in the recurring event: 'start' - the first occurrence, 'end' - the last occurrence, 'middle' - for remaining occurrences + */ + week_agenda_event_text(start: Date, end: Date, event: any, cellDate: Date, pos: string): string; + + /** + * the date of a day cell of the view + * @param date the date which needs formatting + */ + week_agenda_scale_date(date: Date): string; + + /** + * specified the date in the header of the view + * @param start the start date of the view + * @param end the end date of the view + */ + week_date(start : Date, end : Date): string; + + /** + * specifies the css class that will be applied to a day cell + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + week_date_class(start: Date, end: Date, event: any): string; + + /** + * specifies the date in the sub-header of the view + * @param date the date which needs formatting + */ + week_scale_date(date: Date): string; + + /** + * a string from an XML file is converted into a date object in conformity with this template + * @param date the string which need to be parsed + */ + xml_date(date: Date): Date; + + /** + * a date object is converted into a string in conformity with this template. Used to send data back to the server + * @param date the date which needs formatting + */ + xml_format(date: Date): string; + + /** + * specifies the date in the header of the view + * @param date the date which needs formatting + */ + year_date(date: Date): string; + + /** + * specifies the month name in the header of a month block of the view. + * @param date the date which needs formatting + */ + year_month(date: Date): string; + + /** + * specifies the day name in the sub-header of a month block of the view + * @param date the date which needs formatting + */ + year_scale_date(date: Date): string; + + /** + * specifies the tooltip over a day cell containing some scheduled event(s) + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + year_tooltip(start: Date, end: Date, event: any): string; + + /** + * specifies the lightbox header + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + lightbox_header(start: Date, end: Date, event: any): string; + + /** + * specifies the date in the header of the view + * @param start the start date of the view + * @param end the end date of the view + */ + grid_date(start : Date, end : Date): string; + + /** + * specifies the format of dates in columns with id='date' + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param ev the event object + */ + grid_full_date(start: Date, end: Date, ev: any): string; + + /** + * specifies the format of dates in columns with id='start_date' or id='end_date' + * @param date the date which needs formatting + */ + grid_single_date(date: Date): string; + + /** + * specifies the text in the columns + * @param field_name the column id + * @param event the event object + */ + grid_field(field_name: string, event: any): string; + + /** + * specifies the number of scheduled events in a cell of the view + * @param evs an array of objects of events contained in a cell + */ + timeline_cell_value(evs: any): string; + + /** + * specifies the css style for a cell of the view + * @param evs an array of objects of events contained in a cell (defined only in the 'cell' mode) + * @param date the date of a column + * @param section the section object + */ + timeline_cell_class(evs: any, date : Date, section: any): string; + + /** + * specifies the name of a CSS class that will be applied to items of the X-Axis + * @param date the date which needs formatting + */ + timeline_scalex_class(date: Date): string; + + /** + * specifies the name of a CSS class that will be applied to items of the second X-Axis + * @param date the date which needs formatting + */ + timeline_second_scalex_class(date: Date): string; + + /** + * specifies the name of a CSS class that will be applied to items of the Y-Axis + * @param key the section id + * @param label the section label + * @param section the section object that contains the key and label properties + */ + timeline_scaley_class(key: string, label : string, section: any): string; + + /** + * specifies items of the Y-Axis + * @param key the section id (key) + * @param label the section label + * @param section the section object containing the key and label properties + */ + timeline_scale_label(key : string, label : string, section : any): string; + + /** + * specifies the tooltip over a day cell containing some scheduled event(s) + * @param start the date when an event is scheduled to begin + * @param end the date when an event is scheduled to be completed + * @param event the event object + */ + timeline_tooltip(start: Date, end: Date, event: any): string; + + /** + * specifies the date in the header of the view + * @param date1 the date when an event is scheduled to begin + * @param date2 the date when an event is scheduled to be completed + */ + timeline_date(date1 : Date, date2 : Date): string; + + /** + * specifies items of the X-Axis + * @param date the date which needs formatting + */ + timeline_scale_date(date: Date): string; + + /** + * specifies items of the second X-Axis + * @param date the date which needs formatting + */ + timeline_second_scale_date(date: Date): string; + + /** + * specifies the date in the header of the view + * @param date the date which needs formatting + */ + units_date(date: Date): string; + + /** + * specifies items of the X-Axis + * @param key the unit id (key) + * @param label the unit label + * @param unit the unit object containing the key and label properties + */ + units_scale_text(key : string, label : string, unit : any): string; +} + +interface SchedulerConfigOptions{ + /** + * 'says' to present the numbers of days in the Month view as clickable links that open the related day in the specified view + */ + active_link_view: string; + + /** + * sets the date to display events until + */ + agenda_end: Date; + + /** + * sets the date to start displaying events from + */ + agenda_start: Date; + + /** + * 'says' to show multi-day events in the regular way (as one-day events are displayed) + */ + all_timed: any; + + /** + * sets the date format that will be used by the addEvent() method to parse the start_date, end_date properties in case they are specified as strings + */ + api_date: string; + + /** + * enables automatic changing of the end event date after changing the start date + */ + auto_end_date: boolean; + + /** + * stores a collection of buttons resided in the left bottom corner of the lightbox + */ + buttons_left: any; + + /** + * stores a collection of buttons resided in the right bottom corner of the lightbox + */ + buttons_right: any; + + /** + * sets the maximum number of events in a cascade + */ + cascade_event_count: number; + + /** + * sets the 'cascade' display mode + */ + cascade_event_display: boolean; + + /** + * sets the left margin for a cascade of events + */ + cascade_event_margin: number; + + /** + * activates/disables checking of limits + */ + check_limits: boolean; + + /** + * sets the maximum allowable number of events per time slot + */ + collision_limit: number; + + /** + * forces the scheduler container to automatically change its size to show the whole content without scrolling + */ + container_autoresize: boolean; + + /** + * sets the format for the date in the header of the Week and Units views + */ + day_date: string; + + /** + * enables the possibility to create events by double click + */ + dblclick_create: boolean; + + /** + * sets the date format used by the templates 'day_date', 'week_date', 'day_scale_date' for setting date in the views' headers + */ + default_date: string; + + /** + * 'says' to use the extended form while creating new events by drag or double click + */ + details_on_create: boolean; + + /** + * 'says' to open the extended form after double clicking on an event + */ + details_on_dblclick: boolean; + + /** + * defines whether the marked(blocked) time spans should be highlighted in the scheduler + */ + display_marked_timespans: boolean; + + /** + * sets the default background color for the events retrieved by the showEvent() method + */ + displayed_event_color: string; + + /** + * sets the default font color for the events retrieved by the showEvent() method + */ + displayed_event_text_color: string; + + /** + * enables the possibility to create new events by drag-and-drop + */ + drag_create: boolean; + + /** + * enables the possibility to drag the lightbox by the header + */ + drag_lightbox: boolean; + + /** + * enables the possibility to move events by drag-and-drop + */ + drag_move: boolean; + + /** + * enables the possibility to resize events by drag-and-drop + */ + drag_resize: boolean; + + /** + * 'says' to open the lightbox while creating new events + */ + edit_on_create: boolean; + + /** + * sets the initial duration of events in minutes + */ + event_duration: number; + + /** + * sets the minimum value for the hour scale (Y-Axis) + */ + first_hour: number; + + /** + * moves views' tabs from the left to the right side + */ + fix_tab_position: boolean; + + /** + * enables setting of the event duration to the full day + */ + full_day: boolean; + + /** + * specifies whether events retrieved by the showEvent method should be highlighted while displaying + */ + highlight_displayed_event: boolean; + + /** + * sets the format of Y-Axis items + */ + hour_date: string; + + /** + * sets the height of an hour unit in pixels + */ + hour_size_px: number; + + /** + * stores a collection of icons visible in the side edit menu of the event box + */ + icons_edit: any; + + /** + * stores a collection of icons visible in the side selection menu of the event box + */ + icons_select: any; + + /** + * defines whether the date specified in the 'End by' field should be exclusive or inclusive + */ + include_end_by: boolean; + + /** + * sets the maximum value of the hour scale (Y-Axis) + */ + last_hour: number; + + /** + * adds the dotted left border to the scheduler + */ + left_border: boolean; + + /** + * specifies the lightbox object + */ + lightbox: any; + + /** + * defines the lightbox behavior while opening in the edit mode + */ + lightbox_recurring: string; + + /** + * sets the right border of the allowable date range + */ + limit_end: Date; + + /** + * sets the left border of the allowable date range + */ + limit_start: Date; + + /** + * sets the max and min values of the time selector in the lightbox to the values of the 'last_hour' and 'first_hour' options + */ + limit_time_select: boolean; + + /** + * limits viewing events + */ + limit_view: boolean; + + /** + * sets the format of server request parameters 'from', 'to' in case of dynamic loading + */ + load_date: string; + + /** + * sets the date to display events until + */ + map_end: Date; + + /** + * sets the position that will be displayed on the map in case the event location can't be identified + */ + map_error_position: any; + + /** + * the maximum width of the Google Maps's popup marker in the Map view + */ + map_infowindow_max_width: number; + + /** + * sets the initial position of the map + */ + map_initial_position: any; + + /** + * sets the initial zoom of Google Maps in the Map view + */ + map_initial_zoom: number; + + /** + * activates attempts to resolve the event location if the database doesn't have the event's coordinates stored + */ + map_resolve_event_location: boolean; + + /** + * enables/disables prompts asking the user to share his location for displaying on the map + */ + map_resolve_user_location: boolean; + + /** + * sets the date to start displaying events from + */ + map_start: Date; + + /** + * sets the type of Google Maps + */ + map_type: any; + + /** + * sets the zoom that will be used to show the user's location if he agrees to the browser offer to show it + */ + map_zoom_after_resolve: number; + + /** + * enables/disables the marker displaying the current time + */ + mark_now: boolean; + + /** + * sets the maximum number of displayable in a cell events + */ + max_month_events: number; + + /** + * specifies the minicalendar object + */ + minicalendar: any; + + /** + * sets the format for the header of the Month view + */ + month_date: string; + + /** + * sets the format for the day in a cell of the Month and Year views + */ + month_day: string; + + /** + * sets the minimum height of cells in the Month view + */ + month_day_min_height: number; + + /** + * enables rendering of multi-day events + */ + multi_day: boolean; + + /** + * sets the height of the area that displays multi-day events + */ + multi_day_height_limit: any; + + /** + * allows working with recurring events independently of time zones + */ + occurrence_timestamp_in_utc: boolean; + + /** + * defines the 'saving' behaviour for the case when the user edits the event text directly in the event box + */ + positive_closing: boolean; + + /** + * fixes dnd in case of non-linear time scale + */ + preserve_length: boolean; + + /** + * cancels preserving of the current scroll position while navigating between dates of the same view + */ + preserve_scroll: boolean; + + /** + * enables/disables caching of GET requests in the browser + */ + prevent_cache: boolean; + + /** + * defines whether the event form will appear from the left/right side of the screen or near the selected event + */ + quick_info_detached: boolean; + + /** + * activates the read-only mode for the scheduler + */ + readonly: boolean; + + /** + * activates the read-only mode for the lightbox + */ + readonly_form: boolean; + + /** + * sets the date format of the 'End by' field in the 'recurring' lighbox + */ + repeat_date: string; + + /** + * prevents including past days to events with the 'weekly' recurrence + */ + repeat_precise: boolean; + + /** + * sets the initial position of the vertical scroll in the scheduler (an hour in the 24h format) + */ + scroll_hour: number; + + /** + * shows/hides the select bar in the event box + */ + select: boolean; + + /** + * allows preventing short events from overlapping + */ + separate_short_events: boolean; + + /** + * enables converting server-side dates from UTC to a local time zone (and backward) during sending data to the server + */ + server_utc: boolean; + + /** + * enables showing a progress/spinner while data is loading (useful for dynamic loading) + */ + show_loading: boolean; + + /** + * sets the start day of weeks + */ + start_on_monday: boolean; + + /** + * sets the minimum step (in minutes) for event's time values + */ + time_step: number; + + /** + * enables/disables the touch support in the scheduler + */ + touch: any; + + /** + * defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture + */ + touch_drag: any; + + /** + * enables/disables prompting messages in the right up corner of the screen + */ + touch_tip: boolean; + + /** + * 'says' events to occupy the whole width of the cell + */ + use_select_menu_space: boolean; + + /** + * sets the format for the date in the sub-header of the Month view + */ + week_date: string; + + /** + * enables/disables displaying the standard (wide) lightbox instead of the short one + */ + wide_form: boolean; + + /** + * sets the date format that is used to parse data from the data set + */ + xml_date: string; + + /** + * sets the number of rows in the Year view + */ + year_x: number; + + /** + * sets the number of columns in the Year view + */ + year_y: number; +} + + +interface SchedulerDateHelpers{ + add(origin: Date, count: number, unit: string): Date; + copy(origin: Date): Date; + + date_part(origin: Date): Date; + time_part(origin: Date): Date; + + day_start(origin: Date): Date; + month_start(origin: Date): Date; + week_start(origin: Date): Date; + year_start(origin: Date): Date; + + getISOWeek(origin: Date): number; + getUTCISOWeek(origin: Date): number; + + date_to_str(format: string): any; + str_to_date(format: string): any; + convert_to_utc(origin: Date): Date; + to_fixed(value: number): string; +} + +interface SchedulerHotkeys{ + edit_save: number; + edit_cancel: number; +} + +//scheduler.locale + +interface SchedulerLocaleDate{ + month_full: string[]; + month_short: string[]; + day_full: string[]; + day_short: string[]; +} + +interface SchedulerLocaleLabels{ + dhx_cal_today_button: string; + day_tab: string; + week_tab: string; + month_tab: string; + new_event: string; + icon_save: string; + icon_cancel: string; + icon_details: string; + icon_edit: string; + icon_delete: string; + confirm_closing: string; + confirm_deleting: string; + section_description: string; + section_time: string; +} + +interface SchedulerLocale{ + date: SchedulerLocaleDate; + labels: SchedulerLocaleLabels; +} + +interface SchedulerSizes{ + /** + * the height of day cells in the month view + */ + bar_height: number; + + /** + * the width of the event text input 140 day + */ + editor_width: number; + + /** + * increases the length of the lightbox + */ + lightbox_additional_height: number; + + /** + * the width of the date column in the Map view + */ + map_date_width: number; + + /** + * the width of the description column in the Map view + */ + map_description_width: number; + + /** + * the left margin of the main scheduler area + */ + margin_left: number; + + /** + * the bottom margin of the main scheduler area + */ + margin_top: number; + + /** + * the width of the selection menu + */ + menu_width: number; + + /** + * the minimal height of the event box + */ + min_event_height: number; + + /** + * the top offset of an event in a cell in the month view + */ + month_scale_height: number; + + /** + * the height of the navigation bar + */ + nav_height: number; + + /** + * the height of the X-Axis + */ + scale_height: number; + + /** + * the width of the Y-Axis + */ + scale_width: number; + + /** + * the width of the scrollbar area + */ + scroll_width: number; +} + +interface SchedulerStatic{ + templates: SchedulerTemplates; + config: SchedulerConfigOptions; + date: SchedulerDateHelpers; + keys: SchedulerHotkeys; + skin: String; + version: String; + xy: SchedulerSizes; + locale: SchedulerLocale; + + /** + * adds a new event + * @param event the event object + */ + addEvent(event: any): string; + + /** + * adds a new event and opens the lightbox to confirm + * @param event the event object + */ + addEventNow(event: any): string; + + /** + * marks dates but with certain settings makes blocking (unlike blockTime() allows setting custom styling for the limit) + * @param config the configuration object of the timespan to mark/block + */ + addMarkedTimespan(config: any); + + /** + * adds a section to the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + * @param section the object of the section to add + * @param parent_id the id of the parent section. Pass 'null' if you are adding a section to the root + */ + addSection(section: any, parent_id: string): boolean; + + /** + * attaches the handler to an inner event of dhtmlxScheduler + * @param name the event name, case-insensitive + * @param handler the handler function + */ + attachEvent(name: string, handler: (...args: any[])=>any): string; + + /** + * makes the scheduler reflect all data changes in the Backbone model and vice versa + * @param events the Backbone data collection + */ + backbone(events: any); + + /** + * blocks the specified date and applies the default 'dimmed' style to it. + * @param date a date to block ( if a number is provided, the parameter will be treated as a week day: '0' index refers to Sunday, '6' - to Saturday) + * @param time_points an array [start_minute,end_minute,..,start_minute_N,end_minute_N] where each pair sets a certain limit range. The array can have any number of such pairs + * @param items defines specific items of view(s) to block + */ + blockTime(date: any, time_points: any, items?: any); + + /** + * calls an inner event + * @param name the event name, case-insensitive + * @param params an array of the event related data + */ + callEvent(name: string, params: any): boolean; + + /** + * changes the event id + * @param id the current event id + * @param new_id the new event id + */ + changeEventId(id: string, new_id: string); + + /** + * checks whether the specified event occurs at the time that has been already occupied with another event(s) + * @param event the event object + */ + checkCollision(event: any): boolean; + + /** + * checks whether an event has some handler(s) specified + * @param name the event name + */ + checkEvent(name: string): boolean; + + /** + * checks whether an event resides in a specific timespan + * @param event the event object + * @param timespan the timespan type + */ + checkInMarkedTimespan(event: any, timespan: string): boolean; + + /** + * checks whether the specified event takes place at the blocked time period + * @param event the event object + */ + checkLimitViolation(event: any): boolean; + + /** + * removes all events from the scheduler + */ + clearAll(); + + /** + * closes all sections in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + */ + closeAllSections(); + + /** + * closes the specified section in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + * @param section_id the section id + */ + closeSection(section_id: string); + + /** + * collapses the expanded scheduler back to the normal size + */ + collapse(); + + /** + * creates the Grid view in the scheduler + * @param config the configuration object of the Grid view + */ + createGridView(config: any); + + /** + * creates the Timeline view in the scheduler + * @param config the configuration object of the Timeline view + */ + createTimelineView(config: any); + + /** + * creates the Units view in the scheduler + * @param config the configuration object of the Units view + */ + createUnitsView(config: any); + + /** + * deletes all sections from the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + */ + deleteAllSections(); + + /** + * deletes the specified event + * @param id the event id + */ + deleteEvent(id: any); + + /** + * removes marking/blocking set by the addMarkedTimespan() and blockTime() methods + * @param id the timespan id + */ + deleteMarkedTimespan(id: string); + + /** + * deletes a section from the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + * @param section_id the section id + */ + deleteSection(section_id: string): boolean; + + /** + * destroys previously created mini-calendar + * @param name the mini-calendar's object (if not specified, the scheduler attempts to destroy the last created mini calendar) + */ + destroyCalendar(name?: any); + + /** + * detaches a handler from an event (which was attached before by the attachEvent method) + * @param id the event id + */ + detachEvent(id: string); + + /** + * opens the inline editor to alter the event text (the editor in the event box) + * @param id the event id + */ + edit(id: string); + + /** + * closes the inline event edotor if it's currently open + * @param id the event id + */ + editStop(id: string); + + /** + * closes the lightbox + * @param mode if set to true, the changes made in the lightbox will be saved before closing. If - false, the changes will be cancelled. + * @param box the HTML container for the lightbox + */ + endLightbox(mode: boolean, box: HTMLElement); + + /** + * expands the scheduler to the full screen view + */ + expand(); + + /** + * gives access to the objects of lightbox's sections + * @param name the name of a lightbox section + */ + formSection(name: string): any; + + /** + * returns the current cursor-pointed date and section (if defined) + * @param e a native event object + */ + getActionData(e: Event): any; + + /** + * return the event object by its id + * @param event_id event_id + */ + getEvent(event_id: any); + + /** + * gets the event's end date + * @param id the event id + */ + getEventEndDate(id: string): Date; + + /** + * gets the event's start date + * @param id the event id + */ + getEventStartDate(id: string): Date; + + /** + * gets the event's text + * @param id the event id + */ + getEventText(id: string): string; + + /** + * returns a collection of events which occur during the specified period + * @param from the start date of the period + * @param to the end date of the period + */ + getEvents(from?: Date, to?: Date); + + /** + * gets the label of a select control in the lighbox + * @param property the name of a data property that the control is mapped to + * @param key the option id. This parameter is compared with the event data property to assign the select's option to an event + */ + getLabel(property: string, key: any); + + /** + * gets the lightbox's HTML object element + */ + getLightbox(): HTMLElement; + + /** + * returns all occurrences of a recurring event + * @param id the id of a recurring event + * @param number the maximum number of occurrences to return (by default, 100) + */ + getRecDates(id: string, number: number): any; + + /** + * gets the object of the currently displayable event + * @param id the event id + */ + getRenderedEvent(id: string): HTMLElement; + + /** + * gets the object of the specified section in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + * @param section_id the section id + */ + getSection(section_id: string): any; + + /** + * gets the current state of the scheduler + */ + getState(): any; + + /** + * gets the user data associated with the specified event + * @param id the event id + * @param name the user data name + */ + getUserData(id: string, name: string): any; + + /** + * hides the lightbox modal overlay that blocks interactions with the remaining screen + * @param box an element to hide + */ + hideCover(box?: HTMLElement); + + /** + * hides the pop-up event form (if it's currently active) + */ + hideQuickInfo(); + + /** + * initializes an instance of dhtmlxScheduler + * @param container the id or object of the HTML container that the scheduler will be created inside + * @param date the initial date of the scheduler (by default, the current date) + * @param view the name of the initial view (by default, "week") + */ + init(container: any, date?: Date, view?: string); + + /** + * inverts the specified time zones + * @param zones an array [start_minute,end_minute,..,start_minute_N,end_minute_N] where each pair sets a certain limit range (in minutes). The array can have any number of such pairs + */ + invertZones(zones: any); + + /** + * checks whether the calendar is currently open in the scheduler + */ + isCalendarVisible(): any; + + /** + * checks whether the specified event one-day or multi-day + * @param event the event object + */ + isOneDayEvent(event: any): boolean; + + /** + * 'says' to change the active date in the mini calendar each time the active date in the scheduler is changed + * @param calendar the mini calendar object + * @param shift a function that defines the difference between active dates in the mini-calendar and the scheduler. The function takes the scheduler's date as a parameter and returns the date that should be displayed in the mini calendar + */ + linkCalendar(calendar: any, shift: (...args: any[])=>any); + + /** + * loads data to the scheduler from an external data source + * @param url the server side url (may be a static file or a server side script which outputs data as XML) + * @param type ('json', 'xml', 'ical') the data type. The default value - 'xml' + * @param callback the callback function + */ + load(url: string, type?: string, callback?: (...args: any[])=>any); + + /** + * applies a css class to the specified date + * @param calendar the calendar object + * @param date the date to mark + * @param css the name of a css class + */ + markCalendar(calendar: any, date: Date, css: string); + + /** + * marks and/or blocks date(s) by applying the default or a custom style to them. Marking is cancelled right after any internal update in the app. Can be used for highlighting + * @param config the configuration object of the timespan to mark/block + */ + markTimespan(config: any); + + /** + * opens all sections in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + */ + openAllSections(); + + /** + * opens the specified section in the currently active view (if the opened view isn't Timeline in the 'Tree' mode - the method will be ignored) + * @param section_id the section id + */ + openSection(section_id: string); + + /** + * loads data from a client-side resource + * @param data a string or object which represents data + * @param type ('json', 'xml', 'ical') the data type. The default value - 'xml' + */ + parse(data: any, type?: string); + + /** + * creates a mini calendar + * @param config the calendar configuration object + */ + renderCalendar(config: any); + + /** + * generates the HTML content for a custom event box + * @param container the event container + * @param event the event object + */ + renderEvent(container: HTMLElement, event: any): boolean; + + /** + * removes the current lightbox's HTML object element + */ + resetLightbox(); + + /** + * scrolls the specified number of units in the Units view + * @param step the number of units to scroll (set the positive value to scroll units in the right direction, the negative value - in the left direction). + */ + scrollUnit(step: number); + + /** + * selects the specified event + * @param id the event id + */ + select(id: string); + + /** + * returns a list of options + * @param list_name the name of a list + * @param options an array of options + */ + serverList(list_name: string, options?: any); + + /** + * displays the specified view and date + * @param date the date to display + * @param view the name of a view to display + */ + setCurrentView(date?: Date, view?: string); + + /** + * adds a new event to the scheduler's data pool + * @param id the event id + * @param event the event object + */ + setEvent(id: any, event: any); + + /** + * sets the event's end date + * @param id the event id + * @param date the new end date of the event + */ + setEventEndDate(id: string, date: Date); + + /** + * set the event's start date + * @param id the event id + * @param date the new start date of the event + */ + setEventStartDate(id: string, date: Date); + + /** + * set the event's text + * @param id the event id + * @param text the new text of the event + */ + setEventText(id: string, text: string); + + /** + * forces the lightbox to resize + */ + setLightboxSize(); + + /** + * sets the mode that allows loading data by parts (enables the dynamic loading) + * @param mode the loading mode + */ + setLoadMode(mode: string); + + /** + * sets the user data associated with the specified event + * @param id the event id + * @param name the user data name + * @param value the user data value + */ + setUserData(id: string, name: string, value: any); + + /** + * shows the lightbox modal overlay that blocks interactions with the remaining screen + * @param box an element to hide + */ + showCover(box?: HTMLElement); + + /** + * shows and highlights the specified event in the current or specified view + * @param id the event id + * @param view the view name + */ + showEvent(id: string, view?: string); + + /** + * opens the lightbox for the specified event + * @param id the event id + */ + showLightbox(id: string); + + /** + * displays the pop-up event form for the specified event + * @param id the event id + */ + showQuickInfo(id: string); + + /** + * shows a custom lightbox in the specified HTML container centered on the screen + * @param id the event id + * @param box the lightbox's HTML container + */ + startLightbox(id : string, box: HTMLElement); + + /** + * convers scheduler's data to the ICal format + * @param header sets the value for the content header field + */ + toICal(header?: string): string; + + /** + * converts scheduler's data into the JSON format + */ + toJSON(): string; + + /** + * exports the current view to a PDF document (can be used for printing) + * @param url the path to the server-side PDF converter + * @param mode the color map of the resulting PDF document + */ + toPDF(url: string, mode?: string); + + /** + * exports several scheduler's views to a PDF document (can be used for printing) + * @param from the date to start export events from + * @param to the date to export events until + * @param view the name of a view that the export should be applied to + * @param path the path to the php file which generates a PDF file (details) + * @param color the color map in use + */ + toPDFRange(from: Date, to: Date, view: string, path: string, color: string); + + /** + * converts scheduler's data into the XML format + */ + toXML(): string; + + /** + * generates an unique ID (unique inside the current scheduler, not GUID) + */ + uid(); + + /** + * removes blocking set by the blockTime() method + * @param days (Date, number,array, string) days that should be limited + * @param zones the period in minutes that should be limited. Can be set to 'fullday' value to limit the entire day + * @param sections allows blocking date(s) just for specific items of specific views. BTW, the specified date(s) will be blocked just in the related view(s) + */ + unblockTime(days: any, zones?: any, sections?: any); + + /** + * removes a css class from the specified date + * @param calendar the mini calendar object + * @param date the date to unmark + * @param css the name of a css class to remove + */ + unmarkCalendar(calendar: any, date: Date, css: string); + + /** + * removes marking/blocking set by the markTimespan() method + * @param divs a timespan to remove marking/blocking from (or an array of timespans) + */ + unmarkTimespan(divs: any); + + /** + * unselects the specified event + * @param id the event id (if not specified, the currently selected event will be unselected) + */ + unselect(id?: string); + + /** + * displays the specified date in the mini calendar + * @param calendar the mini calendar object + * @param new_date a new date to display in the mini calendar + */ + updateCalendar(calendar: any, new_date: Date); + + /** + * updates tht specified collection with new options + * @param collection the name of the collection to update + * @param options the new values of the collection + */ + updateCollection(collection: string, options: any): boolean; + + /** + * updates the specified event + * @param id the event id + */ + updateEvent(id: string); + + /** + * displays the specified view and date (doesn't invokes any events) + * @param date the date to set + * @param view the view name + */ + updateView(date: Date, view: string); +} + + + +declare var scheduler: SchedulerStatic; \ No newline at end of file From e0a2f1b03cca81c396b322a8756f2b7e905f0749 Mon Sep 17 00:00:00 2001 From: rsmithh Date: Fri, 11 Oct 2013 19:35:09 +0100 Subject: [PATCH 039/150] Update chrome.d.ts --- chrome/chrome.d.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 635cbc4d34..a2faba4ac2 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Chrome extension development. +// Type definitions for Chrome extension development. // Project: http://developer.chrome.com/extensions/ // Definitions by: Matthew Kimber // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -1061,7 +1061,7 @@ declare module chrome.history { // Identity //////////////////// declare module chrome.identity { - var getAuthToken: (options:{}, cb:(token:{})=>void)=>void; + var getAuthToken: (options:any, cb:(token:{})=>void)=>void; } @@ -1350,7 +1350,7 @@ declare module chrome.pageCapture { tabId: number; } - export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData?: any) => void): void; + export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData: any) => void): void; } //////////////////// @@ -1481,6 +1481,9 @@ declare module chrome.runtime { interface RuntimeSuspendCanceledEvent extends chrome.events.Event { addListener(callback: Function): void; } + interface RuntimeMessageEvent extends chrome.events.Event { + addListener(callback: Function): void; + } export function getBackgroundPage(callback: (backgroundPage?: Window) => void): void; export function getManifest(): Object; @@ -1490,6 +1493,9 @@ declare module chrome.runtime { var onStartup: RuntimeStartupEvent; var onInstalled: RuntimeInstalledEvent; var onSuspendCanceled: RuntimeSuspendCanceledEvent; + var onMessage: RuntimeMessageEvent; + var sendMessage:(req:any, cb:(resp:any)=>void)=>void; + } //////////////////// From d3124df1d42193ff6ca784113b83a267565a931f Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 11 Oct 2013 20:23:28 -0400 Subject: [PATCH 040/150] Fix jquery.d.ts break with TypeScript 'develop' branch The beta compiler is smarter about detecting inconsistencies: jquery.d.ts(192,11): error TS2189: Interface 'JQueryEventObject' cannot simultaneously extend types 'BaseJQueryEventObject' and 'JQueryInputEventObject': Types of property 'metaKey' of types 'BaseJQueryEventObject' and 'JQueryInputEventObject' are not identical. Documentation seems to indicate 'boolean' is correct: http://api.jquery.com/event.metaKey/ --- jquery/jquery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 99969f710e..e824cf2980 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -156,7 +156,7 @@ interface BaseJQueryEventObject extends Event { pageX: number; pageY: number; which: number; - metaKey: any; + metaKey: boolean; } interface JQueryInputEventObject extends BaseJQueryEventObject { From 5b00360b17ae57f9fc2e55014ee843c7ace7ecf5 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 11 Oct 2013 20:40:00 -0400 Subject: [PATCH 041/150] Fix future bugs in leaflet.d.ts The 'develop' TypeScript compiler is pickier about generics being fully specified. In this case, 3 arrays could be more specific about the type of elements. --- leaflet/leaflet.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 0bb97cc151..4bb8bcbf1f 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -1581,7 +1581,7 @@ declare module L { * used in GeoJSON for points. If reverse is set to true, the numbers will be interpreted * as (longitude, latitude). */ - static coordsToLatlng(coords: Array, reverse?: boolean): LatLng; + static coordsToLatlng(coords: number[], reverse?: boolean): LatLng; /** * Creates a multidimensional array of LatLng objects from a GeoJSON coordinates @@ -1589,7 +1589,7 @@ declare module L { * 1 for an array of arrays of points, etc., 0 by default). If reverse is set to * true, the numbers will be interpreted as (longitude, latitude). */ - static coordsToLatlngs(coords: Array, levelsDeep?: number, reverse?: boolean): Array; + static coordsToLatlngs(coords: number[], levelsDeep?: number, reverse?: boolean): LatLng[]; } From 690b190b09d30665ddbba6428ef52fd87a8a76db Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 11 Oct 2013 20:49:44 -0400 Subject: [PATCH 042/150] Fix future bugs in moment.d.ts The 'develop' version of the TypeScript compiler requires all generics to be fully specified. I believe these arrays should all be numbers: http://momentjs.com/docs/#/parsing/array/ --- moment/moment.d.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/moment/moment.d.ts b/moment/moment.d.ts index 523f5f6ea3..743384f1cb 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -129,35 +129,35 @@ interface Moment { isBefore(b: string): boolean; isBefore(b: Number): boolean; isBefore(b: Date): boolean; - isBefore(b: Array): boolean; + isBefore(b: number[]): boolean; isBefore(b: Moment, granularity: string): boolean; isBefore(b: String, granularity: string): boolean; isBefore(b: Number, granularity: string): boolean; isBefore(b: Date, granularity: string): boolean; - isBefore(b: Array, granularity: string): boolean; + isBefore(b: number[], granularity: string): boolean; isAfter(): boolean; isAfter(b: Moment): boolean; isAfter(b: string): boolean; isAfter(b: Number): boolean; isAfter(b: Date): boolean; - isAfter(b: Array): boolean; + isAfter(b: number[]): boolean; isAfter(b: Moment, granularity: string): boolean; isAfter(b: String, granularity: string): boolean; isAfter(b: Number, granularity: string): boolean; isAfter(b: Date, granularity: string): boolean; - isAfter(b: Array, granularity: string): boolean; + isAfter(b: number[], granularity: string): boolean; isSame(b: Moment): boolean; isSame(b: string): boolean; isSame(b: Number): boolean; isSame(b: Date): boolean; - isSame(b: Array): boolean; + isSame(b: number[]): boolean; isSame(b: Moment, granularity: string): boolean; isSame(b: String, granularity: string): boolean; isSame(b: Number, granularity: string): boolean; isSame(b: Date, granularity: string): boolean; - isSame(b: Array, granularity: string): boolean; + isSame(b: number[], granularity: string): boolean; lang(language: string): void; lang(reset: boolean): void; @@ -268,34 +268,34 @@ interface MomentStatic { isBefore(b: string): boolean; isBefore(b: Number): boolean; isBefore(b: Date): boolean; - isBefore(b: Array): boolean; + isBefore(b: number[]): boolean; isBefore(b: Moment, granularity: string): boolean; isBefore(b: String, granularity: string): boolean; isBefore(b: Number, granularity: string): boolean; isBefore(b: Date, granularity: string): boolean; - isBefore(b: Array, granularity: string): boolean; + isBefore(b: number[], granularity: string): boolean; isAfter(b: Moment): boolean; isAfter(b: string): boolean; isAfter(b: Number): boolean; isAfter(b: Date): boolean; - isAfter(b: Array): boolean; + isAfter(b: number[]): boolean; isAfter(b: Moment, granularity: string): boolean; isAfter(b: String, granularity: string): boolean; isAfter(b: Number, granularity: string): boolean; isAfter(b: Date, granularity: string): boolean; - isAfter(b: Array, granularity: string): boolean; + isAfter(b: number[], granularity: string): boolean; isSame(b: Moment): boolean; isSame(b: string): boolean; isSame(b: Number): boolean; isSame(b: Date): boolean; - isSame(b: Array): boolean; + isSame(b: number[]): boolean; isSame(b: Moment, granularity: string): boolean; isSame(b: String, granularity: string): boolean; isSame(b: Number, granularity: string): boolean; isSame(b: Date, granularity: string): boolean; - isSame(b: Array, granularity: string): boolean; + isSame(b: number[], granularity: string): boolean; } declare var moment: MomentStatic; From 65000321adec8d9392b8031a7f61ccf0d1e0b122 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 11 Oct 2013 21:02:37 -0400 Subject: [PATCH 043/150] Fix future bugs in slickgrid.d.ts The 'develop' version of the TypeScript compiler is pickier about generics being fully specified. I believe these are the proper missing types. --- slickgrid/SlickGrid.d.ts | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index ac7ce64e77..caec522c1c 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -4,23 +4,23 @@ SlickGrid-2.1.d.ts may be freely distributed under the MIT license. Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/SlickGrid.d.ts Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ @@ -499,7 +499,7 @@ declare module Slick { } export interface EditorFactory { - getEditor(column): Editors.Editor; + getEditor(column: Column): Editors.Editor; } export interface FormatterFactory { @@ -726,22 +726,22 @@ declare module Slick { constructor( container: string, data: T[], - columns: Column[], + columns: Column[], options: GridOptions); constructor( container: HTMLElement, data: T[], - columns: Column[], + columns: Column[], options: GridOptions); constructor( container: string, data: DataProvider, - columns: Column[], + columns: Column[], options: GridOptions); constructor( container: HTMLElement, data: DataProvider, - columns: Column[], + columns: Column[], options: GridOptions); // #region Core @@ -841,13 +841,13 @@ declare module Slick { * Returns an array of column definitions, containing the option settings for each individual column. * @return **/ - public getColumns(): Column[]; + public getColumns(): Column[]; /** * Sets grid columns. Column headers will be recreated and all rendered rows will be removed. To rerender the grid (if necessary), call render(). * @param columnDefinitions An array of column definitions. **/ - public setColumns(columnDefinitions: Column[]): void; + public setColumns(columnDefinitions: Column[]): void; /** * Accepts a columnId string and an ascending boolean. Applies a sort glyph in either ascending or descending form to the header of the column. Note that this does not actually sort the column. It only adds the sort glyph to the header. @@ -866,7 +866,7 @@ declare module Slick { * todo: no docs or comments available * @return **/ - public getSortColumns(): Column[]; + public getSortColumns(): Column[]; /** * Updates an existing column definition and a corresponding header DOM element with the new title and tooltip. @@ -1328,7 +1328,7 @@ declare module Slick { export interface OnSortEventData { multiColumnSort: boolean; sortCol?: Column; - sortCols: Column[]; + sortCols: Column[]; sortAsc?: boolean; } @@ -1526,7 +1526,7 @@ declare module Slick { * the 'high' setGrouping. */ public expandGroup(...varArgs: string[]): void; - public getGroups(): Group[]; + public getGroups(): Group[]; public getIdxById(): string; public getRowById(): T; public getItemById(): T; From cdbcec02057087ac132c35a0d665060f405edc51 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 11 Oct 2013 21:46:59 -0400 Subject: [PATCH 044/150] Fix optional argument in slickgrid.d.ts From looking at the code, this argument appears to be optional. Also, we are omitting it in our code and it works. --- slickgrid/SlickGrid.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index ac7ce64e77..1d9d564ddf 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -874,7 +874,7 @@ declare module Slick { * @param title New column name. * @param toolTip New column tooltip. **/ - public updateColumnHeader(columnId: string, title: string, toolTip?: string): void; + public updateColumnHeader(columnId: string, title?: string, toolTip?: string): void; // #endregion Columns From 08393ae71d6d9ee0a3c31f0f0ef8a433a011d89f Mon Sep 17 00:00:00 2001 From: airamrguez Date: Sat, 12 Oct 2013 16:08:42 +0200 Subject: [PATCH 045/150] Added TypeScript's typings for Titanium Mobile --- titanium/titanium-tests.ts | 121 + titanium/titanium.d.ts | 6240 ++++++++++++++++++++++++++++++++++++ 2 files changed, 6361 insertions(+) create mode 100644 titanium/titanium-tests.ts create mode 100644 titanium/titanium.d.ts diff --git a/titanium/titanium-tests.ts b/titanium/titanium-tests.ts new file mode 100644 index 0000000000..3899824c7a --- /dev/null +++ b/titanium/titanium-tests.ts @@ -0,0 +1,121 @@ +/// + +function test_window() { + var window: Ti.UI.Window = Ti.UI.createWindow({ + title: 'Test', + backgroundColor: 'white', + borderRadius: 10 + }); + + window.setBackgroundColor('blue'); + window.opacity = 0.92; + + var matrix = Ti.UI.create2DMatrix().scale(1.1, 1); + window.transform = matrix; + + var label: Ti.UI.Label; + label = Ti.UI.createLabel({ + color: '#900', + text: 'Simple label' + }); + label.textAlign = Ti.UI.TEXT_ALIGNMENT_LEFT; + label.setWidth(Ti.UI.SIZE); + label.setHeight(Ti.UI.SIZE); + window.add(label); + window.open(); +} + +function test_tableview() { + var data = []; + for (var i = 0; i < 10; i++) { + var row = Ti.UI.createTableViewRow(); + var label = Ti.UI.createLabel({ + left: 10, + text: 'Row ' + (i + 1) + }); + var image = Ti.UI.createImageView({ + url: 'KS_nav_ui.png' + }); + var button = Ti.UI.createButton({ + right: 10, + height: 30, + width: 80, + title: 'Button example' + }); + row.add(label); + row.add(image); + row.add(button); + data.push(row); + } + var table = Ti.UI.createTableView({ + data: data, + style: Ti.UI.iPhone.TableViewStyle.PLAIN + }); +} + +function test_fs() { + var imageDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory + 'downloaded_images'); + if (!imageDir.exists()) { + imageDir.createDirectory(); + } + var data: Ti.Blob; + var imageFile = Ti.Filesystem.getFile(imageDir.resolve() + 'image.jpg'); + if (!imageFile.write(data)) { + Ti.UI.createAlertDialog({ + message: 'IO Error' + }).show(); + } + imageFile = null; + imageDir = null; +} + +function test_network() { + var url = "http://www.appcelerator.com"; + var client = Ti.Network.createHTTPClient({ + // function called when the response data is available + onload : function(e) { + alert(this.responseText); + }, + // function called when an error occurs, including a timeout + onerror : function(e) { + alert(e.rror); + }, + timeout : 5000 // in milliseconds + }); + // Prepare the connection. + client.open('GET', url); + // Send the request. + client.send(); +} + +function test_map() { + var win = Ti.UI.createWindow(); + var mountainView = Ti.Map.createAnnotation({ + animate: true, + leftButton: '../images/appcelerator_small.png', + myid: 1 + }); + mountainView.setLatitude(37.390749); + mountainView.setLongitude(-122.081651); + mountainView.setTitle('Appcelerator'); + mountainView.setSubtitle('Mountain View, CA'); + mountainView.setPincolor(Ti.Map.ANNOTATION_RED); + + var mapview = Ti.Map.createView({ + mapType: Ti.Map.STANDARD_TYPE, + region: { + latitude:37.390749, longitude:-122.081651, + latitudeDelta:0.01, longitudeDelta:0.01}, + animate:true, + }); + mapview.regionFit = true; + mapview.userLocation = true; + mapview.annotations = [mountainView]; + mapview.addEventListener('click', function(evt) { + if (evt.clicksource === 'leftButton' || evt.clicksource === 'leftPane') { + alert(evt.title + ' left button clicked'); + } + }); + win.add(mapview); + win.open(); +} \ No newline at end of file diff --git a/titanium/titanium.d.ts b/titanium/titanium.d.ts new file mode 100644 index 0000000000..f4346e5792 --- /dev/null +++ b/titanium/titanium.d.ts @@ -0,0 +1,6240 @@ +// Type definitions for Titanium Movile 3.1.3.GA +// Project: http://www.appcelerator.com/ +// Definitions by: Airam Rguez +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// This file has been automatically generated. +declare module Ti { + export var bubbleParent : boolean; + export var buildDate : string; + export var buildHash : string; + export var userAgent : string; + export var version : number; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createBuffer (params: CreateBufferArgs) : Ti.Buffer; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function getBuildDate () : string; + export function getBuildHash () : string; + export function getUserAgent () : string; + export function getVersion () : number; + export function include (name: string) : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setUserAgent (userAgent: string) : void; + export module XML { + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function parseString (xml: string) : Ti.XML.Document; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function serializeToString (node: Ti.XML.Node) : string; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface Entity extends Ti.XML.Node { + notationName : string; + publicId : string; + systemId : string; + getNotationName () : string; + getPublicId () : string; + getSystemId () : string; + } + export interface Node extends Ti.Proxy { + ATTRIBUTE_NODE : number; + CDATA_SECTION_NODE : number; + COMMENT_NODE : number; + DOCUMENT_FRAGMENT_NODE : number; + DOCUMENT_NODE : number; + DOCUMENT_TYPE_NODE : number; + ELEMENT_NODE : number; + ENTITY_NODE : number; + ENTITY_REFERENCE_NODE : number; + NOTATION_NODE : number; + PROCESSING_INSTRUCTION_NODE : number; + TEXT_NODE : number; + attributes : Ti.XML.NamedNodeMap; + childNodes : Ti.XML.NodeList; + firstChild : Ti.XML.Node; + lastChild : Ti.XML.Node; + localName : string; + namespaceURI : string; + nextSibling : Ti.XML.Node; + nodeName : string; + nodeType : number; + nodeValue : string; + ownerDocument : Ti.XML.Document; + parentNode : Ti.XML.Node; + prefix : string; + previousSibling : Ti.XML.Node; + text : string; + textContent : string; + appendChild (newChild: Ti.XML.Node) : Ti.XML.Node; + cloneNode (deep: boolean) : Ti.XML.Node; + getAttributes () : Ti.XML.NamedNodeMap; + getChildNodes () : Ti.XML.NodeList; + getFirstChild () : Ti.XML.Node; + getLastChild () : Ti.XML.Node; + getLocalName () : string; + getNamespaceURI () : string; + getNextSibling () : Ti.XML.Node; + getNodeName () : string; + getNodeType () : number; + getNodeValue () : string; + getOwnerDocument () : Ti.XML.Document; + getParentNode () : Ti.XML.Node; + getPrefix () : string; + getPreviousSibling () : Ti.XML.Node; + getText () : string; + getTextContent () : string; + hasAttributes () : boolean; + hasChildNodes () : boolean; + insertBefore (newChild: Ti.XML.Node, refChild: Ti.XML.Node) : Ti.XML.Node; + isSupported (feature: string, version: string) : boolean; + normalize () : void; + removeChild (oldChild: Ti.XML.Node) : Ti.XML.Node; + replaceChild (newChild: Ti.XML.Node, oldChild: Ti.XML.Node) : Ti.XML.Node; + setLocalName (localName: string) : void; + setNodeValue (nodeValue: string) : void; + setPrefix (prefix: string) : void; + } + export enum EntityReference { + + } + export interface CharacterData extends Ti.XML.Node { + data : string; + length : number; + appendData (arg: string) : void; + deleteData (offset: number, count: number) : void; + getData () : string; + getLength () : number; + insertData (offset: number, arg: string) : void; + replaceData (offset: number, count: number, arg: string) : void; + setData (data: string) : void; + substringData (offset: number, count: number) : string; + } + export interface DOMImplementation extends Ti.Proxy { + createDocument (namespaceURI: string, qualifiedName: string, doctype: Ti.XML.DocumentType) : Ti.XML.Document; + createDocumentType (qualifiedName: string, publicId: string, systemId: string) : Ti.XML.DocumentType; + hasFeature (feature: string, version: string) : boolean; + } + export interface Document extends Ti.XML.Node { + doctype : Ti.XML.DocumentType; + documentElement : Ti.XML.Element; + implementation : Ti.XML.DOMImplementation; + createAttribute (name: string) : Ti.XML.Attr; + createAttributeNS (namespaceURI: string, name: string) : Ti.XML.Attr; + createCDATASection (data: string) : Ti.XML.CDATASection; + createComment (data: string) : Ti.XML.Comment; + createDocumentFragment () : Ti.XML.DocumentFragment; + createElement (tagName: string) : Ti.XML.Element; + createElementNS (namespaceURI: string, name: string) : Ti.XML.Element; + createEntityReference (name: string) : Ti.XML.EntityReference; + createProcessingInstruction (target: string, data: string) : Ti.XML.ProcessingInstruction; + createTextNode (data: string) : Ti.XML.Text; + getDoctype () : Ti.XML.DocumentType; + getDocumentElement () : Ti.XML.Element; + getElementById (elementId: string) : Ti.XML.Element; + getElementsByTagName (tagname: string) : Ti.XML.NodeList; + getElementsByTagNameNS (namespaceURI: string, localname: string) : Ti.XML.NodeList; + getImplementation () : Ti.XML.DOMImplementation; + importNode (importedNode: Ti.XML.Node, deep: boolean) : Ti.XML.Node; + } + export interface Attr extends Ti.XML.Node { + name : string; + ownerElement : Ti.XML.Element; + specified : boolean; + value : string; + getName () : string; + getOwnerElement () : Ti.XML.Element; + getSpecified () : boolean; + getValue () : string; + setValue (value: string) : void; + } + export interface ProcessingInstruction extends Ti.Proxy { + data : string; + target : string; + getData () : string; + getTarget () : string; + setData (data: string) : void; + } + export interface NamedNodeMap extends Ti.Proxy { + length : number; + getLength () : number; + getNamedItem (name: string) : Ti.XML.Node; + getNamedItemNS (namespaceURI: string, localName: string) : Ti.XML.Node; + item (index: number) : Ti.XML.Node; + removeNamedItem (name: string) : Ti.XML.Node; + removeNamedItemNS (namespaceURI: string, localName: string) : Ti.XML.Node; + setNamedItem (node: Ti.XML.Node) : Ti.XML.Node; + setNamedItemNS (node: Ti.XML.Node) : Ti.XML.Node; + } + export enum CDATASection { + + } + export interface Text extends Ti.XML.CharacterData { + splitText (offset: number) : Ti.XML.Text; + } + export enum DocumentFragment { + + } + export interface Notation extends Ti.Proxy { + publicId : string; + systemId : string; + getPublicId () : string; + getSystemId () : string; + } + export enum Comment { + + } + export interface NodeList extends Ti.Proxy { + length : number; + getLength () : number; + item (index: number) : Ti.XML.Node; + } + export interface DocumentType extends Ti.XML.Node { + entities : Ti.XML.NamedNodeMap; + internalSubset : string; + name : string; + notations : Ti.XML.NamedNodeMap; + publicId : string; + systemId : string; + getEntities () : Ti.XML.NamedNodeMap; + getInternalSubset () : string; + getName () : string; + getNotations () : Ti.XML.NamedNodeMap; + getPublicId () : string; + getSystemId () : string; + } + export interface Element extends Ti.XML.Node { + tagName : string; + getAttribute (name: string) : string; + getAttributeNS (namespaceURI: string, localName: string) : string; + getAttributeNode (name: string) : Ti.XML.Attr; + getAttributeNodeNS (namespaceURI: string, localName: string) : Ti.XML.Attr; + getElementsByTagName (name: string) : Ti.XML.NodeList; + getElementsByTagNameNS (namespaceURI: string, localName: string) : Ti.XML.NodeList; + getTagName () : string; + hasAttribute (name: string) : boolean; + hasAttributeNS (namespaceURI: string, localName: string) : boolean; + removeAttribute (name: string) : void; + removeAttributeNS (namespaceURI: string, localName: string) : void; + removeAttributeNode (oldAttr: Ti.XML.Attr) : void; + setAttribute (name: string, value: string) : void; + setAttributeNS (namespaceURI: string, qualifiedName: string, value: string) : void; + setAttributeNode (newAttr: Ti.XML.Attr) : Ti.XML.Attr; + setAttributeNodeNS (newAttr: Ti.XML.Attr) : Ti.XML.Attr; + } + } + export enum BlobStream { + + } + export interface IOStream extends Ti.Proxy { + close () : void; + isReadable () : boolean; + isWriteable () : boolean; + read (buffer: Ti.Buffer, offset?: number, length?: number) : number; + write (buffer: Ti.Buffer, offset?: number, length?: number) : number; + } + export module UI { + export var ANIMATION_CURVE_EASE_IN : number; + export var ANIMATION_CURVE_EASE_IN_OUT : number; + export var ANIMATION_CURVE_EASE_OUT : number; + export var ANIMATION_CURVE_LINEAR : number; + export var AUTODETECT_ADDRESS : number; + export var AUTODETECT_ALL : number; + export var AUTODETECT_CALENDAR : number; + export var AUTODETECT_LINK : number; + export var AUTODETECT_NONE : number; + export var AUTODETECT_PHONE : number; + export var AUTOLINK_ALL : number; + export var AUTOLINK_CALENDAR : number; + export var AUTOLINK_EMAIL_ADDRESSES : number; + export var AUTOLINK_MAP_ADDRESSES : number; + export var AUTOLINK_NONE : number; + export var AUTOLINK_PHONE_NUMBERS : number; + export var AUTOLINK_URLS : number; + export var BLEND_MODE_CLEAR : number; + export var BLEND_MODE_COLOR : number; + export var BLEND_MODE_COLOR_BURN : number; + export var BLEND_MODE_COLOR_DODGE : number; + export var BLEND_MODE_COPY : number; + export var BLEND_MODE_DARKEN : number; + export var BLEND_MODE_DESTINATION_ATOP : number; + export var BLEND_MODE_DESTINATION_IN : number; + export var BLEND_MODE_DESTINATION_OUT : number; + export var BLEND_MODE_DESTINATION_OVER : number; + export var BLEND_MODE_DIFFERENCE : number; + export var BLEND_MODE_EXCLUSION : number; + export var BLEND_MODE_HARD_LIGHT : number; + export var BLEND_MODE_HUE : number; + export var BLEND_MODE_LIGHTEN : number; + export var BLEND_MODE_LUMINOSITY : number; + export var BLEND_MODE_MULTIPLY : number; + export var BLEND_MODE_NORMAL : number; + export var BLEND_MODE_OVERLAY : number; + export var BLEND_MODE_PLUS_DARKER : number; + export var BLEND_MODE_PLUS_LIGHTER : number; + export var BLEND_MODE_SATURATION : number; + export var BLEND_MODE_SCREEN : number; + export var BLEND_MODE_SOFT_LIGHT : number; + export var BLEND_MODE_SOURCE_ATOP : number; + export var BLEND_MODE_SOURCE_IN : number; + export var BLEND_MODE_SOURCE_OUT : number; + export var BLEND_MODE_XOR : number; + export var EXTEND_EDGE_ALL : number; + export var EXTEND_EDGE_BOTTOM : number; + export var EXTEND_EDGE_LEFT : number; + export var EXTEND_EDGE_NONE : number; + export var EXTEND_EDGE_RIGHT : number; + export var EXTEND_EDGE_TOP : number; + export var FACE_DOWN : number; + export var FACE_UP : number; + export var FILL : string; + export var INHERIT : string; + export var INPUT_BORDERSTYLE_BEZEL : number; + export var INPUT_BORDERSTYLE_LINE : number; + export var INPUT_BORDERSTYLE_NONE : number; + export var INPUT_BORDERSTYLE_ROUNDED : number; + export var INPUT_BUTTONMODE_ALWAYS : number; + export var INPUT_BUTTONMODE_NEVER : number; + export var INPUT_BUTTONMODE_ONBLUR : number; + export var INPUT_BUTTONMODE_ONFOCUS : number; + export var KEYBOARD_APPEARANCE_ALERT : number; + export var KEYBOARD_APPEARANCE_DEFAULT : number; + export var KEYBOARD_ASCII : number; + export var KEYBOARD_DECIMAL_PAD : number; + export var KEYBOARD_DEFAULT : number; + export var KEYBOARD_EMAIL : number; + export var KEYBOARD_NAMEPHONE_PAD : number; + export var KEYBOARD_NUMBERS_PUNCTUATION : number; + export var KEYBOARD_NUMBER_PAD : number; + export var KEYBOARD_PHONE_PAD : number; + export var KEYBOARD_URL : number; + export var LANDSCAPE_LEFT : number; + export var LANDSCAPE_RIGHT : number; + export var LIST_ACCESSORY_TYPE_CHECKMARK : number; + export var LIST_ACCESSORY_TYPE_DETAIL : number; + export var LIST_ACCESSORY_TYPE_DISCLOSURE : number; + export var LIST_ACCESSORY_TYPE_NONE : number; + export var LIST_ITEM_TEMPLATE_CONTACTS : number; + export var LIST_ITEM_TEMPLATE_DEFAULT : number; + export var LIST_ITEM_TEMPLATE_SETTINGS : number; + export var LIST_ITEM_TEMPLATE_SUBTITLE : number; + export var NOTIFICATION_DURATION_LONG : number; + export var NOTIFICATION_DURATION_SHORT : number; + export var PICKER_TYPE_COUNT_DOWN_TIMER : number; + export var PICKER_TYPE_DATE : number; + export var PICKER_TYPE_DATE_AND_TIME : number; + export var PICKER_TYPE_PLAIN : number; + export var PICKER_TYPE_TIME : number; + export var PORTRAIT : number; + export var RETURNKEY_DEFAULT : number; + export var RETURNKEY_DONE : number; + export var RETURNKEY_EMERGENCY_CALL : number; + export var RETURNKEY_GO : number; + export var RETURNKEY_GOOGLE : number; + export var RETURNKEY_JOIN : number; + export var RETURNKEY_NEXT : number; + export var RETURNKEY_ROUTE : number; + export var RETURNKEY_SEARCH : number; + export var RETURNKEY_SEND : number; + export var RETURNKEY_YAHOO : number; + export var SIZE : string; + export var TEXT_ALIGNMENT_CENTER : any; + export var TEXT_ALIGNMENT_LEFT : any; + export var TEXT_ALIGNMENT_RIGHT : any; + export var TEXT_AUTOCAPITALIZATION_ALL : number; + export var TEXT_AUTOCAPITALIZATION_NONE : number; + export var TEXT_AUTOCAPITALIZATION_SENTENCES : number; + export var TEXT_AUTOCAPITALIZATION_WORDS : number; + export var TEXT_VERTICAL_ALIGNMENT_BOTTOM : any; + export var TEXT_VERTICAL_ALIGNMENT_CENTER : any; + export var TEXT_VERTICAL_ALIGNMENT_TOP : any; + export var UNIT_CM : string; + export var UNIT_DIP : string; + export var UNIT_IN : string; + export var UNIT_MM : string; + export var UNIT_PX : string; + export var UNKNOWN : number; + export var UPSIDE_PORTRAIT : number; + export var URL_ERROR_AUTHENTICATION : number; + export var URL_ERROR_BAD_URL : number; + export var URL_ERROR_CONNECT : number; + export var URL_ERROR_FILE : number; + export var URL_ERROR_FILE_NOT_FOUND : number; + export var URL_ERROR_HOST_LOOKUP : number; + export var URL_ERROR_REDIRECT_LOOP : number; + export var URL_ERROR_SSL_FAILED : number; + export var URL_ERROR_TIMEOUT : number; + export var URL_ERROR_UNKNOWN : number; + export var URL_ERROR_UNSUPPORTED_SCHEME : number; + export var backgroundColor : string; + export var backgroundImage : string; + export var bubbleParent : boolean; + export var currentTab : Ti.UI.Tab; + export var currentWindow : Ti.UI.Window; + export var orientation : number; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function convertUnits (convertFromValue: string, convertToUnits: string) : number; + export function create2DMatrix (parameters?: MatrixCreationDict) : Ti.UI._2DMatrix; + export function create3DMatrix (parameters?: Dictionary) : Ti.UI._3DMatrix; + export function createActivityIndicator (parameters?: Dictionary) : Ti.UI.ActivityIndicator; + export function createAlertDialog (parameters?: Dictionary) : Ti.UI.AlertDialog; + export function createAnimation (parameters?: Dictionary) : Ti.UI.Animation; + export function createButton (parameters?: Dictionary) : Ti.UI.Button; + export function createButtonBar (parameters?: Dictionary) : Ti.UI.ButtonBar; + export function createCoverFlowView (parameters?: Dictionary) : Ti.UI.CoverFlowView; + export function createDashboardItem (parameters?: Dictionary) : Ti.UI.DashboardItem; + export function createDashboardView (parameters?: Dictionary) : Ti.UI.DashboardView; + export function createEmailDialog (parameters?: Dictionary) : Ti.UI.EmailDialog; + export function createImageView (parameters?: Dictionary) : Ti.UI.ImageView; + export function createLabel (parameters?: Dictionary) : Ti.UI.Label; + export function createListSection (parameters?: Dictionary) : Ti.UI.ListSection; + export function createListView (parameters?: Dictionary) : Ti.UI.ListView; + export function createMaskedImage (parameters?: Dictionary) : Ti.UI.MaskedImage; + export function createNotification (parameters?: Dictionary) : Ti.UI.Notification; + export function createOptionDialog (parameters?: Dictionary) : Ti.UI.OptionDialog; + export function createPicker (parameters?: Dictionary) : Ti.UI.Picker; + export function createPickerColumn (parameters?: Dictionary) : Ti.UI.PickerColumn; + export function createPickerRow (parameters?: Dictionary) : Ti.UI.PickerRow; + export function createProgressBar (parameters?: Dictionary) : Ti.UI.ProgressBar; + export function createSMSDialog (parameters?: Dictionary) : Ti.UI.SMSDialog; + export function createScrollView (parameters?: Dictionary) : Ti.UI.ScrollView; + export function createScrollableView (parameters?: Dictionary) : Ti.UI.ScrollableView; + export function createSearchBar (parameters?: Dictionary) : Ti.UI.SearchBar; + export function createSlider (parameters?: Dictionary) : Ti.UI.Slider; + export function createSwitch (parameters?: Dictionary) : Ti.UI.Switch; + export function createTab (parameters?: Dictionary) : Ti.UI.Tab; + export function createTabGroup (parameters?: Dictionary) : Ti.UI.TabGroup; + export function createTabbedBar (parameters?: Dictionary) : Ti.UI.TabbedBar; + export function createTableView (parameters?: Dictionary) : Ti.UI.TableView; + export function createTableViewRow (parameters?: Dictionary) : Ti.UI.TableViewRow; + export function createTableViewSection (parameters?: Dictionary) : Ti.UI.TableViewSection; + export function createTextArea (parameters?: Dictionary) : Ti.UI.TextArea; + export function createTextField (parameters?: Dictionary) : Ti.UI.TextField; + export function createToolbar (parameters?: Dictionary) : Ti.UI.Toolbar; + export function createView (parameters?: Dictionary) : Ti.UI.View; + export function createWebView (parameters?: Dictionary) : Ti.UI.WebView; + export function createWindow (parameters?: Dictionary) : Ti.UI.Window; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBackgroundColor () : string; + export function getBackgroundImage () : string; + export function getBubbleParent () : boolean; + export function getCurrentTab () : Ti.UI.Tab; + export function getCurrentWindow () : Ti.UI.Window; + export function getOrientation () : number; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBackgroundColor (backgroundColor: string) : void; + export function setBackgroundImage (backgroundImage: string) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setCurrentTab (currentTab: Ti.UI.Tab) : void; + export function setOrientation (orientation: number) : void; + export module iPad { + export var POPOVER_ARROW_DIRECTION_ANY : number; + export var POPOVER_ARROW_DIRECTION_DOWN : number; + export var POPOVER_ARROW_DIRECTION_LEFT : number; + export var POPOVER_ARROW_DIRECTION_RIGHT : number; + export var POPOVER_ARROW_DIRECTION_UNKNOWN : number; + export var POPOVER_ARROW_DIRECTION_UP : number; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createDocumentViewer (parameters?: Dictionary) : Ti.UI.iPad.DocumentViewer; + export function createPopover (parameters?: Dictionary) : Ti.UI.iPad.Popover; + export function createSplitWindow (parameters?: Dictionary) : Ti.UI.iPad.SplitWindow; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface SplitWindow extends Ti.UI.Window { + detailView : Ti.UI.View; + masterView : Ti.UI.View; + showMasterInPortrait : boolean; + getDetailView () : Ti.UI.View; + getMasterView () : Ti.UI.View; + getShowMasterInPortrait () : boolean; + setShowMasterInPortrait (showMasterInPortrait: boolean) : void; + } + export interface DocumentViewer extends Ti.UI.View { + setUrl (url: string) : void; + show (animated: boolean, view: any) : void; + } + export interface Popover extends Ti.UI.View { + arrowDirection : number; + leftNavButton : any; + rightNavButton : any; + title : string; + getArrowDirection () : number; + getLeftNavButton () : any; + getRightNavButton () : any; + getTitle () : string; + setLeftNavButton (leftNavButton: any) : void; + setPassthroughViews (passthroughViews: Array) : void; + setRightNavButton (rightNavButton: any) : void; + setTitle (title: string) : void; + } + } + export interface ScrollableView extends Ti.UI.View { + cacheSize : number; + clipViews : boolean; + currentPage : number; + disableBounce : boolean; + hitRect : Dimension; + overScrollMode : number; + overlayEnabled : boolean; + pagingControlAlpha : number; + pagingControlColor : string; + pagingControlHeight : number; + pagingControlOnTop : boolean; + pagingControlTimeout : number; + scrollingEnabled : boolean; + showPagingControl : boolean; + views : Array; + addView (view: Ti.UI.View) : void; + getCacheSize () : number; + getClipViews () : boolean; + getCurrentPage () : number; + getDisableBounce () : boolean; + getHitRect () : Dimension; + getOverScrollMode () : number; + getOverlayEnabled () : boolean; + getPagingControlAlpha () : number; + getPagingControlColor () : string; + getPagingControlHeight () : number; + getPagingControlOnTop () : boolean; + getPagingControlTimeout () : number; + getScrollingEnabled () : boolean; + getShowPagingControl () : boolean; + getViews () : Array; + moveNext () : void; + movePrevious () : void; + removeView (view: number) : void; + removeView (view: Ti.UI.View) : void; + scrollToView (view: number) : void; + scrollToView (view: Ti.UI.View) : void; + setCacheSize (cacheSize: number) : void; + setCurrentPage (currentPage: number) : void; + setDisableBounce (disableBounce: boolean) : void; + setHitRect (hitRect: Dimension) : void; + setOverScrollMode (overScrollMode: number) : void; + setOverlayEnabled (overlayEnabled: boolean) : void; + setPagingControlAlpha (pagingControlAlpha: number) : void; + setPagingControlColor (pagingControlColor: string) : void; + setPagingControlHeight (pagingControlHeight: number) : void; + setPagingControlOnTop (pagingControlOnTop: boolean) : void; + setScrollingEnabled (scrollingEnabled: boolean) : void; + setShowPagingControl (showPagingControl: boolean) : void; + setViews (views: Array) : void; + } + export interface View extends Ti.Proxy { + accessibilityHidden : boolean; + accessibilityHint : string; + accessibilityLabel : string; + accessibilityValue : string; + anchorPoint : Point; + animatedCenter : Point; + backgroundColor : string; + backgroundDisabledColor : string; + backgroundDisabledImage : string; + backgroundFocusedColor : string; + backgroundFocusedImage : string; + backgroundGradient : Gradient; + backgroundImage : string; + backgroundLeftCap : number; + backgroundRepeat : boolean; + backgroundSelectedColor : string; + backgroundSelectedImage : string; + backgroundTopCap : number; + borderColor : string; + borderRadius : number; + borderWidth : number; + bottom : any; + center : Point; + children : Array; + enabled : boolean; + focusable : boolean; + height : any; + horizontalWrap : boolean; + keepScreenOn : boolean; + layout : string; + left : any; + opacity : number; + rect : Dimension; + right : any; + size : Dimension; + softKeyboardOnFocus : number; + tintColor : any; + top : any; + touchEnabled : boolean; + transform : any; + visible : boolean; + width : any; + zIndex : number; + add (view: Ti.UI.View) : void; + animate (animation: Ti.UI.Animation, callback: (...args : any[]) => any) : void; + animate (animation: Dictionary, callback: (...args : any[]) => any) : void; + convertPointToView (point: Point, destinationView: Ti.UI.View) : Point; + finishLayout () : void; + getAccessibilityHidden () : boolean; + getAccessibilityHint () : string; + getAccessibilityLabel () : string; + getAccessibilityValue () : string; + getAnchorPoint () : Point; + getAnimatedCenter () : Point; + getBackgroundColor () : string; + getBackgroundDisabledColor () : string; + getBackgroundDisabledImage () : string; + getBackgroundFocusedColor () : string; + getBackgroundFocusedImage () : string; + getBackgroundGradient () : Gradient; + getBackgroundImage () : string; + getBackgroundLeftCap () : number; + getBackgroundRepeat () : boolean; + getBackgroundSelectedColor () : string; + getBackgroundSelectedImage () : string; + getBackgroundTopCap () : number; + getBorderColor () : string; + getBorderRadius () : number; + getBorderWidth () : number; + getBottom () : any; + getCenter () : Point; + getChildren () : Array; + getEnabled () : boolean; + getFocusable () : boolean; + getHeight () : any; + getHorizontalWrap () : boolean; + getKeepScreenOn () : boolean; + getLayout () : string; + getLeft () : any; + getOpacity () : number; + getRect () : Dimension; + getRight () : any; + getSize () : Dimension; + getSoftKeyboardOnFocus () : number; + getTintColor () : string; + getTop () : any; + getTouchEnabled () : boolean; + getTransform () : any; + getVisible () : boolean; + getWidth () : any; + getZIndex () : number; + hide () : void; + remove (view: Ti.UI.View) : void; + removeAllChildren () : void; + setAccessibilityHidden (accessibilityHidden: boolean) : void; + setAccessibilityHint (accessibilityHint: string) : void; + setAccessibilityLabel (accessibilityLabel: string) : void; + setAccessibilityValue (accessibilityValue: string) : void; + setAnchorPoint (anchorPoint: Point) : void; + setBackgroundColor (backgroundColor: string) : void; + setBackgroundDisabledColor (backgroundDisabledColor: string) : void; + setBackgroundDisabledImage (backgroundDisabledImage: string) : void; + setBackgroundFocusedColor (backgroundFocusedColor: string) : void; + setBackgroundFocusedImage (backgroundFocusedImage: string) : void; + setBackgroundGradient (backgroundGradient: Gradient) : void; + setBackgroundImage (backgroundImage: string) : void; + setBackgroundLeftCap (backgroundLeftCap: number) : void; + setBackgroundRepeat (backgroundRepeat: boolean) : void; + setBackgroundSelectedColor (backgroundSelectedColor: string) : void; + setBackgroundSelectedImage (backgroundSelectedImage: string) : void; + setBackgroundTopCap (backgroundTopCap: number) : void; + setBorderColor (borderColor: string) : void; + setBorderRadius (borderRadius: number) : void; + setBorderWidth (borderWidth: number) : void; + setBottom (bottom: number) : void; + setBottom (bottom: string) : void; + setCenter (center: Point) : void; + setEnabled (enabled: boolean) : void; + setFocusable (focusable: boolean) : void; + setHeight (height: number) : void; + setHeight (height: string) : void; + setHorizontalWrap (horizontalWrap: boolean) : void; + setKeepScreenOn (keepScreenOn: boolean) : void; + setLayout (layout: string) : void; + setLeft (left: number) : void; + setLeft (left: string) : void; + setOpacity (opacity: number) : void; + setRight (right: number) : void; + setRight (right: string) : void; + setSoftKeyboardOnFocus (softKeyboardOnFocus: number) : void; + setTintColor (tintColor: string) : void; + setTop (top: number) : void; + setTop (top: string) : void; + setTouchEnabled (touchEnabled: boolean) : void; + setTransform (transform: Ti.UI._2DMatrix) : void; + setTransform (transform: Ti.UI._3DMatrix) : void; + setVisible (visible: boolean) : void; + setWidth (width: number) : void; + setWidth (width: string) : void; + setZIndex (zIndex: number) : void; + show (...args: Array) : void; + startLayout () : void; + toImage (callback?: (...args : any[]) => any, honorScaleFactor?: boolean) : Ti.Blob; + updateLayout (params: Dictionary) : void; + } + export module iPhone { + export var MODAL_PRESENTATION_CURRENT_CONTEXT : number; + export var MODAL_PRESENTATION_FORMSHEET : number; + export var MODAL_PRESENTATION_FULLSCREEN : number; + export var MODAL_PRESENTATION_PAGESHEET : number; + export var MODAL_TRANSITION_STYLE_COVER_VERTICAL : number; + export var MODAL_TRANSITION_STYLE_CROSS_DISSOLVE : number; + export var MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL : number; + export var MODAL_TRANSITION_STYLE_PARTIAL_CURL : number; + export var appBadge : number; + export var appSupportsShakeToEdit : boolean; + export var bubbleParent : boolean; + export var statusBarHidden : boolean; + export var statusBarStyle : number; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createNavigationGroup (parameters?: Dictionary) : Ti.UI.iPhone.NavigationGroup; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAppBadge () : number; + export function getAppSupportsShakeToEdit () : boolean; + export function getBubbleParent () : boolean; + export function getStatusBarHidden () : boolean; + export function getStatusBarStyle () : number; + export function hideStatusBar (params?: hideStatusBarParams) : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setAppBadge (appBadge: number) : void; + export function setAppSupportsShakeToEdit (appSupportsShakeToEdit: boolean) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setStatusBarHidden (statusBarHidden: boolean) : void; + export function setStatusBarStyle (statusBarStyle: number) : void; + export function showStatusBar (params?: showStatusBarParams) : void; + export enum ScrollIndicatorStyle { + BLACK, + DEFAULT, + WHITE + } + export enum SystemButtonStyle { + BAR, + BORDERED, + DONE, + PLAIN + } + export enum ListViewStyle { + GROUPED, + PLAIN + } + export enum StatusBar { + ANIMATION_STYLE_FADE, + ANIMATION_STYLE_NONE, + ANIMATION_STYLE_SLIDE, + DEFAULT, + GRAY, + GREY, + LIGHT_CONTENT, + OPAQUE_BLACK, + TRANSLUCENT_BLACK + } + export enum SystemButton { + ACTION, + ACTIVITY, + ADD, + BOOKMARKS, + CAMERA, + CANCEL, + COMPOSE, + CONTACT_ADD, + DISCLOSURE, + DONE, + EDIT, + FAST_FORWARD, + FIXED_SPACE, + FLEXIBLE_SPACE, + INFO_DARK, + INFO_LIGHT, + ORGANIZE, + PAUSE, + PLAY, + REFRESH, + REPLY, + REWIND, + SAVE, + SPINNER, + STOP, + TRASH + } + export enum TableViewStyle { + GROUPED, + PLAIN + } + export enum SystemIcon { + BOOKMARKS, + CONTACTS, + DOWNLOADS, + FAVORITES, + FEATURED, + HISTORY, + MORE, + MOST_RECENT, + MOST_VIEWED, + RECENTS, + SEARCH, + TOP_RATED + } + export enum ActivityIndicatorStyle { + BIG, + DARK, + PLAIN + } + export enum ProgressBarStyle { + BAR, + DEFAULT, + PLAIN + } + export enum ListViewSeparatorStyle { + NONE, + SINGLE_LINE + } + export enum RowAnimationStyle { + BOTTOM, + FADE, + LEFT, + NONE, + RIGHT, + TOP + } + export enum AnimationStyle { + CURL_DOWN, + CURL_UP, + FLIP_FROM_LEFT, + FLIP_FROM_RIGHT, + NONE + } + export interface NavigationGroup extends Ti.UI.View { + window : Ti.UI.Window; + close (window: Ti.UI.Window, options: Dictionary) : void; + getWindow () : Ti.UI.Window; + open (window: Ti.UI.Window, options: Dictionary) : void; + } + export enum TableViewScrollPosition { + BOTTOM, + MIDDLE, + NONE, + TOP + } + export enum AlertDialogStyle { + DEFAULT, + LOGIN_AND_PASSWORD_INPUT, + PLAIN_TEXT_INPUT, + SECURE_TEXT_INPUT + } + export enum ListViewScrollPosition { + BOTTOM, + MIDDLE, + NONE, + TOP + } + export enum TableViewCellSelectionStyle { + BLUE, + GRAY, + NONE + } + export enum ListViewCellSelectionStyle { + BLUE, + GRAY, + NONE + } + export enum TableViewSeparatorStyle { + NONE, + SINGLE_LINE + } + } + export interface TextArea extends Ti.UI.View { + appearance : number; + autoLink : number; + autocapitalization : number; + autocorrect : boolean; + clearOnEdit : boolean; + color : string; + editable : boolean; + ellipsize : boolean; + enableReturnKey : boolean; + font : Font; + hintText : string; + keyboardToolbar : any; + keyboardToolbarColor : string; + keyboardToolbarHeight : number; + keyboardType : number; + maxLength : number; + returnKeyType : number; + scrollable : boolean; + scrollsToTop : boolean; + suppressReturn : boolean; + textAlign : any; + value : string; + verticalAlign : any; + blur () : void; + focus () : void; + getAppearance () : number; + getAutoLink () : number; + getAutocapitalization () : number; + getAutocorrect () : boolean; + getClearOnEdit () : boolean; + getColor () : string; + getEditable () : boolean; + getEllipsize () : boolean; + getEnableReturnKey () : boolean; + getFont () : Font; + getHintText () : string; + getKeyboardToolbar () : any; + getKeyboardToolbarColor () : string; + getKeyboardToolbarHeight () : number; + getKeyboardType () : number; + getMaxLength () : number; + getReturnKeyType () : number; + getScrollable () : boolean; + getScrollsToTop () : boolean; + getSuppressReturn () : boolean; + getTextAlign () : any; + getValue () : string; + getVerticalAlign () : any; + hasText () : boolean; + setAppearance (appearance: number) : void; + setAutoLink (autoLink: number) : void; + setAutocapitalization (autocapitalization: number) : void; + setAutocorrect (autocorrect: boolean) : void; + setClearOnEdit (clearOnEdit: boolean) : void; + setColor (color: string) : void; + setEditable (editable: boolean) : void; + setEllipsize (ellipsize: boolean) : void; + setEnableReturnKey (enableReturnKey: boolean) : void; + setFont (font: Font) : void; + setHintText (hintText: string) : void; + setKeyboardToolbar (keyboardToolbar: Array) : void; + setKeyboardToolbar (keyboardToolbar: Ti.UI.iOS.Toolbar) : void; + setKeyboardToolbarColor (keyboardToolbarColor: string) : void; + setKeyboardToolbarHeight (keyboardToolbarHeight: number) : void; + setKeyboardType (keyboardType: number) : void; + setMaxLength (maxLength: number) : void; + setReturnKeyType (returnKeyType: number) : void; + setScrollable (scrollable: boolean) : void; + setScrollsToTop (scrollsToTop: boolean) : void; + setSelection (start: number, end: number) : void; + setSuppressReturn (suppressReturn: boolean) : void; + setTextAlign (textAlign: string) : void; + setTextAlign (textAlign: number) : void; + setValue (value: string) : void; + setVerticalAlign (verticalAlign: number) : void; + setVerticalAlign (verticalAlign: string) : void; + } + export enum ActivityIndicatorStyle { + BIG, + BIG_DARK, + DARK, + PLAIN + } + export interface Switch extends Ti.UI.View { + color : string; + font : Font; + style : number; + textAlign : any; + title : string; + titleOff : string; + titleOn : string; + value : boolean; + verticalAlign : any; + getColor () : string; + getFont () : Font; + getStyle () : number; + getTextAlign () : any; + getTitle () : string; + getTitleOff () : string; + getTitleOn () : string; + getValue () : boolean; + getVerticalAlign () : any; + setColor (color: string) : void; + setFont (font: Font) : void; + setStyle (style: number) : void; + setTextAlign (textAlign: string) : void; + setTextAlign (textAlign: number) : void; + setTitle (title: string) : void; + setTitleOff (titleOff: string) : void; + setTitleOn (titleOn: string) : void; + setValue (value: boolean) : void; + setVerticalAlign (verticalAlign: number) : void; + setVerticalAlign (verticalAlign: string) : void; + } + export interface Tab extends Ti.UI.View { + active : boolean; + activeIcon : string; + activeIconIsMask : any; + badge : string; + icon : string; + iconIsmask : any; + title : string; + titleid : string; + window : Ti.UI.Window; + close (window: Ti.UI.Window, options?: any) : void; + getActive () : boolean; + getActiveIcon () : string; + getActiveIconIsMask () : boolean; + getBadge () : string; + getIcon () : string; + getIconIsmask () : boolean; + getTitle () : string; + getTitleid () : string; + getWindow () : Ti.UI.Window; + open (window: Ti.UI.Window, options: any) : void; + setActive (active: boolean) : void; + setActiveIcon (activeIcon: string) : void; + setActiveIconIsMask (activeIconIsMask: boolean) : void; + setBadge (badge: string) : void; + setIcon (icon: string) : void; + setIconIsmask (iconIsmask: boolean) : void; + setTitle (title: string) : void; + setTitleid (titleid: string) : void; + setWindow (window: Ti.UI.Window) : void; + } + export interface TableViewRow extends Ti.UI.View { + className : string; + color : string; + editable : boolean; + font : Font; + hasCheck : boolean; + hasChild : boolean; + hasDetail : boolean; + indentionLevel : number; + leftImage : string; + moveable : boolean; + rightImage : string; + selectedBackgroundColor : string; + selectedBackgroundImage : string; + selectedColor : string; + selectionStyle : number; + title : string; + getClassName () : string; + getColor () : string; + getEditable () : boolean; + getFont () : Font; + getHasCheck () : boolean; + getHasChild () : boolean; + getHasDetail () : boolean; + getIndentionLevel () : number; + getLeftImage () : string; + getMoveable () : boolean; + getRightImage () : string; + getSelectedBackgroundColor () : string; + getSelectedBackgroundImage () : string; + getSelectedColor () : string; + getSelectionStyle () : number; + getTitle () : string; + setClassName (className: string) : void; + setColor (color: string) : void; + setEditable (editable: boolean) : void; + setFont (font: Font) : void; + setHasCheck (hasCheck: boolean) : void; + setHasChild (hasChild: boolean) : void; + setHasDetail (hasDetail: boolean) : void; + setIndentionLevel (indentionLevel: number) : void; + setLeftImage (leftImage: string) : void; + setMoveable (moveable: boolean) : void; + setRightImage (rightImage: string) : void; + setSelectedBackgroundColor (selectedBackgroundColor: string) : void; + setSelectedBackgroundImage (selectedBackgroundImage: string) : void; + setSelectedColor (selectedColor: string) : void; + setSelectionStyle (selectionStyle: number) : void; + setTitle (title: string) : void; + } + export interface PickerRow extends Ti.UI.View { + color : string; + font : Font; + fontSize : number; + title : string; + getColor () : string; + getFont () : Font; + getFontSize () : number; + getTitle () : string; + setColor (color: string) : void; + setFont (font: Font) : void; + setFontSize (fontSize: number) : void; + setTitle (title: string) : void; + } + export interface Slider extends Ti.UI.View { + disabledLeftTrackImage : string; + disabledRightTrackImage : string; + disabledThumbImage : string; + highlightedLeftTrackImage : string; + highlightedRightTrackImage : string; + highlightedThumbImage : string; + leftTrackImage : string; + leftTrackLeftCap : number; + leftTrackTopCap : number; + max : number; + maxRange : number; + min : number; + minRange : number; + rightTrackImage : string; + rightTrackLeftCap : number; + rightTrackTopCap : number; + selectedLeftTrackImage : string; + selectedRightTrackImage : string; + selectedThumbImage : string; + thumbImage : any; + value : string; + getDisabledLeftTrackImage () : string; + getDisabledRightTrackImage () : string; + getDisabledThumbImage () : string; + getHighlightedLeftTrackImage () : string; + getHighlightedRightTrackImage () : string; + getHighlightedThumbImage () : string; + getLeftTrackImage () : string; + getLeftTrackLeftCap () : number; + getLeftTrackTopCap () : number; + getMax () : number; + getMaxRange () : number; + getMin () : number; + getMinRange () : number; + getRightTrackImage () : string; + getRightTrackLeftCap () : number; + getRightTrackTopCap () : number; + getSelectedLeftTrackImage () : string; + getSelectedRightTrackImage () : string; + getSelectedThumbImage () : string; + getThumbImage () : any; + getValue () : string; + setDisabledLeftTrackImage (disabledLeftTrackImage: string) : void; + setDisabledRightTrackImage (disabledRightTrackImage: string) : void; + setDisabledThumbImage (disabledThumbImage: string) : void; + setHighlightedLeftTrackImage (highlightedLeftTrackImage: string) : void; + setHighlightedRightTrackImage (highlightedRightTrackImage: string) : void; + setHighlightedThumbImage (highlightedThumbImage: string) : void; + setLeftTrackImage (leftTrackImage: string) : void; + setLeftTrackLeftCap (leftTrackLeftCap: number) : void; + setLeftTrackTopCap (leftTrackTopCap: number) : void; + setMax (max: number) : void; + setMaxRange (maxRange: number) : void; + setMin (min: number) : void; + setMinRange (minRange: number) : void; + setRightTrackImage (rightTrackImage: string) : void; + setRightTrackLeftCap (rightTrackLeftCap: number) : void; + setRightTrackTopCap (rightTrackTopCap: number) : void; + setSelectedLeftTrackImage (selectedLeftTrackImage: string) : void; + setSelectedRightTrackImage (selectedRightTrackImage: string) : void; + setSelectedThumbImage (selectedThumbImage: string) : void; + setThumbImage (thumbImage: string) : void; + setThumbImage (thumbImage: Ti.Blob) : void; + setValue (value: number, options?: Dictionary) : void; + } + export module Android { + export var LINKIFY_ALL : number; + export var LINKIFY_EMAIL_ADDRESSES : number; + export var LINKIFY_MAP_ADDRESSES : number; + export var LINKIFY_PHONE_NUMBERS : number; + export var LINKIFY_WEB_URLS : number; + export var OVER_SCROLL_ALWAYS : number; + export var OVER_SCROLL_IF_CONTENT_SCROLLS : number; + export var OVER_SCROLL_NEVER : number; + export var PIXEL_FORMAT_A_8 : number; + export var PIXEL_FORMAT_LA_88 : number; + export var PIXEL_FORMAT_L_8 : number; + export var PIXEL_FORMAT_OPAQUE : number; + export var PIXEL_FORMAT_RGBA_4444 : number; + export var PIXEL_FORMAT_RGBA_5551 : number; + export var PIXEL_FORMAT_RGBA_8888 : number; + export var PIXEL_FORMAT_RGBX_8888 : number; + export var PIXEL_FORMAT_RGB_332 : number; + export var PIXEL_FORMAT_RGB_565 : number; + export var PIXEL_FORMAT_RGB_888 : number; + export var PIXEL_FORMAT_TRANSLUCENT : number; + export var PIXEL_FORMAT_TRANSPARENT : number; + export var PIXEL_FORMAT_UNKNOWN : number; + export var PROGRESS_INDICATOR_DETERMINANT : number; + export var PROGRESS_INDICATOR_DIALOG : number; + export var PROGRESS_INDICATOR_INDETERMINANT : number; + export var PROGRESS_INDICATOR_STATUS_BAR : number; + export var SOFT_INPUT_ADJUST_PAN : number; + export var SOFT_INPUT_ADJUST_RESIZE : number; + export var SOFT_INPUT_ADJUST_UNSPECIFIED : number; + export var SOFT_INPUT_STATE_ALWAYS_HIDDEN : number; + export var SOFT_INPUT_STATE_ALWAYS_VISIBLE : number; + export var SOFT_INPUT_STATE_HIDDEN : number; + export var SOFT_INPUT_STATE_UNSPECIFIED : number; + export var SOFT_INPUT_STATE_VISIBLE : number; + export var SOFT_KEYBOARD_DEFAULT_ON_FOCUS : number; + export var SOFT_KEYBOARD_HIDE_ON_FOCUS : number; + export var SOFT_KEYBOARD_SHOW_ON_FOCUS : number; + export var SWITCH_STYLE_CHECKBOX : number; + export var SWITCH_STYLE_TOGGLEBUTTON : number; + export var WEBVIEW_LOAD_CACHE_ELSE_NETWORK : number; + export var WEBVIEW_LOAD_CACHE_ONLY : number; + export var WEBVIEW_LOAD_DEFAULT : number; + export var WEBVIEW_LOAD_NO_CACHE : number; + export var WEBVIEW_PLUGINS_OFF : number; + export var WEBVIEW_PLUGINS_ON : number; + export var WEBVIEW_PLUGINS_ON_DEMAND : number; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createProgressIndicator (parameters?: Dictionary) : Ti.UI.Android.ProgressIndicator; + export function createSearchView (parameters?: Dictionary) : Ti.UI.Android.SearchView; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function hideSoftKeyboard () : void; + export function openPreferences () : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface SearchView extends Ti.UI.View { + hintText : string; + iconified : boolean; + iconifiedByDefault : boolean; + submitEnabled : boolean; + value : string; + blur () : void; + focus () : void; + getHintText () : string; + getIconified () : boolean; + getIconifiedByDefault () : boolean; + getSubmitEnabled () : boolean; + getValue () : string; + setHintText (hintText: string) : void; + setIconified (iconified: boolean) : void; + setIconifiedByDefault (iconifiedByDefault: boolean) : void; + setSubmitEnabled (submitEnabled: boolean) : void; + setValue (value: string) : void; + } + export interface ProgressIndicator extends Ti.Proxy { + cancelable : boolean; + location : number; + max : number; + message : string; + messageid : string; + min : number; + type : number; + getCancelable () : boolean; + getLocation () : number; + getMax () : number; + getMessage () : string; + getMessageid () : string; + getMin () : number; + getType () : number; + hide () : void; + setCancelable (cancelable: boolean) : void; + setLocation (location: number) : void; + setMax (max: number) : void; + setMessage (message: string) : void; + setMessageid (messageid: string) : void; + setMin (min: number) : void; + setType (type: number) : void; + show () : void; + } + } + export interface DashboardItem extends Ti.Proxy { + badge : number; + canDelete : boolean; + image : any; + selectedImage : any; + getBadge () : number; + getCanDelete () : boolean; + getImage () : any; + getSelectedImage () : any; + setBadge (badge: number) : void; + setCanDelete (canDelete: boolean) : void; + setImage (image: string) : void; + setImage (image: Ti.Blob) : void; + setSelectedImage (selectedImage: string) : void; + setSelectedImage (selectedImage: Ti.Blob) : void; + } + export interface DashboardView extends Ti.UI.View { + columnCount : number; + data : Array; + editable : boolean; + rowCount : number; + wobble : boolean; + getColumnCount () : number; + getData () : Array; + getEditable () : boolean; + getRowCount () : number; + getWobble () : boolean; + setData (data: Array) : void; + setEditable (editable: boolean) : void; + setWobble (wobble: boolean) : void; + startEditing () : void; + stopEditing () : void; + } + export interface ListItem extends Ti.Proxy { + accessoryType : number; + backgroundColor : string; + backgroundGradient : Gradient; + backgroundImage : string; + canEdit : boolean; + canMove : boolean; + color : string; + font : Font; + height : any; + image : string; + itemId : string; + searchableText : string; + selectedBackgroundColor : string; + selectedBackgroundGradient : Gradient; + selectedBackgroundImage : string; + selectionStyle : number; + subtitle : string; + title : string; + } + export interface AlertDialog extends Ti.Proxy { + androidView : Ti.UI.View; + buttonNames : Array; + cancel : number; + message : string; + messageid : string; + ok : string; + okid : string; + persistent : boolean; + style : number; + title : string; + titleid : string; + getAndroidView () : Ti.UI.View; + getButtonNames () : Array; + getCancel () : number; + getMessage () : string; + getOk () : string; + getPersistent () : boolean; + getStyle () : number; + getTitle () : string; + hide () : void; + setAndroidView (androidView: Ti.UI.View) : void; + setCancel (cancel: number) : void; + setMessage (message: string) : void; + setOk (ok: string) : void; + setPersistent (persistent: boolean) : void; + setStyle (style: number) : void; + setTitle (title: string) : void; + show () : void; + } + export module iOS { + export var AD_SIZE_LANDSCAPE : string; + export var AD_SIZE_PORTRAIT : string; + export var ANIMATION_CURVE_EASE_IN : number; + export var ANIMATION_CURVE_EASE_IN_OUT : number; + export var ANIMATION_CURVE_EASE_OUT : number; + export var ANIMATION_CURVE_LINEAR : number; + export var AUTODETECT_ADDRESS : number; + export var AUTODETECT_ALL : number; + export var AUTODETECT_CALENDAR : number; + export var AUTODETECT_LINK : number; + export var AUTODETECT_NONE : number; + export var AUTODETECT_PHONE : number; + export var BLEND_MODE_CLEAR : number; + export var BLEND_MODE_COLOR : number; + export var BLEND_MODE_COLOR_BURN : number; + export var BLEND_MODE_COLOR_DODGE : number; + export var BLEND_MODE_COPY : number; + export var BLEND_MODE_DARKEN : number; + export var BLEND_MODE_DESTINATION_ATOP : number; + export var BLEND_MODE_DESTINATION_IN : number; + export var BLEND_MODE_DESTINATION_OUT : number; + export var BLEND_MODE_DESTINATION_OVER : number; + export var BLEND_MODE_DIFFERENCE : number; + export var BLEND_MODE_EXCLUSION : number; + export var BLEND_MODE_HARD_LIGHT : number; + export var BLEND_MODE_HUE : number; + export var BLEND_MODE_LIGHTEN : number; + export var BLEND_MODE_LUMINOSITY : number; + export var BLEND_MODE_MULTIPLY : number; + export var BLEND_MODE_NORMAL : number; + export var BLEND_MODE_OVERLAY : number; + export var BLEND_MODE_PLUS_DARKER : number; + export var BLEND_MODE_PLUS_LIGHTER : number; + export var BLEND_MODE_SATURATION : number; + export var BLEND_MODE_SCREEN : number; + export var BLEND_MODE_SOFT_LIGHT : number; + export var BLEND_MODE_SOURCE_ATOP : number; + export var BLEND_MODE_SOURCE_IN : number; + export var BLEND_MODE_SOURCE_OUT : number; + export var BLEND_MODE_XOR : number; + export var COLOR_GROUP_TABLEVIEW_BACKGROUND : string; + export var COLOR_SCROLLVIEW_BACKGROUND : string; + export var COLOR_UNDER_PAGE_BACKGROUND : string; + export var COLOR_VIEW_FLIPSIDE_BACKGROUND : string; + export var WEBVIEW_NAVIGATIONTYPE_BACK_FORWARD : number; + export var WEBVIEW_NAVIGATIONTYPE_FORM_RESUBMITTED : number; + export var WEBVIEW_NAVIGATIONTYPE_FORM_SUBMITTED : number; + export var WEBVIEW_NAVIGATIONTYPE_LINK_CLICKED : number; + export var WEBVIEW_NAVIGATIONTYPE_OTHER : number; + export var WEBVIEW_NAVIGATIONTYPE_RELOAD : number; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function create3DMatrix (parameters?: Dictionary) : Ti.UI.iOS._3DMatrix; + export function createAdView (parameters?: Dictionary) : Ti.UI.iOS.AdView; + export function createCoverFlowView (parameters?: Dictionary) : Ti.UI.iOS.CoverFlowView; + export function createDocumentViewer (parameters?: Dictionary) : Ti.UI.iOS.DocumentViewer; + export function createNavigationWindow (parameters?: Dictionary) : Ti.UI.iOS.NavigationWindow; + export function createTabbedBar (parameters?: Dictionary) : Ti.UI.iOS.TabbedBar; + export function createToolbar (parameters?: Dictionary) : Ti.UI.iOS.Toolbar; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface Toolbar extends Ti.UI.View { + barColor : string; + borderBottom : boolean; + borderTop : boolean; + items : Array; + translucent : boolean; + getBarColor () : string; + getBorderBottom () : boolean; + getBorderTop () : boolean; + getItems () : Array; + getTranslucent () : boolean; + setBarColor (barColor: string) : void; + setBorderBottom (borderBottom: boolean) : void; + setBorderTop (borderTop: boolean) : void; + setItems (items: Array) : void; + setTranslucent (translucent: boolean) : void; + } + export interface CoverFlowView extends Ti.UI.View { + images : any; + selected : number; + getImages () : any; + getSelected () : number; + setImage (index: number, image: string) : void; + setImage (image: Ti.Blob) : void; + setImage (image: Ti.Filesystem.File) : void; + setImage (index: number, image: CoverFlowImageType) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setSelected (selected: number) : void; + } + export interface DocumentViewer extends Ti.UI.View { + name : string; + url : string; + getName () : string; + getUrl () : string; + hide (options?: DocumentViewerOptions) : void; + setUrl (url: string) : void; + show (options?: DocumentViewerOptions) : void; + } + export interface NavigationWindow extends Ti.UI.Window { + window : Ti.UI.Window; + closeWindow (window: Ti.UI.Window, options: Dictionary) : void; + getWindow () : Ti.UI.Window; + openWindow (window: Ti.UI.Window, options: Dictionary) : void; + } + export interface TabbedBar extends Ti.UI.View { + index : number; + labels : any; + style : number; + getIndex () : number; + getLabels () : any; + getStyle () : number; + setIndex (index: number) : void; + setLabels (labels: Array) : void; + setLabels (labels: Array) : void; + setStyle (style: number) : void; + } + export interface _3DMatrix extends Ti.Proxy { + m11 : number; + m12 : number; + m13 : number; + m14 : number; + m21 : number; + m22 : number; + m23 : number; + m24 : number; + m31 : number; + m32 : number; + m33 : number; + m34 : number; + m41 : number; + m42 : number; + m43 : number; + m44 : number; + getM11 () : number; + getM12 () : number; + getM13 () : number; + getM14 () : number; + getM21 () : number; + getM22 () : number; + getM23 () : number; + getM24 () : number; + getM31 () : number; + getM32 () : number; + getM33 () : number; + getM34 () : number; + getM41 () : number; + getM42 () : number; + getM43 () : number; + getM44 () : number; + invert () : Ti.UI._3DMatrix; + multiply (t2: Ti.UI._3DMatrix) : Ti.UI._3DMatrix; + rotate (angle: number, x: number, y: number, z: number) : Ti.UI._3DMatrix; + scale (sx: number, sy: number, sz: number) : Ti.UI._3DMatrix; + setM11 (m11: number) : void; + setM12 (m12: number) : void; + setM13 (m13: number) : void; + setM14 (m14: number) : void; + setM21 (m21: number) : void; + setM22 (m22: number) : void; + setM23 (m23: number) : void; + setM24 (m24: number) : void; + setM31 (m31: number) : void; + setM32 (m32: number) : void; + setM33 (m33: number) : void; + setM34 (m34: number) : void; + setM41 (m41: number) : void; + setM42 (m42: number) : void; + setM43 (m43: number) : void; + setM44 (m44: number) : void; + translate (tx: number, ty: number, tz: number) : Ti.UI._3DMatrix; + } + export interface AdView extends Ti.UI.View { + adSize : string; + cancelAction () : void; + getAdSize () : string; + setAdSize (adSize: string) : void; + } + } + export interface _2DMatrix extends Ti.Proxy { + a : number; + b : number; + c : number; + d : number; + tx : number; + ty : number; + getA () : number; + getB () : number; + getC () : number; + getD () : number; + getTx () : number; + getTy () : number; + invert () : Ti.UI._2DMatrix; + multiply (t2: Ti.UI._2DMatrix) : Ti.UI._2DMatrix; + rotate (angle: number, toAngle?: number) : Ti.UI._2DMatrix; + scale (sx: number, sy: number, toSx?: number, toSy?: number) : Ti.UI._2DMatrix; + setA (a: number) : void; + setB (b: number) : void; + setC (c: number) : void; + setD (d: number) : void; + setTx (tx: number) : void; + setTy (ty: number) : void; + translate (tx: number, ty: number) : Ti.UI._2DMatrix; + } + export interface TabbedBar extends Ti.UI.View { + index : number; + labels : any; + style : number; + getIndex () : number; + getLabels () : any; + getStyle () : number; + setIndex (index: number) : void; + setLabels (labels: Array) : void; + setLabels (labels: Array) : void; + setStyle (style: number) : void; + } + export interface Window extends Ti.UI.View { + activity : Ti.Android.Activity; + autoAdjustScrollViewInsets : boolean; + backButtonTitle : string; + backButtonTitleImage : any; + barColor : string; + barImage : string; + exitOnClose : boolean; + extendEdges : Array; + fullscreen : boolean; + includeOpaqueBars : boolean; + leftNavButton : Ti.UI.View; + modal : boolean; + navBarHidden : boolean; + navTintColor : any; + orientation : number; + orientationModes : Array; + rightNavButton : Ti.UI.View; + statusBarStyle : any; + tabBarHidden : boolean; + title : string; + titleControl : Ti.UI.View; + titleImage : string; + titlePrompt : string; + titleid : string; + titlepromptid : string; + toolbar : Array; + translucent : boolean; + url : string; + windowPixelFormat : number; + windowSoftInputMode : number; + close (params?: Dictionary) : void; + close (params?: closeWindowParams) : void; + getActivity () : Ti.Android.Activity; + getAutoAdjustScrollViewInsets () : boolean; + getBackButtonTitle () : string; + getBackButtonTitleImage () : any; + getBarColor () : string; + getBarImage () : string; + getExitOnClose () : boolean; + getExtendEdges () : Array; + getFullscreen () : boolean; + getIncludeOpaqueBars () : boolean; + getLeftNavButton () : Ti.UI.View; + getModal () : boolean; + getNavBarHidden () : boolean; + getNavTintColor () : string; + getOrientation () : number; + getOrientationModes () : Array; + getRightNavButton () : Ti.UI.View; + getStatusBarStyle () : number; + getTabBarHidden () : boolean; + getTitle () : string; + getTitleControl () : Ti.UI.View; + getTitleImage () : string; + getTitlePrompt () : string; + getTitleid () : string; + getTitlepromptid () : string; + getToolbar () : Array; + getTranslucent () : boolean; + getUrl () : string; + getWindowPixelFormat () : number; + getWindowSoftInputMode () : number; + hideTabBar () : void; + open (params?: openWindowParams) : void; + setAutoAdjustScrollViewInsets (autoAdjustScrollViewInsets: boolean) : void; + setBackButtonTitle (backButtonTitle: string) : void; + setBackButtonTitleImage (backButtonTitleImage: string) : void; + setBackButtonTitleImage (backButtonTitleImage: Ti.Blob) : void; + setBarColor (barColor: string) : void; + setBarImage (barImage: string) : void; + setExtendEdges (extendEdges: Array) : void; + setFullscreen (fullscreen: boolean) : void; + setIncludeOpaqueBars (includeOpaqueBars: boolean) : void; + setLeftNavButton (leftNavButton: Ti.UI.View) : void; + setModal (modal: boolean) : void; + setNavBarHidden (navBarHidden: boolean) : void; + setNavTintColor (navTintColor: string) : void; + setOrientationModes (orientationModes: Array) : void; + setRightNavButton (rightNavButton: Ti.UI.View) : void; + setStatusBarStyle (statusBarStyle: number) : void; + setTabBarHidden (tabBarHidden: boolean) : void; + setTitle (title: string) : void; + setTitleControl (titleControl: Ti.UI.View) : void; + setTitleImage (titleImage: string) : void; + setTitlePrompt (titlePrompt: string) : void; + setTitleid (titleid: string) : void; + setTitlepromptid (titlepromptid: string) : void; + setToolbar (items: Array, params?: windowToolbarParam) : void; + setTranslucent (translucent: boolean) : void; + setWindowPixelFormat (windowPixelFormat: number) : void; + } + export interface TextField extends Ti.UI.View { + appearance : number; + autoLink : number; + autocapitalization : number; + autocorrect : boolean; + borderStyle : number; + clearButtonMode : number; + clearOnEdit : boolean; + color : string; + editable : boolean; + ellipsize : boolean; + enableReturnKey : boolean; + font : Font; + hintText : string; + keyboardToolbar : any; + keyboardToolbarColor : string; + keyboardToolbarHeight : number; + keyboardType : number; + leftButton : any; + leftButtonMode : number; + leftButtonPadding : number; + maxLength : number; + minimumFontSize : number; + paddingLeft : number; + paddingRight : number; + passwordMask : boolean; + returnKeyType : number; + rightButton : any; + rightButtonMode : number; + rightButtonPadding : number; + suppressReturn : boolean; + textAlign : any; + value : string; + verticalAlign : any; + blur () : void; + focus () : void; + getAppearance () : number; + getAutoLink () : number; + getAutocapitalization () : number; + getAutocorrect () : boolean; + getBorderStyle () : number; + getClearButtonMode () : number; + getClearOnEdit () : boolean; + getColor () : string; + getEditable () : boolean; + getEllipsize () : boolean; + getEnableReturnKey () : boolean; + getFont () : Font; + getHintText () : string; + getKeyboardToolbar () : any; + getKeyboardToolbarColor () : string; + getKeyboardToolbarHeight () : number; + getKeyboardType () : number; + getLeftButton () : any; + getLeftButtonMode () : number; + getLeftButtonPadding () : number; + getMaxLength () : number; + getMinimumFontSize () : number; + getPaddingLeft () : number; + getPaddingRight () : number; + getPasswordMask () : boolean; + getReturnKeyType () : number; + getRightButton () : any; + getRightButtonMode () : number; + getRightButtonPadding () : number; + getSuppressReturn () : boolean; + getTextAlign () : any; + getValue () : string; + getVerticalAlign () : any; + hasText () : boolean; + setAppearance (appearance: number) : void; + setAutoLink (autoLink: number) : void; + setAutocapitalization (autocapitalization: number) : void; + setAutocorrect (autocorrect: boolean) : void; + setBorderStyle (borderStyle: number) : void; + setClearButtonMode (clearButtonMode: number) : void; + setClearOnEdit (clearOnEdit: boolean) : void; + setColor (color: string) : void; + setEditable (editable: boolean) : void; + setEllipsize (ellipsize: boolean) : void; + setEnableReturnKey (enableReturnKey: boolean) : void; + setFont (font: Font) : void; + setHintText (hintText: string) : void; + setKeyboardToolbar (keyboardToolbar: Array) : void; + setKeyboardToolbar (keyboardToolbar: Ti.UI.iOS.Toolbar) : void; + setKeyboardToolbarColor (keyboardToolbarColor: string) : void; + setKeyboardToolbarHeight (keyboardToolbarHeight: number) : void; + setKeyboardType (keyboardType: number) : void; + setLeftButton (leftButton: any) : void; + setLeftButtonMode (leftButtonMode: number) : void; + setLeftButtonPadding (leftButtonPadding: number) : void; + setMaxLength (maxLength: number) : void; + setMinimumFontSize (minimumFontSize: number) : void; + setPaddingLeft (paddingLeft: number) : void; + setPaddingRight (paddingRight: number) : void; + setPasswordMask (passwordMask: boolean) : void; + setReturnKeyType (returnKeyType: number) : void; + setRightButton (rightButton: any) : void; + setRightButtonMode (rightButtonMode: number) : void; + setRightButtonPadding (rightButtonPadding: number) : void; + setSelection (start: number, end: number) : void; + setSuppressReturn (suppressReturn: boolean) : void; + setTextAlign (textAlign: string) : void; + setTextAlign (textAlign: number) : void; + setValue (value: string) : void; + setVerticalAlign (verticalAlign: number) : void; + setVerticalAlign (verticalAlign: string) : void; + } + export interface _3DMatrix extends Ti.Proxy { + m11 : number; + m12 : number; + m13 : number; + m14 : number; + m21 : number; + m22 : number; + m23 : number; + m24 : number; + m31 : number; + m32 : number; + m33 : number; + m34 : number; + m41 : number; + m42 : number; + m43 : number; + m44 : number; + getM11 () : number; + getM12 () : number; + getM13 () : number; + getM14 () : number; + getM21 () : number; + getM22 () : number; + getM23 () : number; + getM24 () : number; + getM31 () : number; + getM32 () : number; + getM33 () : number; + getM34 () : number; + getM41 () : number; + getM42 () : number; + getM43 () : number; + getM44 () : number; + invert () : Ti.UI._3DMatrix; + multiply (t2: Ti.UI._3DMatrix) : Ti.UI._3DMatrix; + rotate (angle: number, x: number, y: number, z: number) : Ti.UI._3DMatrix; + scale (sx: number, sy: number, sz: number) : Ti.UI._3DMatrix; + setM11 (m11: number) : void; + setM12 (m12: number) : void; + setM13 (m13: number) : void; + setM14 (m14: number) : void; + setM21 (m21: number) : void; + setM22 (m22: number) : void; + setM23 (m23: number) : void; + setM24 (m24: number) : void; + setM31 (m31: number) : void; + setM32 (m32: number) : void; + setM33 (m33: number) : void; + setM34 (m34: number) : void; + setM41 (m41: number) : void; + setM42 (m42: number) : void; + setM43 (m43: number) : void; + setM44 (m44: number) : void; + translate (tx: number, ty: number, tz: number) : Ti.UI._3DMatrix; + } + export interface WebView extends Ti.UI.View { + cacheMode : number; + data : any; + disableBounce : boolean; + enableZoomControls : boolean; + hideLoadIndicator : boolean; + html : string; + ignoreSslError : boolean; + lightTouchEnabled : boolean; + loading : boolean; + overScrollMode : number; + pluginState : number; + scalesPageToFit : boolean; + scrollsToTop : boolean; + showScrollbars : boolean; + url : string; + userAgent : string; + willHandleTouches : boolean; + canGoBack () : boolean; + canGoForward () : boolean; + evalJS (code: string) : string; + getCacheMode () : number; + getData () : any; + getDisableBounce () : boolean; + getEnableZoomControls () : boolean; + getHideLoadIndicator () : boolean; + getHtml () : string; + getIgnoreSslError () : boolean; + getLightTouchEnabled () : boolean; + getLoading () : boolean; + getOverScrollMode () : number; + getPluginState () : number; + getScalesPageToFit () : boolean; + getScrollsToTop () : boolean; + getShowScrollbars () : boolean; + getUrl () : string; + getUserAgent () : string; + getWillHandleTouches () : boolean; + goBack () : void; + goForward () : void; + pause () : void; + release () : void; + reload () : void; + repaint () : void; + resume () : void; + setBasicAuthentication (username: string, password: string) : void; + setCacheMode (cacheMode: number) : void; + setData (data: Ti.Blob) : void; + setData (data: Ti.Filesystem.File) : void; + setDisableBounce (disableBounce: boolean) : void; + setEnableZoomControls (enableZoomControls: boolean) : void; + setHideLoadIndicator (hideLoadIndicator: boolean) : void; + setHtml (html: any, options?: Dictionary) : void; + setIgnoreSslError (ignoreSslError: boolean) : void; + setLightTouchEnabled (lightTouchEnabled: boolean) : void; + setLoading (loading: boolean) : void; + setOverScrollMode (overScrollMode: number) : void; + setPluginState (pluginState: number) : void; + setScalesPageToFit (scalesPageToFit: boolean) : void; + setScrollsToTop (scrollsToTop: boolean) : void; + setShowScrollbars (showScrollbars: boolean) : void; + setUrl (url: string) : void; + setUserAgent (userAgent: string) : void; + setWillHandleTouches (willHandleTouches: boolean) : void; + stopLoading (hardStop: boolean) : void; + } + export interface Clipboard { + clearData (type?: string) : void; + clearText () : void; + getData (type: string) : any; + getText () : string; + hasData (type: string) : boolean; + hasText () : any; + setData (type: string, data: any) : void; + setText (text: string) : void; + } + export interface ListSection extends Ti.Proxy { + footerTitle : string; + footerView : Ti.UI.View; + headerTitle : string; + headerView : Ti.UI.View; + items : Array; + appendItems (dataItems: Array, animation?: ListViewAnimationProperties) : void; + deleteItemsAt (itemIndex: number, count: number, animation?: ListViewAnimationProperties) : void; + getFooterTitle () : string; + getFooterView () : Ti.UI.View; + getHeaderTitle () : string; + getHeaderView () : Ti.UI.View; + getItemAt (itemIndex: number) : ListDataItem; + getItems () : Array; + insertItemsAt (itemIndex: number, dataItems: Array, animation?: ListViewAnimationProperties) : void; + replaceItemsAt (index: number, count: number, dataItems: Array, animation?: ListViewAnimationProperties) : void; + setFooterTitle (footerTitle: string) : void; + setFooterView (footerView: Ti.UI.View) : void; + setHeaderTitle (headerTitle: string) : void; + setHeaderView (headerView: Ti.UI.View) : void; + setItems (dataItems: Array, animation?: ListViewAnimationProperties) : void; + updateItemAt (index: number, dataItem: ListDataItem, animation?: ListViewAnimationProperties) : void; + } + export interface ScrollView extends Ti.UI.View { + canCancelEvents : boolean; + contentHeight : any; + contentOffset : Dictionary; + contentWidth : any; + disableBounce : boolean; + horizontalBounce : boolean; + maxZoomScale : number; + minZoomScale : number; + overScrollMode : number; + scrollIndicatorStyle : number; + scrollType : string; + scrollingEnabled : boolean; + scrollsToTop : boolean; + showHorizontalScrollIndicator : boolean; + showVerticalScrollIndicator : boolean; + verticalBounce : boolean; + zoomScale : number; + getCanCancelEvents () : boolean; + getContentHeight () : any; + getContentOffset () : Dictionary; + getContentWidth () : any; + getDisableBounce () : boolean; + getHorizontalBounce () : boolean; + getMaxZoomScale () : number; + getMinZoomScale () : number; + getOverScrollMode () : number; + getScrollIndicatorStyle () : number; + getScrollType () : string; + getScrollingEnabled () : boolean; + getScrollsToTop () : boolean; + getShowHorizontalScrollIndicator () : boolean; + getShowVerticalScrollIndicator () : boolean; + getVerticalBounce () : boolean; + getZoomScale () : number; + scrollTo (x: number, y: number) : void; + scrollToBottom () : void; + setCanCancelEvents (canCancelEvents: boolean) : void; + setContentHeight (contentHeight: number) : void; + setContentHeight (contentHeight: string) : void; + setContentOffset (contentOffset: Dictionary, animated?: contentOffsetOption) : void; + setContentWidth (contentWidth: number) : void; + setContentWidth (contentWidth: string) : void; + setDisableBounce (disableBounce: boolean) : void; + setHorizontalBounce (horizontalBounce: boolean) : void; + setMaxZoomScale (maxZoomScale: number) : void; + setMinZoomScale (minZoomScale: number) : void; + setOverScrollMode (overScrollMode: number) : void; + setScrollIndicatorStyle (scrollIndicatorStyle: number) : void; + setScrollingEnabled (scrollingEnabled: boolean) : void; + setScrollsToTop (scrollsToTop: boolean) : void; + setShowHorizontalScrollIndicator (showHorizontalScrollIndicator: boolean) : void; + setShowVerticalScrollIndicator (showVerticalScrollIndicator: boolean) : void; + setVerticalBounce (verticalBounce: boolean) : void; + setZoomScale (zoomScale: number, animated?: zoomScaleOption) : void; + } + export interface ListView extends Ti.UI.View { + allowsSelection : boolean; + canScroll : boolean; + caseInsensitiveSearch : boolean; + defaultItemTemplate : any; + editing : boolean; + footerTitle : string; + footerView : Ti.UI.View; + headerTitle : string; + headerView : Ti.UI.View; + keepSectionsInSearch : boolean; + pruneSectionsOnEdit : boolean; + pullView : Ti.UI.View; + scrollIndicatorStyle : number; + searchText : string; + searchView : any; + sectionCount : number; + sectionIndexTitles : Array; + sections : Array; + separatorColor : string; + separatorStyle : number; + showVerticalScrollIndicator : boolean; + style : number; + templates : Dictionary; + willScrollOnStatusTap : boolean; + appendSection (section: Ti.UI.ListSection, animation?: ListViewAnimationProperties) : void; + appendSection (section: Array, animation?: ListViewAnimationProperties) : void; + deleteSectionAt (sectionIndex: number, animation?: ListViewAnimationProperties) : void; + deselectItem (sectionIndex: number, itemIndex: number) : void; + getAllowsSelection () : boolean; + getCanScroll () : boolean; + getCaseInsensitiveSearch () : boolean; + getDefaultItemTemplate () : any; + getEditing () : boolean; + getFooterTitle () : string; + getFooterView () : Ti.UI.View; + getHeaderTitle () : string; + getHeaderView () : Ti.UI.View; + getKeepSectionsInSearch () : boolean; + getPruneSectionsOnEdit () : boolean; + getPullView () : Ti.UI.View; + getScrollIndicatorStyle () : number; + getSearchText () : string; + getSearchView () : Ti.UI.SearchBar; + getSectionCount () : number; + getSectionIndexTitles () : Array; + getSections () : Array; + getSeparatorColor () : string; + getSeparatorStyle () : number; + getShowVerticalScrollIndicator () : boolean; + getStyle () : number; + getTemplates () : Dictionary; + getWillScrollOnStatusTap () : boolean; + insertSectionAt (sectionIndex: number, section: Ti.UI.ListSection, animation?: ListViewAnimationProperties) : void; + insertSectionAt (sectionIndex: number, section: Array, animation?: ListViewAnimationProperties) : void; + replaceSectionAt (sectionIndex: number, section: Ti.UI.ListSection, animation: ListViewAnimationProperties) : void; + scrollToItem (sectionIndex: number, itemIndex: number, animation?: ListViewAnimationProperties) : void; + selectItem (sectionIndex: number, itemIndex: number) : void; + setAllowsSelection (allowsSelection: boolean) : void; + setCanScroll (canScroll: boolean) : void; + setCaseInsensitiveSearch (caseInsensitiveSearch: boolean) : void; + setContentInsets (edgeInsets: ListViewEdgeInsets, animated?: ListViewContentInsetOption) : void; + setDefaultItemTemplate (defaultItemTemplate: string) : void; + setDefaultItemTemplate (defaultItemTemplate: number) : void; + setEditing (editing: boolean) : void; + setFooterTitle (footerTitle: string) : void; + setFooterView (footerView: Ti.UI.View) : void; + setHeaderTitle (headerTitle: string) : void; + setHeaderView (headerView: Ti.UI.View) : void; + setKeepSectionsInSearch (keepSectionsInSearch: boolean) : void; + setMarker (markerProps: ListViewMarkerProps) : void; + setPruneSectionsOnEdit (pruneSectionsOnEdit: boolean) : void; + setPullView (pullView: Ti.UI.View) : void; + setScrollIndicatorStyle (scrollIndicatorStyle: number) : void; + setSearchText (searchText: string) : void; + setSearchView (searchView: Ti.UI.SearchBar) : void; + setSectionIndexTitles (sectionIndexTitles: Array) : void; + setSections (sections: Array) : void; + setSeparatorColor (separatorColor: string) : void; + setSeparatorStyle (separatorStyle: number) : void; + setShowVerticalScrollIndicator (showVerticalScrollIndicator: boolean) : void; + setWillScrollOnStatusTap (willScrollOnStatusTap: boolean) : void; + } + export interface TabGroup extends Ti.UI.View { + activeTab : Ti.UI.Tab; + activeTabBackgroundColor : string; + activeTabBackgroundDisabledColor : string; + activeTabBackgroundDisabledImage : string; + activeTabBackgroundFocusedColor : string; + activeTabBackgroundFocusedImage : string; + activeTabBackgroundImage : string; + activeTabBackgroundSelectedColor : string; + activeTabBackgroundSelectedImage : string; + activeTabIconTint : string; + activity : Ti.Android.Activity; + allowUserCustomization : boolean; + barColor : string; + editButtonTitle : string; + exitOnClose : boolean; + navBarHidden : boolean; + shadowImage : string; + tabDividerColor : string; + tabDividerWidth : any; + tabHeight : any; + tabs : Array; + tabsAtBottom : boolean; + tabsBackgroundColor : string; + tabsBackgroundDisabledColor : string; + tabsBackgroundDisabledImage : string; + tabsBackgroundFocusedColor : string; + tabsBackgroundFocusedImage : string; + tabsBackgroundImage : string; + tabsBackgroundSelectedColor : string; + tabsBackgroundSelectedImage : string; + tabsTintColor : any; + windowSoftInputMode : number; + addTab (tab: Ti.UI.Tab) : void; + close () : void; + getActiveTab () : Ti.UI.Tab; + getActiveTabBackgroundColor () : string; + getActiveTabBackgroundDisabledColor () : string; + getActiveTabBackgroundDisabledImage () : string; + getActiveTabBackgroundFocusedColor () : string; + getActiveTabBackgroundFocusedImage () : string; + getActiveTabBackgroundImage () : string; + getActiveTabBackgroundSelectedColor () : string; + getActiveTabBackgroundSelectedImage () : string; + getActiveTabIconTint () : string; + getActivity () : Ti.Android.Activity; + getAllowUserCustomization () : boolean; + getBarColor () : string; + getEditButtonTitle () : string; + getExitOnClose () : boolean; + getNavBarHidden () : boolean; + getShadowImage () : string; + getTabDividerColor () : string; + getTabDividerWidth () : any; + getTabHeight () : any; + getTabs () : Array; + getTabsAtBottom () : boolean; + getTabsBackgroundColor () : string; + getTabsBackgroundDisabledColor () : string; + getTabsBackgroundDisabledImage () : string; + getTabsBackgroundFocusedColor () : string; + getTabsBackgroundFocusedImage () : string; + getTabsBackgroundImage () : string; + getTabsBackgroundSelectedColor () : string; + getTabsBackgroundSelectedImage () : string; + getTabsTintColor () : string; + getWindowSoftInputMode () : number; + open () : void; + removeTab (tab: Ti.UI.Tab) : void; + setActiveTab (indexOrObject: number) : void; + setActiveTab (indexOrObject: Ti.UI.Tab) : void; + setActiveTabBackgroundColor (activeTabBackgroundColor: string) : void; + setActiveTabBackgroundDisabledColor (activeTabBackgroundDisabledColor: string) : void; + setActiveTabBackgroundDisabledImage (activeTabBackgroundDisabledImage: string) : void; + setActiveTabBackgroundFocusedColor (activeTabBackgroundFocusedColor: string) : void; + setActiveTabBackgroundFocusedImage (activeTabBackgroundFocusedImage: string) : void; + setActiveTabBackgroundImage (activeTabBackgroundImage: string) : void; + setActiveTabBackgroundSelectedColor (activeTabBackgroundSelectedColor: string) : void; + setActiveTabBackgroundSelectedImage (activeTabBackgroundSelectedImage: string) : void; + setActiveTabIconTint (activeTabIconTint: string) : void; + setAllowUserCustomization (allowUserCustomization: boolean) : void; + setBarColor (barColor: string) : void; + setEditButtonTitle (editButtonTitle: string) : void; + setNavBarHidden (navBarHidden: boolean) : void; + setShadowImage (shadowImage: string) : void; + setTabDividerColor (tabDividerColor: string) : void; + setTabDividerWidth (tabDividerWidth: number) : void; + setTabDividerWidth (tabDividerWidth: string) : void; + setTabHeight (tabHeight: number) : void; + setTabHeight (tabHeight: string) : void; + setTabs (tabs: Array) : void; + setTabsAtBottom (tabsAtBottom: boolean) : void; + setTabsBackgroundColor (tabsBackgroundColor: string) : void; + setTabsBackgroundDisabledColor (tabsBackgroundDisabledColor: string) : void; + setTabsBackgroundDisabledImage (tabsBackgroundDisabledImage: string) : void; + setTabsBackgroundFocusedColor (tabsBackgroundFocusedColor: string) : void; + setTabsBackgroundFocusedImage (tabsBackgroundFocusedImage: string) : void; + setTabsBackgroundImage (tabsBackgroundImage: string) : void; + setTabsBackgroundSelectedColor (tabsBackgroundSelectedColor: string) : void; + setTabsBackgroundSelectedImage (tabsBackgroundSelectedImage: string) : void; + setTabsTintColor (tabsTintColor: string) : void; + } + export interface TableView extends Ti.UI.View { + allowsSelection : boolean; + allowsSelectionDuringEditing : boolean; + data : any; + editable : boolean; + editing : boolean; + filterAttribute : string; + filterCaseInsensitive : boolean; + footerTitle : string; + footerView : Ti.UI.View; + headerPullView : Ti.UI.View; + headerTitle : string; + headerView : Ti.UI.View; + hideSearchOnSelection : boolean; + index : Array; + maxRowHeight : number; + minRowHeight : number; + moveable : boolean; + moving : boolean; + overScrollMode : number; + rowHeight : number; + scrollIndicatorStyle : number; + scrollable : boolean; + scrollsToTop : boolean; + search : any; + searchAsChild : boolean; + searchHidden : boolean; + sectionCount : number; + sections : Array; + separatorColor : string; + separatorStyle : number; + showVerticalScrollIndicator : boolean; + style : number; + appendRow (row: Ti.UI.TableViewRow, animation?: TableViewAnimationProperties) : void; + appendRow (row: Dictionary, animation?: TableViewAnimationProperties) : void; + appendRow (row: Array, animation?: TableViewAnimationProperties) : void; + appendRow (row: Array>, animation?: TableViewAnimationProperties) : void; + appendSection (section: Ti.UI.TableViewSection, animation?: TableViewAnimationProperties) : void; + appendSection (section: Dictionary, animation?: TableViewAnimationProperties) : void; + appendSection (section: Array, animation?: TableViewAnimationProperties) : void; + appendSection (section: Array>, animation?: TableViewAnimationProperties) : void; + deleteRow (row: number, animation?: TableViewAnimationProperties) : void; + deleteRow (row: Ti.UI.TableViewRow, animation?: TableViewAnimationProperties) : void; + deleteSection (section: number, animation?: TableViewAnimationProperties) : void; + deselectRow (row: number) : void; + getAllowsSelection () : boolean; + getAllowsSelectionDuringEditing () : boolean; + getData () : any; + getEditable () : boolean; + getEditing () : boolean; + getFilterAttribute () : string; + getFilterCaseInsensitive () : boolean; + getFooterTitle () : string; + getFooterView () : Ti.UI.View; + getHeaderPullView () : Ti.UI.View; + getHeaderTitle () : string; + getHeaderView () : Ti.UI.View; + getHideSearchOnSelection () : boolean; + getIndex () : Array; + getMaxRowHeight () : number; + getMinRowHeight () : number; + getMoveable () : boolean; + getMoving () : boolean; + getOverScrollMode () : number; + getRowHeight () : number; + getScrollIndicatorStyle () : number; + getScrollable () : boolean; + getScrollsToTop () : boolean; + getSearch () : any; + getSearchAsChild () : boolean; + getSearchHidden () : boolean; + getSectionCount () : number; + getSections () : Array; + getSeparatorColor () : string; + getSeparatorStyle () : number; + getShowVerticalScrollIndicator () : boolean; + getStyle () : number; + insertRowAfter (index: number, row: Ti.UI.TableViewRow, animation?: TableViewAnimationProperties) : void; + insertRowAfter (index: number, row: Dictionary, animation?: TableViewAnimationProperties) : void; + insertRowBefore (index: number, row: Ti.UI.TableViewRow, animation?: TableViewAnimationProperties) : void; + insertRowBefore (index: number, row: Dictionary, animation?: TableViewAnimationProperties) : void; + insertSectionAfter (index: number, section: Ti.UI.TableViewSection, animation?: TableViewAnimationProperties) : void; + insertSectionAfter (index: number, section: Dictionary, animation?: TableViewAnimationProperties) : void; + insertSectionBefore (index: number, section: Ti.UI.TableViewSection, animation?: TableViewAnimationProperties) : void; + insertSectionBefore (index: number, section: Dictionary, animation?: TableViewAnimationProperties) : void; + scrollToIndex (index: number, animation?: TableViewAnimationProperties) : void; + scrollToTop (top: number, animation?: TableViewAnimationProperties) : void; + selectRow (row: number) : void; + setAllowsSelection (allowsSelection: boolean) : void; + setAllowsSelectionDuringEditing (allowsSelectionDuringEditing: boolean) : void; + setContentInsets (edgeInsets: TableViewEdgeInsets, animated?: TableViewContentInsetOption) : void; + setData (data: Array, animation: TableViewAnimationProperties) : void; + setData (data: Array>, animation: TableViewAnimationProperties) : void; + setData (data: Array, animation: TableViewAnimationProperties) : void; + setEditable (editable: boolean) : void; + setEditing (editing: boolean) : void; + setFilterAttribute (filterAttribute: string) : void; + setFilterCaseInsensitive (filterCaseInsensitive: boolean) : void; + setFooterTitle (footerTitle: string) : void; + setFooterView (footerView: Ti.UI.View) : void; + setHeaderPullView (view: Ti.UI.View) : void; + setHeaderTitle (headerTitle: string) : void; + setHeaderView (headerView: Ti.UI.View) : void; + setHideSearchOnSelection (hideSearchOnSelection: boolean) : void; + setIndex (index: Array) : void; + setMaxRowHeight (maxRowHeight: number) : void; + setMinRowHeight (minRowHeight: number) : void; + setMoveable (moveable: boolean) : void; + setMoving (moving: boolean) : void; + setOverScrollMode (overScrollMode: number) : void; + setRowHeight (rowHeight: number) : void; + setScrollIndicatorStyle (scrollIndicatorStyle: number) : void; + setScrollable (scrollable: boolean) : void; + setScrollsToTop (scrollsToTop: boolean) : void; + setSearch (search: Ti.UI.SearchBar) : void; + setSearch (search: Ti.UI.Android.SearchView) : void; + setSearchAsChild (searchAsChild: boolean) : void; + setSearchHidden (searchHidden: boolean) : void; + setSections (sections: Array) : void; + setSeparatorColor (separatorColor: string) : void; + setSeparatorStyle (separatorStyle: number) : void; + setShowVerticalScrollIndicator (showVerticalScrollIndicator: boolean) : void; + setStyle (style: number) : void; + updateRow (index: number, row: Ti.UI.TableViewRow, animation: TableViewAnimationProperties) : void; + updateSection (index: number, section: Ti.UI.TableViewSection, animation: TableViewAnimationProperties) : void; + } + export interface Button extends Ti.UI.View { + color : string; + font : Font; + image : any; + selectedColor : string; + style : number; + systemButton : number; + textAlign : any; + title : string; + titleid : string; + verticalAlign : any; + getColor () : string; + getFont () : Font; + getImage () : any; + getSelectedColor () : string; + getStyle () : number; + getSystemButton () : number; + getTextAlign () : any; + getTitle () : string; + getTitleid () : string; + getVerticalAlign () : any; + setColor (color: string) : void; + setFont (font: Font) : void; + setImage (image: string) : void; + setImage (image: Ti.Blob) : void; + setSelectedColor (selectedColor: string) : void; + setStyle (style: number) : void; + setSystemButton (systemButton: number) : void; + setTextAlign (textAlign: string) : void; + setTextAlign (textAlign: number) : void; + setTitle (title: string) : void; + setTitleid (titleid: string) : void; + setVerticalAlign (verticalAlign: number) : void; + setVerticalAlign (verticalAlign: string) : void; + } + export interface OptionDialog extends Ti.Proxy { + androidView : Ti.UI.View; + buttonNames : Array; + cancel : number; + destructive : number; + options : Array; + persistent : boolean; + selectedIndex : number; + title : string; + titleid : string; + getAndroidView () : Ti.UI.View; + getButtonNames () : Array; + getCancel () : number; + getDestructive () : number; + getOptions () : Array; + getPersistent () : boolean; + getSelectedIndex () : number; + getTitle () : string; + getTitleid () : string; + hide (params?: hideParams) : void; + setAndroidView (androidView: Ti.UI.View) : void; + setCancel (cancel: number) : void; + setPersistent (persistent: boolean) : void; + setTitle (title: string) : void; + setTitleid (titleid: string) : void; + show (params?: showParams) : void; + } + export interface ButtonBar extends Ti.UI.View { + index : number; + labels : any; + style : number; + getIndex () : number; + getLabels () : any; + getStyle () : number; + setIndex (index: number) : void; + setLabels (labels: Array) : void; + setLabels (labels: Array) : void; + setStyle (style: number) : void; + } + export interface EmailDialog extends Ti.Proxy { + CANCELLED : number; + FAILED : number; + SAVED : number; + SENT : number; + barColor : string; + bccRecipients : Array; + ccRecipients : Array; + html : boolean; + messageBody : string; + subject : string; + toRecipients : Array; + addAttachment (attachment: Ti.Blob) : void; + addAttachment (attachment: Ti.Filesystem.File) : void; + getBarColor () : string; + getBccRecipients () : Array; + getCcRecipients () : Array; + getHtml () : boolean; + getMessageBody () : string; + getSubject () : string; + getToRecipients () : Array; + isSupported () : boolean; + open (properties: any) : void; + setBarColor (barColor: string) : void; + setBccRecipients (bccRecipients: Array) : void; + setCcRecipients (ccRecipients: Array) : void; + setHtml (html: boolean) : void; + setMessageBody (messageBody: string) : void; + setSubject (subject: string) : void; + setToRecipients (toRecipients: Array) : void; + } + export interface CoverFlowView extends Ti.UI.View { + images : any; + selected : number; + getImages () : any; + getSelected () : number; + setImage (index: number, image: string) : void; + setImage (image: Ti.Blob) : void; + setImage (image: Ti.Filesystem.File) : void; + setImage (index: number, image: CoverFlowImageType) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setSelected (selected: number) : void; + } + export interface ImageView extends Ti.UI.View { + animating : boolean; + autorotate : boolean; + decodeRetries : number; + defaultImage : string; + duration : number; + enableZoomControls : boolean; + hires : boolean; + image : any; + images : any; + paused : boolean; + preventDefaultImage : boolean; + repeatCount : number; + reverse : boolean; + url : string; + getAnimating () : boolean; + getAutorotate () : boolean; + getDecodeRetries () : number; + getDefaultImage () : string; + getDuration () : number; + getEnableZoomControls () : boolean; + getHires () : boolean; + getImage () : any; + getImages () : any; + getPaused () : boolean; + getPreventDefaultImage () : boolean; + getRepeatCount () : number; + getReverse () : boolean; + getUrl () : string; + pause () : void; + resume () : void; + setDecodeRetries (decodeRetries: number) : void; + setDefaultImage (defaultImage: string) : void; + setDuration (duration: number) : void; + setEnableZoomControls (enableZoomControls: boolean) : void; + setHires (hires: boolean) : void; + setImage (image: string) : void; + setImage (image: Ti.Blob) : void; + setImage (image: Ti.Filesystem.File) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setImages (images: Array) : void; + setPreventDefaultImage (preventDefaultImage: boolean) : void; + setRepeatCount (repeatCount: number) : void; + setReverse (reverse: boolean) : void; + setUrl (url: string) : void; + start () : void; + stop () : void; + toBlob () : void; + } + export interface MaskedImage extends Ti.UI.View { + image : string; + mask : string; + mode : number; + tint : string; + getImage () : string; + getMask () : string; + getMode () : number; + getTint () : string; + setImage (image: string) : void; + setMask (mask: string) : void; + setMode (mode: number) : void; + setTint (tint: string) : void; + } + export interface ProgressBar extends Ti.UI.View { + color : string; + font : Font; + max : number; + message : string; + min : number; + style : number; + value : number; + getColor () : string; + getFont () : Font; + getMax () : number; + getMessage () : string; + getMin () : number; + getStyle () : number; + getValue () : number; + setColor (color: string) : void; + setFont (font: Font) : void; + setMax (max: number) : void; + setMessage (message: string) : void; + setMin (min: number) : void; + setStyle (style: number) : void; + setValue (value: number) : void; + } + export module MobileWeb { + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createNavigationGroup (parameters?: Dictionary) : Ti.UI.MobileWeb.NavigationGroup; + export function fireEvent (name: string, event: Dictionary) : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export enum TableViewSeparatorStyle { + NONE, + SINGLE_LINE + } + export interface NavigationGroup extends Ti.UI.View { + navBarAtTop : boolean; + window : Ti.UI.Window; + close (window: Ti.UI.Window, options: Dictionary) : void; + getNavBarAtTop () : boolean; + getWindow () : Ti.UI.Window; + open (window: Ti.UI.Window, options: Dictionary) : void; + setNavBarAtTop (navBarAtTop: boolean) : void; + } + } + export interface Label extends Ti.UI.View { + autoLink : number; + backgroundPaddingBottom : number; + backgroundPaddingLeft : number; + backgroundPaddingRight : number; + backgroundPaddingTop : number; + color : string; + ellipsize : boolean; + font : Font; + highlightedColor : string; + html : string; + minimumFontSize : number; + shadowColor : string; + shadowOffset : any; + text : string; + textAlign : any; + textid : string; + verticalAlign : any; + wordWrap : boolean; + getAutoLink () : number; + getBackgroundPaddingBottom () : number; + getBackgroundPaddingLeft () : number; + getBackgroundPaddingRight () : number; + getBackgroundPaddingTop () : number; + getColor () : string; + getEllipsize () : boolean; + getFont () : Font; + getHighlightedColor () : string; + getHtml () : string; + getMinimumFontSize () : number; + getShadowColor () : string; + getShadowOffset () : any; + getText () : string; + getTextAlign () : any; + getTextid () : string; + getVerticalAlign () : any; + getWordWrap () : boolean; + setAutoLink (autoLink: number) : void; + setBackgroundPaddingBottom (backgroundPaddingBottom: number) : void; + setBackgroundPaddingLeft (backgroundPaddingLeft: number) : void; + setBackgroundPaddingRight (backgroundPaddingRight: number) : void; + setBackgroundPaddingTop (backgroundPaddingTop: number) : void; + setColor (color: string) : void; + setEllipsize (ellipsize: boolean) : void; + setFont (font: Font) : void; + setHighlightedColor (highlightedColor: string) : void; + setHtml (html: string) : void; + setMinimumFontSize (minimumFontSize: number) : void; + setShadowColor (shadowColor: string) : void; + setShadowOffset (shadowOffset: any) : void; + setText (text: string) : void; + setTextAlign (textAlign: string) : void; + setTextAlign (textAlign: number) : void; + setTextid (textid: string) : void; + setVerticalAlign (verticalAlign: number) : void; + setVerticalAlign (verticalAlign: string) : void; + setWordWrap (wordWrap: boolean) : void; + } + export interface SearchBar extends Ti.UI.View { + autocapitalization : number; + autocorrect : boolean; + barColor : string; + hintText : string; + hinttextid : string; + keyboardType : number; + prompt : string; + promptid : string; + showBookmark : boolean; + showCancel : boolean; + value : string; + blur () : void; + focus () : void; + getAutocapitalization () : number; + getAutocorrect () : boolean; + getBarColor () : string; + getHintText () : string; + getHinttextid () : string; + getKeyboardType () : number; + getPrompt () : string; + getPromptid () : string; + getShowBookmark () : boolean; + getShowCancel () : boolean; + getValue () : string; + setAutocapitalization (autocapitalization: number) : void; + setAutocorrect (autocorrect: boolean) : void; + setBarColor (barColor: string) : void; + setHintText (hintText: string) : void; + setHinttextid (hinttextid: string) : void; + setKeyboardType (keyboardType: number) : void; + setPrompt (prompt: string) : void; + setPromptid (promptid: string) : void; + setShowBookmark (showBookmark: boolean) : void; + setShowCancel (showCancel: boolean, animated?: Dictionary) : void; + setValue (value: string) : void; + } + export interface SMSDialog extends Ti.Proxy { + CANCELLED : number; + FAILED : number; + SENT : number; + messageBody : string; + toRecipients : Array; + getMessageBody () : string; + getToRecipients () : Array; + isSupported () : boolean; + open () : void; + setMessageBody (messageBody: string) : void; + setToRecipients (toRecipients: Array) : void; + } + export interface TableViewSection extends Ti.Proxy { + footerTitle : string; + footerView : Ti.UI.View; + headerTitle : string; + headerView : Ti.UI.View; + rowCount : number; + rows : Array; + add (row: Ti.UI.TableViewRow) : void; + getFooterTitle () : string; + getFooterView () : Ti.UI.View; + getHeaderTitle () : string; + getHeaderView () : Ti.UI.View; + getRowCount () : number; + getRows () : Array; + remove (row: Ti.UI.TableViewRow) : void; + rowAtIndex (index: number) : Ti.UI.TableViewRow; + setFooterTitle (footerTitle: string) : void; + setFooterView (footerView: Ti.UI.View) : void; + setHeaderTitle (headerTitle: string) : void; + setHeaderView (headerView: Ti.UI.View) : void; + } + export interface ActivityIndicator extends Ti.Proxy { + bottom : any; + color : string; + font : Font; + height : string; + indicatorColor : string; + indicatorDiameter : string; + left : any; + message : string; + messageid : string; + right : any; + style : number; + top : any; + width : string; + add () : void; + getBottom () : any; + getColor () : string; + getFont () : Font; + getHeight () : string; + getIndicatorColor () : string; + getIndicatorDiameter () : string; + getLeft () : any; + getMessage () : string; + getMessageid () : string; + getRight () : any; + getStyle () : number; + getTop () : any; + getWidth () : string; + hide () : void; + remove () : void; + setBottom (bottom: number) : void; + setBottom (bottom: string) : void; + setColor (color: string) : void; + setFont (font: Font) : void; + setHeight (height: string) : void; + setIndicatorColor (indicatorColor: string) : void; + setIndicatorDiameter (indicatorDiameter: string) : void; + setLeft (left: number) : void; + setLeft (left: string) : void; + setMessage (message: string) : void; + setMessageid (messageid: string) : void; + setRight (right: number) : void; + setRight (right: string) : void; + setStyle (style: number) : void; + setTop (top: number) : void; + setTop (top: string) : void; + setWidth (width: string) : void; + show () : void; + } + export interface Animation extends Ti.Proxy { + anchorPoint : Point; + autoreverse : boolean; + backgroundColor : string; + bottom : number; + center : any; + color : string; + curve : number; + delay : number; + duration : number; + height : number; + left : number; + opacity : number; + opaque : boolean; + repeat : number; + right : number; + top : number; + transform : any; + transition : number; + view : Ti.UI.View; + visible : boolean; + width : number; + zIndex : number; + getAnchorPoint () : Point; + getAutoreverse () : boolean; + getBackgroundColor () : string; + getBottom () : number; + getCenter () : any; + getColor () : string; + getCurve () : number; + getDelay () : number; + getDuration () : number; + getHeight () : number; + getLeft () : number; + getOpacity () : number; + getOpaque () : boolean; + getRepeat () : number; + getRight () : number; + getTop () : number; + getTransform () : any; + getTransition () : number; + getView () : Ti.UI.View; + getVisible () : boolean; + getWidth () : number; + getZIndex () : number; + setAnchorPoint (anchorPoint: Point) : void; + setAutoreverse (autoreverse: boolean) : void; + setBackgroundColor (backgroundColor: string) : void; + setBottom (bottom: number) : void; + setCenter (center: any) : void; + setColor (color: string) : void; + setCurve (curve: number) : void; + setDelay (delay: number) : void; + setDuration (duration: number) : void; + setHeight (height: number) : void; + setLeft (left: number) : void; + setOpacity (opacity: number) : void; + setOpaque (opaque: boolean) : void; + setRepeat (repeat: number) : void; + setRight (right: number) : void; + setTop (top: number) : void; + setTransform (transform: Ti.UI._2DMatrix) : void; + setTransform (transform: Ti.UI._3DMatrix) : void; + setTransition (transition: number) : void; + setView (view: Ti.UI.View) : void; + setVisible (visible: boolean) : void; + setWidth (width: number) : void; + setZIndex (zIndex: number) : void; + } + export interface Toolbar extends Ti.UI.View { + barColor : string; + borderBottom : boolean; + borderTop : boolean; + items : Array; + translucent : boolean; + getBarColor () : string; + getBorderBottom () : boolean; + getBorderTop () : boolean; + getItems () : Array; + getTranslucent () : boolean; + setBarColor (barColor: string) : void; + setBorderBottom (borderBottom: boolean) : void; + setBorderTop (borderTop: boolean) : void; + setItems (items: Array) : void; + setTranslucent (translucent: boolean) : void; + } + export interface Notification extends Ti.UI.View { + duration : number; + horizontalMargin : number; + message : string; + verticalMargin : number; + xOffset : number; + yOffset : number; + getDuration () : number; + getHorizontalMargin () : number; + getMessage () : string; + getVerticalMargin () : number; + getXOffset () : number; + getYOffset () : number; + setDuration (duration: number) : void; + setHorizontalMargin (horizontalMargin: number) : void; + setMessage (message: string) : void; + setVerticalMargin (verticalMargin: number) : void; + setXOffset (xOffset: number) : void; + setYOffset (yOffset: number) : void; + } + export interface PickerColumn extends Ti.UI.View { + rowCount : number; + rows : Array; + selectedRow : Ti.UI.PickerRow; + addRow (row: Ti.UI.PickerRow) : void; + getRowCount () : number; + getRows () : Array; + getSelectedRow () : Ti.UI.PickerRow; + removeRow (row: Ti.UI.PickerRow) : void; + setSelectedRow (selectedRow: Ti.UI.PickerRow) : void; + } + export interface Picker extends Ti.Proxy { + calendarViewShown : boolean; + columns : Array; + countDownDuration : number; + format24 : boolean; + locale : string; + maxDate : Date; + minDate : Date; + minuteInterval : number; + selectionIndicator : boolean; + type : number; + useSpinner : boolean; + value : Date; + visibleItems : number; + add (data: Array) : void; + add (data: Ti.UI.PickerRow) : void; + add (data: Array) : void; + add (data: Ti.UI.PickerColumn) : void; + getCalendarViewShown () : boolean; + getColumns () : Array; + getCountDownDuration () : number; + getFormat24 () : boolean; + getLocale () : string; + getMaxDate () : Date; + getMinDate () : Date; + getMinuteInterval () : number; + getSelectedRow (index: number) : Ti.UI.PickerRow; + getSelectionIndicator () : boolean; + getType () : number; + getUseSpinner () : boolean; + getValue () : Date; + getVisibleItems () : number; + reloadColumn (column: Ti.UI.PickerColumn) : void; + setCalendarViewShown (calendarViewShown: boolean) : void; + setColumns (columns: Array) : void; + setCountDownDuration (countDownDuration: number) : void; + setFormat24 (format24: boolean) : void; + setLocale (locale: string) : void; + setMaxDate (maxDate: Date) : void; + setMinDate (minDate: Date) : void; + setMinuteInterval (minuteInterval: number) : void; + setSelectedRow (column: number, row: number, animated?: boolean) : void; + setSelectionIndicator (selectionIndicator: boolean) : void; + setType (type: number) : void; + setUseSpinner (useSpinner: boolean) : void; + setValue (date: any, suppressEvent: boolean) : Ti.UI.PickerRow; + setVisibleItems (visibleItems: number) : void; + showDatePickerDialog (dictObj: any) : void; + showTimePickerDialog (dictObj: any) : void; + } + } + export enum Module { + + } + export interface API { + debug (message: Array) : void; + debug (message: string) : void; + error (message: Array) : void; + error (message: string) : void; + info (message: Array) : void; + info (message: string) : void; + log (level: string, message: Array) : void; + log (level: string, message: string) : void; + timestamp (message: Array) : void; + timestamp (message: string) : void; + trace (message: Array) : void; + trace (message: string) : void; + warn (message: Array) : void; + warn (message: string) : void; + } + export module Geolocation { + export var ACCURACY_BEST : number; + export var ACCURACY_BEST_FOR_NAVIGATION : number; + export var ACCURACY_HIGH : number; + export var ACCURACY_HUNDRED_METERS : number; + export var ACCURACY_KILOMETER : number; + export var ACCURACY_LOW : number; + export var ACCURACY_NEAREST_TEN_METERS : number; + export var ACCURACY_THREE_KILOMETERS : number; + export var ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION : string; + export var ACTIVITYTYPE_FITNESS : string; + export var ACTIVITYTYPE_OTHER : string; + export var ACTIVITYTYPE_OTHER_NAVIGATION : string; + export var AUTHORIZATION_AUTHORIZED : number; + export var AUTHORIZATION_DENIED : number; + export var AUTHORIZATION_RESTRICTED : number; + export var AUTHORIZATION_UNKNOWN : number; + export var ERROR_DENIED : number; + export var ERROR_HEADING_FAILURE : number; + export var ERROR_LOCATION_UNKNOWN : number; + export var ERROR_NETWORK : number; + export var ERROR_REGION_MONITORING_DELAYED : number; + export var ERROR_REGION_MONITORING_DENIED : number; + export var ERROR_REGION_MONITORING_FAILURE : number; + export var ERROR_TIMEOUT : number; + export var PROVIDER_GPS : string; + export var PROVIDER_NETWORK : string; + export var PROVIDER_PASSIVE : string; + export var accuracy : number; + export var activityType : number; + export var bubbleParent : boolean; + export var distanceFilter : number; + export var frequency : number; + export var hasCompass : boolean; + export var headingFilter : number; + export var lastGeolocation : string; + export var locationServicesAuthorization : number; + export var locationServicesEnabled : boolean; + export var pauseLocationUpdateAutomatically : boolean; + export var preferredProvider : string; + export var purpose : string; + export var showCalibration : boolean; + export var trackSignificantLocationChange : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function forwardGeocoder (address: string, callback: (...args : any[]) => any) : void; + export function getAccuracy () : number; + export function getActivityType () : number; + export function getBubbleParent () : boolean; + export function getCurrentHeading (callback: (...args : any[]) => any) : void; + export function getCurrentPosition (callback: (...args : any[]) => any) : void; + export function getDistanceFilter () : number; + export function getFrequency () : number; + export function getHasCompass () : boolean; + export function getHeadingFilter () : number; + export function getLastGeolocation () : string; + export function getLocationServicesAuthorization () : number; + export function getLocationServicesEnabled () : boolean; + export function getPauseLocationUpdateAutomatically () : boolean; + export function getPreferredProvider () : string; + export function getPurpose () : string; + export function getShowCalibration () : boolean; + export function getTrackSignificantLocationChange () : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function reverseGeocoder (latitude: number, longitude: number, callback: (...args : any[]) => any) : void; + export function setAccuracy (accuracy: number) : void; + export function setActivityType (activityType: number) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setDistanceFilter (distanceFilter: number) : void; + export function setFrequency (frequency: number) : void; + export function setHeadingFilter (headingFilter: number) : void; + export function setLocationServicesAuthorization (locationServicesAuthorization: number) : void; + export function setPauseLocationUpdateAutomatically (pauseLocationUpdateAutomatically: boolean) : void; + export function setPreferredProvider (preferredProvider: string) : void; + export function setPurpose (purpose: string) : void; + export function setShowCalibration (showCalibration: boolean) : void; + export function setTrackSignificantLocationChange (trackSignificantLocationChange: boolean) : void; + export module Android { + export var bubbleParent : boolean; + export var manualMode : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function addLocationProvider (provider: Ti.Geolocation.Android.LocationProvider) : void; + export function addLocationRule (rule: Ti.Geolocation.Android.LocationRule) : void; + export function applyProperties (props: Dictionary) : void; + export function createLocationProvider (parameters?: Dictionary) : Ti.Geolocation.Android.LocationProvider; + export function createLocationRule (parameters?: Dictionary) : Ti.Geolocation.Android.LocationRule; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function getManualMode () : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function removeLocationProvider (provider: Ti.Geolocation.Android.LocationProvider) : void; + export function removeLocationRule (rule: Ti.Geolocation.Android.LocationRule) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setManualMode (manualMode: boolean) : void; + export interface LocationProvider extends Ti.Proxy { + minUpdateDistance : number; + minUpdateTime : number; + name : string; + getMinUpdateDistance () : number; + getMinUpdateTime () : number; + getName () : string; + setMinUpdateDistance (minUpdateDistance: number) : void; + setMinUpdateTime (minUpdateTime: number) : void; + setName (name: string) : void; + } + export interface LocationRule extends Ti.Proxy { + accuracy : number; + maxAge : number; + minAge : number; + name : string; + getAccuracy () : number; + getMaxAge () : number; + getMinAge () : number; + getName () : string; + setAccuracy (accuracy: number) : void; + setMaxAge (maxAge: number) : void; + setMinAge (minAge: number) : void; + setName (name: string) : void; + } + } + export interface MobileWeb { + forwardGeocoderTimeout : number; + locationTimeout : number; + maximumHeadingAge : number; + maximumLocationAge : number; + reverseGeocoderTimeout : number; + getForwardGeocoderTimeout () : number; + getLocationTimeout () : number; + getMaximumHeadingAge () : number; + getMaximumLocationAge () : number; + getReverseGeocoderTimeout () : number; + setForwardGeocoderTimeout (forwardGeocoderTimeout: number) : void; + setLocationTimeout (locationTimeout: number) : void; + setMaximumHeadingAge (maximumHeadingAge: number) : void; + setMaximumLocationAge (maximumLocationAge: number) : void; + setReverseGeocoderTimeout (reverseGeocoderTimeout: number) : void; + } + } + export interface Proxy { + bubbleParent : boolean; + addEventListener (name: string, callback: (...args : any[]) => any) : void; + applyProperties (props: Dictionary) : void; + fireEvent (name: string, event: Dictionary) : void; + getBubbleParent () : boolean; + removeEventListener (name: string, callback: (...args : any[]) => any) : void; + setBubbleParent (bubbleParent: boolean) : void; + } + export module Cloud { + export var accessToken : string; + export var bubbleParent : boolean; + export var debug : boolean; + export var expiresIn : number; + export var ondatastream : (...args : any[]) => any; + export var onsendstream : (...args : any[]) => any; + export var sessionId : string; + export var useSecure : boolean; + export function applyProperties (props: Dictionary) : void; + export function getAccessToken () : string; + export function getBubbleParent () : boolean; + export function getDebug () : boolean; + export function getExpiresIn () : number; + export function getOndatastream () : (...args : any[]) => any; + export function getOnsendstream () : (...args : any[]) => any; + export function getSessionId () : string; + export function getUseSecure () : boolean; + export function hasStoredSession () : boolean; + export function retrieveStoredSession () : string; + export function setAccessToken (accessToken: string) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setDebug (debug: boolean) : void; + export function setOndatastream (ondatastream: (...args : any[]) => any) : void; + export function setOnsendstream (onsendstream: (...args : any[]) => any) : void; + export function setSessionId (sessionId: string) : void; + export function setUseSecure (useSecure: boolean) : void; + export interface Objects { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Files { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface SocialIntegrations { + externalAccountLink (parameters: Dictionary, callback: (...args : any[]) => any) : void; + externalAccountLogin (parameters: Dictionary, callback: (...args : any[]) => any) : void; + externalAccountUnlink (parameters: Dictionary, callback: (...args : any[]) => any) : void; + searchFacebookFriends (callback: (...args : any[]) => any) : void; + } + export interface PushNotifications { + notify (parameters: Dictionary, callback: (...args : any[]) => any) : void; + notifyTokens (parameters: Dictionary, callback: (...args : any[]) => any) : void; + subscribe (parameters: Dictionary, callback: (...args : any[]) => any) : void; + subscribeToken (parameters: Dictionary, callback: (...args : any[]) => any) : void; + unsubscribe (parameters: Dictionary, callback: (...args : any[]) => any) : void; + unsubscribeToken (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Clients { + geolocate (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + } + export interface ACLs { + addUser (parameters: Dictionary, callback: (...args : any[]) => any) : void; + checkUser (parameters: Dictionary, callback: (...args : any[]) => any) : void; + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + removeUser (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + } + export interface Users { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + login (parameters: Dictionary, callback: (...args : any[]) => any) : void; + logout (callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + requestResetPassword (parameters: Dictionary, callback: (...args : any[]) => any) : void; + search (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + secureCreate (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + secureLogin (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + secureStatus () : boolean; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showMe (callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Messages { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + removeThread (parameters: Dictionary, callback: (...args : any[]) => any) : void; + reply (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showInbox (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showSent (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showThread (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showThreads (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Events { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + queryOccurrences (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + search (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + searchOccurrences (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + show (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + showOccurrences (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Reviews { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters: Dictionary, callback: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Chats { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + getChatGroups (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + query (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface KeyValues { + append (parameters: Dictionary, callback: (...args : any[]) => any) : void; + get (parameters: Dictionary, callback: (...args : any[]) => any) : void; + increment (parameters: Dictionary, callback: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + set (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Checkins { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Friends { + add (parameters: Dictionary, callback: (...args : any[]) => any) : void; + approve (parameters: Dictionary, callback: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + requests (parameters: Dictionary, callback: (...args : any[]) => any) : void; + search (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Photos { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + search (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Statuses { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + search (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface PhotoCollections { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + search (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showPhotos (parameters: Dictionary, callback: (...args : any[]) => any) : void; + showSubCollections (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Posts { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Emails { + send (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + export interface Places { + create (parameters: Dictionary, callback: (...args : any[]) => any) : void; + query (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + remove (parameters: Dictionary, callback: (...args : any[]) => any) : void; + search (parameters?: Dictionary, callback?: (...args : any[]) => any) : void; + show (parameters: Dictionary, callback: (...args : any[]) => any) : void; + update (parameters: Dictionary, callback: (...args : any[]) => any) : void; + } + } + export interface Blob extends Ti.Proxy { + file : Ti.Filesystem.File; + height : number; + length : number; + mimeType : string; + nativePath : string; + size : number; + text : string; + width : number; + append (blob: Ti.Blob) : void; + getFile () : Ti.Filesystem.File; + getHeight () : number; + getLength () : number; + getMimeType () : string; + getNativePath () : string; + getSize () : number; + getText () : string; + getWidth () : number; + imageAsCropped (options: Dictionary) : Ti.Blob; + imageAsResized (width: number, height: number) : Ti.Blob; + imageAsThumbnail (size: number, borderSize?: number, cornerRadius?: number) : Ti.Blob; + imageWithAlpha () : Ti.Blob; + imageWithRoundedCorner (cornerSize: number, borderSize?: number) : Ti.Blob; + imageWithTransparentBorder (size: number) : Ti.Blob; + toString () : string; + } + export interface Codec { + BIG_ENDIAN : number; + CHARSET_ASCII : string; + CHARSET_ISO_LATIN_1 : string; + CHARSET_UTF16 : string; + CHARSET_UTF16BE : string; + CHARSET_UTF16LE : string; + CHARSET_UTF8 : string; + LITTLE_ENDIAN : number; + TYPE_BYTE : string; + TYPE_DOUBLE : string; + TYPE_FLOAT : string; + TYPE_INT : string; + TYPE_LONG : string; + TYPE_SHORT : string; + decodeNumber (options: DecodeNumberDict) : number; + decodeString (options: DecodeStringDict) : string; + encodeNumber (options: EncodeNumberDict) : number; + encodeString (options: Dictionary) : number; + getNativeByteOrder () : number; + } + export interface Locale { + currentCountry : string; + currentLanguage : string; + currentLocale : string; + formatTelephoneNumber (number: string) : string; + getCurrencyCode (locale: string) : string; + getCurrencySymbol (currencyCode: string) : string; + getCurrentCountry () : string; + getCurrentLanguage () : string; + getCurrentLocale () : string; + getLocaleCurrencySymbol (locale: string) : string; + getString (key: string, hint?: string) : string; + } + export module App { + export var EVENT_ACCESSIBILITY_ANNOUNCEMENT : string; + export var EVENT_ACCESSIBILITY_CHANGED : string; + export var accessibilityEnabled : boolean; + export var analytics : boolean; + export var bubbleParent : boolean; + export var copyright : string; + export var deployType : string; + export var description : string; + export var disableNetworkActivityIndicator : boolean; + export var guid : string; + export var id : string; + export var idleTimerDisabled : boolean; + export var installId : string; + export var keyboardVisible : boolean; + export var name : string; + export var proximityDetection : boolean; + export var proximityState : boolean; + export var publisher : string; + export var sessionId : string; + export var url : string; + export var version : string; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function fireSystemEvent (eventName: string, param?: any) : void; + export function getAccessibilityEnabled () : boolean; + export function getAnalytics () : boolean; + export function getArguments () : launchOptions; + export function getBubbleParent () : boolean; + export function getCopyright () : string; + export function getDeployType () : string; + export function getDescription () : string; + export function getDisableNetworkActivityIndicator () : boolean; + export function getGuid () : string; + export function getId () : string; + export function getIdleTimerDisabled () : boolean; + export function getInstallId () : string; + export function getKeyboardVisible () : boolean; + export function getName () : string; + export function getProximityDetection () : boolean; + export function getProximityState () : boolean; + export function getPublisher () : string; + export function getSessionId () : string; + export function getUrl () : string; + export function getVersion () : string; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setDisableNetworkActivityIndicator (disableNetworkActivityIndicator: boolean) : void; + export function setIdleTimerDisabled (idleTimerDisabled: boolean) : void; + export function setProximityDetection (proximityDetection: boolean) : void; + export enum Android { + R + } + export module iOS { + export var EVENT_ACCESSIBILITY_LAYOUT_CHANGED : string; + export var EVENT_ACCESSIBILITY_SCREEN_CHANGED : string; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function cancelAllLocalNotifications () : void; + export function cancelLocalNotification (id: number) : void; + export function createLocalNotification (parameters?: Dictionary) : Ti.App.iOS.LocalNotification; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function registerBackgroundService (params: Dictionary) : Ti.App.iOS.BackgroundService; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function scheduleLocalNotification (params: Dictionary) : Ti.App.iOS.LocalNotification; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface LocalNotification extends Ti.Proxy { + cancel () : void; + } + export interface BackgroundService extends Ti.Proxy { + url : string; + getUrl () : string; + stop () : void; + unregister () : void; + } + } + export interface Properties { + getBool (property: string, _default?: boolean) : boolean; + getDouble (property: string, _default?: number) : number; + getInt (property: string, _default?: number) : number; + getList (property: string, _default?: Array) : Array; + getObject (property: string, _default?: any) : any; + getString (property: string, _default?: string) : string; + hasProperty (property: string) : boolean; + listProperties () : Array; + removeProperty (property: string) : void; + setBool (property: string, value: boolean) : void; + setDouble (property: string, value: number) : void; + setInt (property: string, value: number) : void; + setList (property: string, value: Array) : void; + setObject (property: string, value: any) : void; + setString (property: string, value: string) : void; + } + export interface Tizen { + categories : Array; + iconPath : string; + id : string; + installDate : Date; + name : string; + show : boolean; + size : number; + exit () : void; + getCategories () : Array; + getIconPath () : string; + getId () : string; + getInstallDate () : Date; + getName () : string; + getShow () : boolean; + getSize () : number; + hide () : void; + } + } + export module Android { + export var ACTION_AIRPLANE_MODE_CHANGED : string; + export var ACTION_ALL_APPS : string; + export var ACTION_ANSWER : string; + export var ACTION_ATTACH_DATA : string; + export var ACTION_BATTERY_CHANGED : string; + export var ACTION_BATTERY_LOW : string; + export var ACTION_BATTERY_OKAY : string; + export var ACTION_BOOT_COMPLETED : string; + export var ACTION_BUG_REPORT : string; + export var ACTION_CALL : string; + export var ACTION_CALL_BUTTON : string; + export var ACTION_CAMERA_BUTTON : string; + export var ACTION_CHOOSER : string; + export var ACTION_CLOSE_SYSTEM_DIALOGS : string; + export var ACTION_CONFIGURATION_CHANGED : string; + export var ACTION_CREATE_SHORTCUT : string; + export var ACTION_DATE_CHANGED : string; + export var ACTION_DEFAULT : string; + export var ACTION_DELETE : string; + export var ACTION_DEVICE_STORAGE_LOW : string; + export var ACTION_DIAL : string; + export var ACTION_EDIT : string; + export var ACTION_GET_CONTENT : string; + export var ACTION_GTALK_SERVICE_CONNECTED : string; + export var ACTION_GTALK_SERVICE_DISCONNECTED : string; + export var ACTION_HEADSET_PLUG : string; + export var ACTION_INPUT_METHOD_CHANGED : string; + export var ACTION_INSERT : string; + export var ACTION_INSERT_OR_EDIT : string; + export var ACTION_MAIN : string; + export var ACTION_MANAGE_PACKAGE_STORAGE : string; + export var ACTION_MEDIA_BAD_REMOVAL : string; + export var ACTION_MEDIA_BUTTON : string; + export var ACTION_MEDIA_CHECKING : string; + export var ACTION_MEDIA_EJECT : string; + export var ACTION_MEDIA_MOUNTED : string; + export var ACTION_MEDIA_NOFS : string; + export var ACTION_MEDIA_REMOVED : string; + export var ACTION_MEDIA_SCANNER_FINISHED : string; + export var ACTION_MEDIA_SCANNER_SCAN_FILE : string; + export var ACTION_MEDIA_SCANNER_STARTED : string; + export var ACTION_MEDIA_SHARED : string; + export var ACTION_MEDIA_UNMOUNTABLE : string; + export var ACTION_MEDIA_UNMOUNTED : string; + export var ACTION_NEW_OUTGOING_CALL : string; + export var ACTION_PACKAGE_ADDED : string; + export var ACTION_PACKAGE_CHANGED : string; + export var ACTION_PACKAGE_DATA_CLEARED : string; + export var ACTION_PACKAGE_INSTALL : string; + export var ACTION_PACKAGE_REMOVED : string; + export var ACTION_PACKAGE_REPLACED : string; + export var ACTION_PACKAGE_RESTARTED : string; + export var ACTION_PICK : string; + export var ACTION_PICK_ACTIVITY : string; + export var ACTION_POWER_CONNECTED : string; + export var ACTION_POWER_DISCONNECTED : string; + export var ACTION_POWER_USAGE_SUMMARY : string; + export var ACTION_PROVIDER_CHANGED : string; + export var ACTION_REBOOT : string; + export var ACTION_RUN : string; + export var ACTION_SCREEN_OFF : string; + export var ACTION_SCREEN_ON : string; + export var ACTION_SEARCH : string; + export var ACTION_SEARCH_LONG_PRESS : string; + export var ACTION_SEND : string; + export var ACTION_SENDTO : string; + export var ACTION_SEND_MULTIPLE : string; + export var ACTION_SET_WALLPAPER : string; + export var ACTION_SHUTDOWN : string; + export var ACTION_SYNC : string; + export var ACTION_SYSTEM_TUTORIAL : string; + export var ACTION_TIME_CHANGED : string; + export var ACTION_TIME_TICK : string; + export var ACTION_UID_REMOVED : string; + export var ACTION_UMS_CONNECTED : string; + export var ACTION_UMS_DISCONNECTED : string; + export var ACTION_USER_PRESENT : string; + export var ACTION_VIEW : string; + export var ACTION_VOICE_COMMAND : string; + export var ACTION_WALLPAPER_CHANGED : string; + export var ACTION_WEB_SEARCH : string; + export var CATEGORY_ALTERNATIVE : string; + export var CATEGORY_BROWSABLE : string; + export var CATEGORY_DEFAULT : string; + export var CATEGORY_DEVELOPMENT_PREFERENCE : string; + export var CATEGORY_EMBED : string; + export var CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST : string; + export var CATEGORY_HOME : string; + export var CATEGORY_INFO : string; + export var CATEGORY_LAUNCHER : string; + export var CATEGORY_MONKEY : string; + export var CATEGORY_OPENABLE : string; + export var CATEGORY_PREFERENCE : string; + export var CATEGORY_SAMPLE_CODE : string; + export var CATEGORY_SELECTED_ALTERNATIVE : string; + export var CATEGORY_TAB : string; + export var CATEGORY_TEST : string; + export var CATEGORY_UNIT_TEST : string; + export var DEFAULT_ALL : number; + export var DEFAULT_LIGHTS : number; + export var DEFAULT_SOUND : number; + export var DEFAULT_VIBRATE : number; + export var EXTRA_ALARM_COUNT : string; + export var EXTRA_BCC : string; + export var EXTRA_CC : string; + export var EXTRA_DATA_REMOVED : string; + export var EXTRA_DONT_KILL_APP : string; + export var EXTRA_EMAIL : string; + export var EXTRA_INTENT : string; + export var EXTRA_KEY_EVENT : string; + export var EXTRA_PHONE_NUMBER : string; + export var EXTRA_REPLACING : string; + export var EXTRA_SHORTCUT_ICON : string; + export var EXTRA_SHORTCUT_ICON_RESOURCE : string; + export var EXTRA_SHORTCUT_INTENT : string; + export var EXTRA_SHORTCUT_NAME : string; + export var EXTRA_STREAM : string; + export var EXTRA_SUBJECT : string; + export var EXTRA_TEMPLATE : string; + export var EXTRA_TEXT : string; + export var EXTRA_TITLE : string; + export var EXTRA_UID : string; + export var FILL_IN_ACTION : number; + export var FILL_IN_CATEGORIES : number; + export var FILL_IN_COMPONENT : number; + export var FILL_IN_DATA : number; + export var FILL_IN_PACKAGE : number; + export var FLAG_ACTIVITY_BROUGHT_TO_FRONT : number; + export var FLAG_ACTIVITY_CLEAR_TOP : number; + export var FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET : number; + export var FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS : number; + export var FLAG_ACTIVITY_FORWARD_RESULT : number; + export var FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY : number; + export var FLAG_ACTIVITY_MULTIPLE_TASK : number; + export var FLAG_ACTIVITY_NEW_TASK : number; + export var FLAG_ACTIVITY_NO_ANIMATION : number; + export var FLAG_ACTIVITY_NO_HISTORY : number; + export var FLAG_ACTIVITY_NO_USER_ACTION : number; + export var FLAG_ACTIVITY_PREVIOUS_IS_TOP : number; + export var FLAG_ACTIVITY_REORDER_TO_FRONT : number; + export var FLAG_ACTIVITY_RESET_TASK_IF_NEEDED : number; + export var FLAG_ACTIVITY_SINGLE_TOP : number; + export var FLAG_AUTO_CANCEL : number; + export var FLAG_CANCEL_CURRENT : number; + export var FLAG_DEBUG_LOG_RESOLUTION : number; + export var FLAG_FROM_BACKGROUND : number; + export var FLAG_GRANT_READ_URI_PERMISSION : number; + export var FLAG_GRANT_WRITE_URI_PERMISSION : number; + export var FLAG_INSISTENT : number; + export var FLAG_NO_CLEAR : number; + export var FLAG_NO_CREATE : number; + export var FLAG_ONE_SHOT : number; + export var FLAG_ONGOING_EVENT : number; + export var FLAG_ONLY_ALERT_ONCE : number; + export var FLAG_RECEIVER_REGISTERED_ONLY : number; + export var FLAG_SHOW_LIGHTS : number; + export var FLAG_UPDATE_CURRENT : number; + export var NAVIGATION_MODE_STANDARD : number; + export var NAVIGATION_MODE_TABS : number; + export var PENDING_INTENT_FOR_ACTIVITY : number; + export var PENDING_INTENT_FOR_BROADCAST : number; + export var PENDING_INTENT_FOR_SERVICE : number; + export var PENDING_INTENT_MAX_VALUE : number; + export var R : Ti.Android.R; + export var RESULT_CANCELED : number; + export var RESULT_FIRST_USER : number; + export var RESULT_OK : number; + export var SCREEN_ORIENTATION_BEHIND : number; + export var SCREEN_ORIENTATION_LANDSCAPE : number; + export var SCREEN_ORIENTATION_NOSENSOR : number; + export var SCREEN_ORIENTATION_PORTRAIT : number; + export var SCREEN_ORIENTATION_SENSOR : number; + export var SCREEN_ORIENTATION_UNSPECIFIED : number; + export var SCREEN_ORIENTATION_USER : number; + export var SHOW_AS_ACTION_ALWAYS : number; + export var SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW : number; + export var SHOW_AS_ACTION_IF_ROOM : number; + export var SHOW_AS_ACTION_NEVER : number; + export var SHOW_AS_ACTION_WITH_TEXT : number; + export var START_NOT_STICKY : number; + export var START_REDELIVER_INTENT : number; + export var STREAM_ALARM : number; + export var STREAM_DEFAULT : number; + export var STREAM_MUSIC : number; + export var STREAM_NOTIFICATION : number; + export var STREAM_RING : number; + export var STREAM_SYSTEM : number; + export var STREAM_VOICE_CALL : number; + export var URI_INTENT_SCHEME : number; + export var bubbleParent : boolean; + export var currentActivity : Ti.Android.Activity; + export var currentService : Ti.Android.Service; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createBroadcastIntent (options: BroadcastIntentOptions) : Ti.Android.Intent; + export function createBroadcastReceiver (parameters?: Dictionary) : Ti.Android.BroadcastReceiver; + export function createIntent (parameters?: Dictionary) : Ti.Android.Intent; + export function createIntentChooser (intent: Ti.Android.Intent, title: string) : Ti.Android.Intent; + export function createNotification (parameters?: Dictionary) : Ti.Android.Notification; + export function createPendingIntent (parameters?: Dictionary) : Ti.Android.PendingIntent; + export function createRemoteViews (parameters?: Dictionary) : Ti.Android.RemoteViews; + export function createService (intent: Ti.Android.Intent) : Ti.Android.Service; + export function createServiceIntent (options: ServiceIntentOptions) : Ti.Android.Intent; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function getCurrentActivity () : Ti.Android.Activity; + export function getCurrentService () : Ti.Android.Service; + export function isServiceRunning (intent: Ti.Android.Intent) : boolean; + export function registerBroadcastReceiver (broadcastReceiver: Ti.Android.BroadcastReceiver, actions: Array) : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function startService (intent: Ti.Android.Intent) : void; + export function stopService (intent: Ti.Android.Intent) : void; + export function unregisterBroadcastReceiver (broadcastReceiver: Ti.Android.BroadcastReceiver) : void; + export interface Intent extends Ti.Proxy { + action : string; + className : string; + data : string; + flags : number; + packageName : string; + type : string; + url : string; + addCategory (name: string) : void; + addFlags (flags: number) : void; + getAction () : string; + getBlobExtra (name: string) : Ti.Blob; + getBooleanExtra (name: string) : boolean; + getClassName () : string; + getData () : string; + getDoubleExtra (name: string) : number; + getFlags () : number; + getIntExtra (name: string) : number; + getLongExtra (name: string) : number; + getPackageName () : string; + getStringExtra (name: string) : string; + getType () : string; + getUrl () : string; + hasExtra (name: string) : boolean; + putExtra (name: string, value: any) : void; + putExtraUri (name: string, value: string) : void; + setFlags (flags: number) : void; + } + export interface Activity extends Ti.Proxy { + actionBar : Ti.Android.ActionBar; + intent : Ti.Android.Intent; + onCreateOptionsMenu : (...args : any[]) => any; + onPrepareOptionsMenu : (...args : any[]) => any; + requestedOrientation : number; + finish () : void; + getActionBar () : Ti.Android.ActionBar; + getIntent () : Ti.Android.Intent; + getOnCreateOptionsMenu () : (...args : any[]) => any; + getOnPrepareOptionsMenu () : (...args : any[]) => any; + getString (resourceId: number, format: any) : string; + invalidateOptionsMenu () : void; + openOptionsMenu () : void; + sendBroadcast (intent: Ti.Android.Intent) : void; + sendBroadcastWithPermission (intent: Ti.Android.Intent, receiverPermission?: string) : void; + setOnCreateOptionsMenu (onCreateOptionsMenu: (...args : any[]) => any) : void; + setOnPrepareOptionsMenu (onPrepareOptionsMenu: (...args : any[]) => any) : void; + setRequestedOrientation (orientation: number) : void; + setResult (resultCode: number, intent?: Ti.Android.Intent) : void; + startActivity (intent: Ti.Android.Intent) : void; + startActivityForResult (intent: Ti.Android.Intent, callback: (...args : any[]) => any) : void; + } + export interface Notification extends Ti.Proxy { + audioStreamType : number; + contentIntent : Ti.Android.PendingIntent; + contentText : string; + contentTitle : string; + contentView : Ti.Android.RemoteViews; + defaults : number; + deleteIntent : Ti.Android.PendingIntent; + flags : number; + icon : any; + ledARGB : number; + ledOffMS : number; + ledOnMS : number; + number : number; + sound : string; + tickerText : string; + when : any; + getAudioStreamType () : number; + getContentIntent () : Ti.Android.PendingIntent; + getContentText () : string; + getContentTitle () : string; + getDefaults () : number; + getDeleteIntent () : Ti.Android.PendingIntent; + getFlags () : number; + getIcon () : any; + getLedARGB () : number; + getLedOffMS () : number; + getLedOnMS () : number; + getNumber () : number; + getSound () : string; + getTickerText () : string; + getWhen () : any; + setAudioStreamType (audioStreamType: number) : void; + setContentIntent (contentIntent: Ti.Android.PendingIntent) : void; + setContentText (contentText: string) : void; + setContentTitle (contentTitle: string) : void; + setContentView (contentView: Ti.Android.RemoteViews) : void; + setDefaults (defaults: number) : void; + setDeleteIntent (deleteIntent: Ti.Android.PendingIntent) : void; + setFlags (flags: number) : void; + setIcon (icon: number) : void; + setIcon (icon: string) : void; + setLatestEventInfo (contentTitle: string, contentText: string, contentIntent: Ti.Android.PendingIntent) : void; + setLedARGB (ledARGB: number) : void; + setLedOffMS (ledOffMS: number) : void; + setLedOnMS (ledOnMS: number) : void; + setNumber (number: number) : void; + setSound (sound: string) : void; + setTickerText (tickerText: string) : void; + setWhen (when: Date) : void; + setWhen (when: number) : void; + } + export module Calendar { + export var METHOD_ALERT : number; + export var METHOD_DEFAULT : number; + export var METHOD_EMAIL : number; + export var METHOD_SMS : number; + export var STATE_DISMISSED : number; + export var STATE_FIRED : number; + export var STATE_SCHEDULED : number; + export var STATUS_CANCELED : number; + export var STATUS_CONFIRMED : number; + export var STATUS_TENTATIVE : number; + export var VISIBILITY_CONFIDENTIAL : number; + export var VISIBILITY_DEFAULT : number; + export var VISIBILITY_PRIVATE : number; + export var VISIBILITY_PUBLIC : number; + export var allAlerts : Array; + export var allCalendars : Array; + export var bubbleParent : boolean; + export var selectableCalendars : Array; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAllAlerts () : Array; + export function getAllCalendars () : Array; + export function getBubbleParent () : boolean; + export function getCalendarById (id: number) : Ti.Android.Calendar.Calendar; + export function getSelectableCalendars () : Array; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface Event extends Ti.Proxy { + alerts : Array; + allDay : boolean; + begin : Date; + description : string; + end : Date; + extendedProperties : Dictionary; + hasAlarm : boolean; + hasExtendedProperties : boolean; + id : string; + location : string; + reminders : Array; + status : number; + title : string; + visibility : number; + createAlert (data: Dictionary) : Ti.Android.Calendar.Alert; + createReminder (data: Dictionary) : Ti.Android.Calendar.Reminder; + getAlerts () : Array; + getAllDay () : boolean; + getBegin () : Date; + getDescription () : string; + getEnd () : Date; + getExtendedProperties () : Dictionary; + getExtendedProperty (name: string) : string; + getHasAlarm () : boolean; + getHasExtendedProperties () : boolean; + getId () : string; + getLocation () : string; + getReminders () : Array; + getStatus () : number; + getTitle () : string; + getVisibility () : number; + setExtendedProperty (name: string, value: string) : void; + } + export interface Reminder extends Ti.Proxy { + id : string; + method : number; + minutes : number; + getId () : string; + getMethod () : number; + getMinutes () : number; + } + export interface Calendar extends Ti.Proxy { + hidden : boolean; + id : string; + name : string; + selected : boolean; + createEvent (properties: Dictionary) : Ti.Android.Calendar.Event; + getEventById (id: number) : Ti.Android.Calendar.Event; + getEventsBetweenDates (date1: Date, date2: Date) : Array; + getEventsInDate (year: number, month: number, day: number) : Array; + getEventsInMonth (year: number, month: number) : Array; + getEventsInYear (year: number) : Array; + getHidden () : boolean; + getId () : string; + getName () : string; + getSelected () : boolean; + } + export interface Alert extends Ti.Proxy { + alarmTime : Date; + begin : Date; + end : Date; + eventId : number; + id : string; + minutes : number; + state : number; + getAlarmTime () : Date; + getBegin () : Date; + getEnd () : Date; + getEventId () : number; + getId () : string; + getMinutes () : number; + getState () : number; + } + } + export interface MenuItem extends Ti.Proxy { + actionView : Ti.UI.View; + actionViewExpanded : boolean; + checkable : boolean; + checked : boolean; + enabled : boolean; + groupId : number; + icon : any; + itemId : number; + order : number; + showAsAction : number; + title : string; + titleCondensed : string; + visible : boolean; + collapseActionView () : void; + expandActionView () : void; + getActionView () : Ti.UI.View; + getGroupId () : number; + getItemId () : number; + getOrder () : number; + getTitle () : string; + getTitleCondensed () : string; + isActionViewExpanded () : boolean; + isCheckable () : boolean; + isChecked () : boolean; + isEnabled () : boolean; + isVisible () : boolean; + setActionView (actionView: Ti.UI.View) : void; + setCheckable (checkable: boolean) : void; + setChecked (enabled: boolean) : void; + setEnabled (enabled: boolean) : void; + setIcon (icon: number) : void; + setIcon (icon: string) : void; + setShowAsAction (showAsAction: number) : void; + setTitle (title: string) : void; + setTitleCondensed (titleCondensed: string) : void; + setVisible (visible: boolean) : void; + } + export interface NotificationManager { + DEFAULT_ALL : number; + DEFAULT_LIGHTS : number; + DEFAULT_SOUND : number; + DEFAULT_VIBRATE : number; + FLAG_AUTO_CANCEL : number; + FLAG_INSISTENT : number; + FLAG_NO_CLEAR : number; + FLAG_ONGOING_EVENT : number; + FLAG_ONLY_ALERT_ONCE : number; + FLAG_SHOW_LIGHTS : number; + STREAM_DEFAULT : number; + cancel (id: number) : void; + cancelAll () : void; + notify (id: number, notification: Ti.Android.Notification) : void; + } + export interface R extends Ti.Proxy { + anim : any; + array : any; + attr : any; + color : any; + dimen : any; + drawable : any; + id : any; + integer : any; + layout : any; + string : any; + style : any; + styleable : any; + } + export interface ActionBar extends Ti.Proxy { + backgroundImage : string; + displayHomeAsUp : boolean; + icon : string; + logo : string; + navigationMode : number; + onHomeIconItemSelected : (...args : any[]) => any; + title : string; + getNavigationMode () : number; + getTitle () : string; + hide () : void; + setBackgroundImage (backgroundImage: string) : void; + setDisplayHomeAsUp (displayHomeAsUp: boolean) : void; + setIcon (icon: string) : void; + setLogo (logo: string) : void; + setNavigationMode (navigationMode: number) : void; + setOnHomeIconItemSelected (onHomeIconItemSelected: (...args : any[]) => any) : void; + setTitle (title: string) : void; + show () : void; + } + export interface BroadcastReceiver extends Ti.Proxy { + onReceived : (...args : any[]) => any; + url : string; + getOnReceived () : (...args : any[]) => any; + getUrl () : string; + setOnReceived (onReceived: (...args : any[]) => any) : void; + setUrl (url: string) : void; + } + export interface Menu extends Ti.Proxy { + items : Array; + add (options: any) : Ti.Android.MenuItem; + clear () : void; + close () : void; + findItem (item: number) : Ti.Android.MenuItem; + findItem (item: Ti.Android.MenuItem) : Ti.Android.MenuItem; + getItem (index: number) : Ti.Android.MenuItem; + getItems () : Array; + hasVisibleItems () : boolean; + removeGroup (groupId: number) : void; + removeItem (itemId: number) : void; + setGroupEnabled (groupId: number, enabled: boolean) : void; + setGroupVisible (groupId: number, visible: boolean) : void; + size () : number; + } + export interface Service extends Ti.Proxy { + intent : Ti.Android.Intent; + serviceInstanceId : number; + getIntent () : Ti.Android.Intent; + getServiceInstanceId () : number; + start () : void; + stop () : void; + } + export interface RemoteViews extends Ti.Proxy { + layoutId : number; + packageName : string; + getLayoutId () : number; + getPackageName () : string; + setBoolean (viewId: number, methodName: string, value: boolean) : void; + setChronometer (viewId: number, base: Date, format: string, started: boolean) : void; + setDouble (viewId: number, methodName: string, value: number) : void; + setImageViewResource (viewId: number, srcId: number) : void; + setImageViewUri (viewId: number, uri: string) : void; + setInt (viewId: number, methodName: string, value: number) : void; + setOnClickPendingIntent (viewId: number, pendingIntent: Ti.Android.PendingIntent) : void; + setProgressBar (viewId: number, max: number, progress: number, indeterminate: boolean) : void; + setString (viewId: number, methodName: string, value: string) : void; + setTextColor (viewId: number, color: number) : void; + setTextViewText (viewId: number, text: string) : void; + setUri (viewId: number, methodName: string, value: string) : void; + setViewVisibility (viewId: number, visibility: number) : void; + } + export interface PendingIntent extends Ti.Proxy { + flags : number; + intent : Ti.Android.Intent; + updateCurrentIntent : boolean; + getFlags () : number; + getIntent () : Ti.Android.Intent; + getUpdateCurrentIntent () : boolean; + } + } + export module Database { + export var FIELD_TYPE_DOUBLE : number; + export var FIELD_TYPE_FLOAT : number; + export var FIELD_TYPE_INT : number; + export var FIELD_TYPE_STRING : number; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function install (path: string, dbName: string) : Ti.Database.DB; + export function open (dbName: string) : Ti.Database.DB; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface ResultSet extends Ti.Proxy { + rowCount : number; + validRow : boolean; + close () : void; + field (index: number, type?: number) : any; + fieldByName (name: string, type?: number) : any; + fieldCount () : number; + fieldName (index: number) : string; + getFieldCount () : number; + getFieldName (index: number) : string; + getRowCount () : number; + getValidRow () : boolean; + isValidRow () : boolean; + next () : boolean; + } + export interface DB extends Ti.Proxy { + file : Ti.Filesystem.File; + lastInsertRowId : number; + name : string; + rowsAffected : number; + close () : void; + execute (sql: string, vararg?: string) : Ti.Database.ResultSet; + execute (vararg?: Array) : Ti.Database.ResultSet; + execute (vararg?: any) : Ti.Database.ResultSet; + execute (sql: string, vararg?: Array) : Ti.Database.ResultSet; + getFile () : Ti.Filesystem.File; + getLastInsertRowId () : number; + getName () : string; + getRowsAffected () : number; + remove () : void; + setLastInsertRowId (lastInsertRowId: number) : void; + setName (name: string) : void; + setRowsAffected (rowsAffected: number) : void; + } + } + export module Contacts { + export var AUTHORIZATION_AUTHORIZED : number; + export var AUTHORIZATION_DENIED : number; + export var AUTHORIZATION_RESTRICTED : number; + export var AUTHORIZATION_UNKNOWN : number; + export var CONTACTS_KIND_ORGANIZATION : number; + export var CONTACTS_KIND_PERSON : number; + export var CONTACTS_SORT_FIRST_NAME : number; + export var CONTACTS_SORT_LAST_NAME : number; + export var bubbleParent : boolean; + export var contactsAuthorization : number; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createGroup (parameters?: Dictionary) : Ti.Contacts.Group; + export function createPerson (parameters?: Dictionary) : Ti.Contacts.Person; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAllGroups () : Array; + export function getAllPeople (limit: number) : Array; + export function getBubbleParent () : boolean; + export function getContactsAuthorization () : number; + export function getGroupByID (id: number) : Ti.Contacts.Group; + export function getPeopleWithName (name: string) : Array; + export function getPersonByID (id: number) : Ti.Contacts.Person; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function removeGroup (group: Ti.Contacts.Group) : void; + export function removePerson (person: Ti.Contacts.Person) : void; + export function requestAuthorization (callback: (...args : any[]) => any) : void; + export function revert () : void; + export function save (contacts: Array) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function showContacts (params: showContactsParams) : void; + export module Tizen { + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAllPeople (callback: (...args : any[]) => any) : void; + export function getPeopleWithName (name: string, callback: (...args : any[]) => any) : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export interface Group { + members (group: Ti.Contacts.Group, callback: (...args : any[]) => any) : void; + sortedMembers (sortBy: number, group: Ti.Contacts.Group, callback: (...args : any[]) => any) : void; + } + } + export interface Group extends Ti.Proxy { + name : string; + recordId : number; + add (person: Ti.Contacts.Person) : void; + getName () : string; + getRecordId () : number; + members () : Array; + remove (person: Ti.Contacts.Person) : void; + setName (name: string) : void; + setRecordId (recordId: number) : void; + sortedMembers (sortBy: number) : Array; + } + export interface Person extends Ti.Proxy { + address : Dictionary; + birthday : string; + created : string; + date : Dictionary; + department : string; + email : Dictionary; + firstName : string; + firstPhonetic : string; + fullName : string; + id : number; + image : Ti.Blob; + instantMessage : Dictionary; + jobTitle : string; + kind : number; + lastName : string; + lastPhonetic : string; + middleName : string; + middlePhonetic : string; + modified : string; + nickname : string; + note : string; + organization : string; + phone : Dictionary; + prefix : string; + recordId : number; + relatedNames : Dictionary; + suffix : string; + url : Dictionary; + getAddress () : Dictionary; + getBirthday () : string; + getCreated () : string; + getDate () : Dictionary; + getDepartment () : string; + getEmail () : Dictionary; + getFirstName () : string; + getFirstPhonetic () : string; + getFullName () : string; + getId () : number; + getImage () : Ti.Blob; + getInstantMessage () : Dictionary; + getJobTitle () : string; + getKind () : number; + getLastName () : string; + getLastPhonetic () : string; + getMiddleName () : string; + getMiddlePhonetic () : string; + getModified () : string; + getNickname () : string; + getNote () : string; + getOrganization () : string; + getPhone () : Dictionary; + getPrefix () : string; + getRecordId () : number; + getRelatedNames () : Dictionary; + getSuffix () : string; + getUrl () : Dictionary; + setAddress (address: Dictionary) : void; + setBirthday (birthday: string) : void; + setDate (date: Dictionary) : void; + setDepartment (department: string) : void; + setEmail (email: Dictionary) : void; + setFirstName (firstName: string) : void; + setFirstPhonetic (firstPhonetic: string) : void; + setImage (image: Ti.Blob) : void; + setInstantMessage (instantMessage: Dictionary) : void; + setJobTitle (jobTitle: string) : void; + setKind (kind: number) : void; + setLastName (lastName: string) : void; + setLastPhonetic (lastPhonetic: string) : void; + setMiddleName (middleName: string) : void; + setMiddlePhonetic (middlePhonetic: string) : void; + setNickname (nickname: string) : void; + setNote (note: string) : void; + setOrganization (organization: string) : void; + setPhone (phone: Dictionary) : void; + setRecordId (recordId: number) : void; + setRelatedNames (relatedNames: Dictionary) : void; + setUrl (url: Dictionary) : void; + } + } + export interface CloudPush { + enabled : boolean; + focusAppOnPush : boolean; + showAppOnTrayClick : boolean; + showTrayNotification : boolean; + showTrayNotificationsWhenFocused : boolean; + singleCallback : boolean; + clearStatus () : void; + getEnabled () : boolean; + getFocusAppOnPush () : boolean; + getShowAppOnTrayClick () : boolean; + getShowTrayNotification () : boolean; + getShowTrayNotificationsWhenFocused () : boolean; + getSingleCallback () : boolean; + retrieveDeviceToken (config: CloudPushNotificationConfig) : void; + setEnabled (enabled: boolean) : void; + setFocusAppOnPush (focusAppOnPush: boolean) : void; + setShowAppOnTrayClick (showAppOnTrayClick: boolean) : void; + setShowTrayNotification (showTrayNotification: boolean) : void; + setShowTrayNotificationsWhenFocused (showTrayNotificationsWhenFocused: boolean) : void; + setSingleCallback (singleCallback: boolean) : void; + } + export module Media { + export var AUDIO_FILEFORMAT_3GP2 : number; + export var AUDIO_FILEFORMAT_3GPP : number; + export var AUDIO_FILEFORMAT_AIFF : number; + export var AUDIO_FILEFORMAT_AMR : number; + export var AUDIO_FILEFORMAT_CAF : number; + export var AUDIO_FILEFORMAT_MP3 : number; + export var AUDIO_FILEFORMAT_MP4 : number; + export var AUDIO_FILEFORMAT_MP4A : number; + export var AUDIO_FILEFORMAT_WAVE : number; + export var AUDIO_FORMAT_AAC : number; + export var AUDIO_FORMAT_ALAW : number; + export var AUDIO_FORMAT_APPLE_LOSSLESS : number; + export var AUDIO_FORMAT_ILBC : number; + export var AUDIO_FORMAT_IMA4 : number; + export var AUDIO_FORMAT_LINEAR_PCM : number; + export var AUDIO_FORMAT_ULAW : number; + export var AUDIO_HEADPHONES : number; + export var AUDIO_HEADPHONES_AND_MIC : number; + export var AUDIO_HEADSET_INOUT : number; + export var AUDIO_LINEOUT : number; + export var AUDIO_MICROPHONE : number; + export var AUDIO_MUTED : number; + export var AUDIO_RECEIVER_AND_MIC : number; + export var AUDIO_SESSION_MODE_AMBIENT : number; + export var AUDIO_SESSION_MODE_PLAYBACK : number; + export var AUDIO_SESSION_MODE_PLAY_AND_RECORD : number; + export var AUDIO_SESSION_MODE_RECORD : number; + export var AUDIO_SESSION_MODE_SOLO_AMBIENT : number; + export var AUDIO_SPEAKER : number; + export var AUDIO_UNAVAILABLE : number; + export var AUDIO_UNKNOWN : number; + export var CAMERA_FRONT : number; + export var CAMERA_REAR : number; + export var DEVICE_BUSY : number; + export var MEDIA_TYPE_PHOTO : string; + export var MEDIA_TYPE_VIDEO : string; + export var MUSIC_MEDIA_GROUP_ALBUM : number; + export var MUSIC_MEDIA_GROUP_ALBUM_ARTIST : number; + export var MUSIC_MEDIA_GROUP_ARTIST : number; + export var MUSIC_MEDIA_GROUP_COMPOSER : number; + export var MUSIC_MEDIA_GROUP_GENRE : number; + export var MUSIC_MEDIA_GROUP_PLAYLIST : number; + export var MUSIC_MEDIA_GROUP_PODCAST_TITLE : number; + export var MUSIC_MEDIA_GROUP_TITLE : number; + export var MUSIC_MEDIA_TYPE_ALL : number; + export var MUSIC_MEDIA_TYPE_ANY_AUDIO : number; + export var MUSIC_MEDIA_TYPE_AUDIOBOOK : number; + export var MUSIC_MEDIA_TYPE_MUSIC : number; + export var MUSIC_MEDIA_TYPE_PODCAST : number; + export var MUSIC_PLAYER_REPEAT_ALL : number; + export var MUSIC_PLAYER_REPEAT_DEFAULT : number; + export var MUSIC_PLAYER_REPEAT_NONE : number; + export var MUSIC_PLAYER_REPEAT_ONE : number; + export var MUSIC_PLAYER_SHUFFLE_ALBUMS : number; + export var MUSIC_PLAYER_SHUFFLE_DEFAULT : number; + export var MUSIC_PLAYER_SHUFFLE_NONE : number; + export var MUSIC_PLAYER_SHUFFLE_SONGS : number; + export var MUSIC_PLAYER_STATE_INTERRUPTED : number; + export var MUSIC_PLAYER_STATE_PAUSED : number; + export var MUSIC_PLAYER_STATE_PLAYING : number; + export var MUSIC_PLAYER_STATE_SEEK_BACKWARD : number; + export var MUSIC_PLAYER_STATE_SEEK_FORWARD : number; + export var MUSIC_PLAYER_STATE_STOPPED : number; + export var NO_CAMERA : number; + export var NO_VIDEO : number; + export var QUALITY_HIGH : number; + export var QUALITY_LOW : number; + export var QUALITY_MEDIUM : number; + export var UNKNOWN_ERROR : number; + export var VIDEO_CONTROL_DEFAULT : number; + export var VIDEO_CONTROL_EMBEDDED : number; + export var VIDEO_CONTROL_FULLSCREEN : number; + export var VIDEO_CONTROL_HIDDEN : number; + export var VIDEO_CONTROL_NONE : number; + export var VIDEO_CONTROL_VOLUME_ONLY : number; + export var VIDEO_FINISH_REASON_PLAYBACK_ENDED : number; + export var VIDEO_FINISH_REASON_PLAYBACK_ERROR : number; + export var VIDEO_FINISH_REASON_USER_EXITED : number; + export var VIDEO_LOAD_STATE_PLAYABLE : number; + export var VIDEO_LOAD_STATE_PLAYTHROUGH_OK : number; + export var VIDEO_LOAD_STATE_STALLED : number; + export var VIDEO_LOAD_STATE_UNKNOWN : number; + export var VIDEO_MEDIA_TYPE_AUDIO : number; + export var VIDEO_MEDIA_TYPE_NONE : number; + export var VIDEO_MEDIA_TYPE_VIDEO : number; + export var VIDEO_PLAYBACK_STATE_INTERRUPTED : number; + export var VIDEO_PLAYBACK_STATE_PAUSED : number; + export var VIDEO_PLAYBACK_STATE_PLAYING : number; + export var VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD : number; + export var VIDEO_PLAYBACK_STATE_SEEKING_FORWARD : number; + export var VIDEO_PLAYBACK_STATE_STOPPED : number; + export var VIDEO_REPEAT_MODE_NONE : number; + export var VIDEO_REPEAT_MODE_ONE : number; + export var VIDEO_SCALING_ASPECT_FILL : number; + export var VIDEO_SCALING_ASPECT_FIT : number; + export var VIDEO_SCALING_MODE_FILL : number; + export var VIDEO_SCALING_NONE : number; + export var VIDEO_SOURCE_TYPE_FILE : number; + export var VIDEO_SOURCE_TYPE_STREAMING : number; + export var VIDEO_SOURCE_TYPE_UNKNOWN : number; + export var VIDEO_TIME_OPTION_EXACT : number; + export var VIDEO_TIME_OPTION_NEAREST_KEYFRAME : number; + export var appMusicPlayer : Ti.Media.MusicPlayer; + export var audioLineType : number; + export var audioPlaying : boolean; + export var audioSessionMode : number; + export var availableCameraMediaTypes : Array; + export var availableCameras : Array; + export var availablePhotoGalleryMediaTypes : Array; + export var availablePhotoMediaTypes : Array; + export var averageMicrophonePower : number; + export var bubbleParent : boolean; + export var canRecord : boolean; + export var isCameraSupported : boolean; + export var peakMicrophonePower : number; + export var systemMusicPlayer : Ti.Media.MusicPlayer; + export var volume : number; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function beep () : void; + export function createAudioPlayer (parameters?: Dictionary) : Ti.Media.AudioPlayer; + export function createAudioRecorder (parameters?: Dictionary) : Ti.Media.AudioRecorder; + export function createItem (parameters?: Dictionary) : Ti.Media.Item; + export function createMusicPlayer (parameters?: Dictionary) : Ti.Media.MusicPlayer; + export function createSound (parameters?: Dictionary) : Ti.Media.Sound; + export function createVideoPlayer (parameters?: Dictionary) : Ti.Media.VideoPlayer; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAppMusicPlayer () : Ti.Media.MusicPlayer; + export function getAudioLineType () : number; + export function getAudioPlaying () : boolean; + export function getAudioSessionMode () : number; + export function getAvailableCameraMediaTypes () : Array; + export function getAvailableCameras () : Array; + export function getAvailablePhotoGalleryMediaTypes () : Array; + export function getAvailablePhotoMediaTypes () : Array; + export function getAverageMicrophonePower () : number; + export function getBubbleParent () : boolean; + export function getCanRecord () : boolean; + export function getIsCameraSupported () : boolean; + export function getPeakMicrophonePower () : number; + export function getSystemMusicPlayer () : Ti.Media.MusicPlayer; + export function getVolume () : number; + export function hideCamera () : void; + export function hideMusicLibrary () : void; + export function isMediaTypeSupported (source: string, type: string) : boolean; + export function openMusicLibrary (options: MusicLibraryOptionsType) : void; + export function openPhotoGallery (options: PhotoGalleryOptionsType) : void; + export function previewImage (options: Dictionary) : void; + export function queryMusicLibrary (query: MediaQueryType) : Array; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function requestAuthorization (callback: (...args : any[]) => any) : void; + export function saveToPhotoGallery (media: Ti.Blob, callbacks: any) : void; + export function saveToPhotoGallery (media: Ti.Filesystem.File, callbacks: any) : void; + export function setAudioSessionMode (audioSessionMode: number) : void; + export function setAvailableCameraMediaTypes (availableCameraMediaTypes: Array) : void; + export function setAvailablePhotoGalleryMediaTypes (availablePhotoGalleryMediaTypes: Array) : void; + export function setAvailablePhotoMediaTypes (availablePhotoMediaTypes: Array) : void; + export function setAverageMicrophonePower (averageMicrophonePower: number) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function showCamera (options: CameraOptionsType) : void; + export function startMicrophoneMonitor () : void; + export function stopMicrophoneMonitor () : void; + export function switchCamera (camera: number) : void; + export function takePicture () : void; + export function takeScreenshot (callback: (...args : any[]) => any) : void; + export function vibrate (pattern?: Array) : void; + export interface Sound extends Ti.Proxy { + allowBackground : boolean; + duration : number; + looping : boolean; + paused : boolean; + playing : boolean; + time : number; + url : string; + volume : number; + getDuration () : number; + getTime () : number; + getUrl () : string; + getVolume () : number; + isLooping () : boolean; + isPaused () : boolean; + isPlaying () : boolean; + pause () : void; + play () : void; + release () : void; + reset () : void; + setLooping (looping: boolean) : void; + setPaused (paused: boolean) : void; + setTime (time: number) : void; + setUrl (url: string) : void; + setVolume (volume: number) : void; + stop () : void; + } + export interface AudioRecorder extends Ti.Proxy { + compression : number; + format : number; + paused : boolean; + recording : boolean; + stopped : boolean; + getCompression () : number; + getFormat () : number; + getPaused () : boolean; + getRecording () : boolean; + getStopped () : boolean; + pause () : void; + resume () : void; + setCompression (compression: number) : void; + setFormat (format: number) : void; + start () : void; + stop () : Ti.Filesystem.File; + } + export interface Item extends Ti.Proxy { + albumArtist : string; + albumTitle : string; + albumTrackCount : number; + albumTrackNumber : number; + artist : string; + artwork : Ti.Blob; + composer : string; + discCount : number; + discNumber : number; + genre : string; + isCompilation : boolean; + lyrics : string; + mediaType : number; + playCount : number; + playbackDuration : number; + podcastTitle : string; + rating : number; + skipCount : number; + title : string; + getAlbumArtist () : string; + getAlbumTitle () : string; + getAlbumTrackCount () : number; + getAlbumTrackNumber () : number; + getArtist () : string; + getArtwork () : Ti.Blob; + getComposer () : string; + getDiscCount () : number; + getDiscNumber () : number; + getGenre () : string; + getIsCompilation () : boolean; + getLyrics () : string; + getMediaType () : number; + getPlayCount () : number; + getPlaybackDuration () : number; + getPodcastTitle () : string; + getRating () : number; + getSkipCount () : number; + getTitle () : string; + } + export interface VideoPlayer extends Ti.UI.View { + allowsAirPlay : boolean; + autoplay : boolean; + contentURL : string; + currentPlaybackTime : number; + duration : number; + endPlaybackTime : number; + fullscreen : boolean; + initialPlaybackTime : number; + loadState : number; + media : any; + mediaControlStyle : number; + mediaTypes : number; + movieControlMode : number; + naturalSize : MovieSize; + playableDuration : number; + playbackState : number; + playing : boolean; + repeatMode : number; + scalingMode : number; + sourceType : number; + url : any; + useApplicationAudioSession : boolean; + volume : number; + cancelAllThumbnailImageRequests () : void; + getAllowsAirPlay () : boolean; + getAutoplay () : boolean; + getContentURL () : string; + getCurrentPlaybackTime () : number; + getDuration () : number; + getEndPlaybackTime () : number; + getFullscreen () : boolean; + getInitialPlaybackTime () : number; + getLoadState () : number; + getMediaControlStyle () : number; + getMediaTypes () : number; + getMovieControlMode () : number; + getNaturalSize () : MovieSize; + getPlayableDuration () : number; + getPlaybackState () : number; + getPlaying () : boolean; + getRepeatMode () : number; + getScalingMode () : number; + getSourceType () : number; + getUrl () : any; + getUseApplicationAudioSession () : boolean; + getVolume () : number; + pause () : void; + play () : void; + release () : void; + requestThumbnailImagesAtTimes (times: Array, option: number, callback: (...args : any[]) => any) : void; + setAllowsAirPlay (allowsAirPlay: boolean) : void; + setAutoplay (autoplay: boolean) : void; + setBackgroundView (view: Ti.UI.View) : void; + setContentURL (contentURL: string) : void; + setCurrentPlaybackTime (currentPlaybackTime: number) : void; + setDuration (duration: number) : void; + setEndPlaybackTime (endPlaybackTime: number) : void; + setFullscreen (fullscreen: boolean) : void; + setInitialPlaybackTime (initialPlaybackTime: number) : void; + setMedia (media: Ti.Blob) : void; + setMedia (media: Ti.Filesystem.File) : void; + setMedia (media: string) : void; + setMediaControlStyle (mediaControlStyle: number) : void; + setMediaTypes (mediaTypes: number) : void; + setMovieControlMode (movieControlMode: number) : void; + setNaturalSize (naturalSize: MovieSize) : void; + setRepeatMode (repeatMode: number) : void; + setScalingMode (scalingMode: number) : void; + setSourceType (sourceType: number) : void; + setUrl (url: string) : void; + setUrl (url: Array) : void; + setUseApplicationAudioSession (useApplicationAudioSession: boolean) : void; + setVolume (volume: number) : void; + stop () : void; + thumbnailImageAtTime (time: number, option: number) : Ti.Blob; + } + export interface MusicPlayer extends Ti.Proxy { + currentPlaybackTime : number; + nowPlaying : Ti.Media.Item; + playbackState : number; + repeatMode : number; + shuffleMode : number; + volume : number; + getCurrentPlaybackTime () : number; + getNowPlaying () : Ti.Media.Item; + getPlaybackState () : number; + getRepeatMode () : number; + getShuffleMode () : number; + getVolume () : number; + pause () : void; + play () : void; + seekBackward () : void; + seekForward () : void; + setCurrentPlaybackTime (currentPlaybackTime: number) : void; + setQueue (queue: Ti.Media.Item) : void; + setQueue (queue: Array) : void; + setQueue (queue: PlayerQueue) : void; + setRepeatMode (repeatMode: number) : void; + setShuffleMode (shuffleMode: number) : void; + setVolume (volume: number) : void; + skipToBeginning () : void; + skipToNext () : void; + skipToPrevious () : void; + stop () : void; + stopSeeking () : void; + } + export interface AudioPlayer extends Ti.Proxy { + STATE_BUFFERING : number; + STATE_INITIALIZED : number; + STATE_PAUSED : number; + STATE_PLAYING : number; + STATE_STARTING : number; + STATE_STOPPED : number; + STATE_STOPPING : number; + STATE_WAITING_FOR_DATA : number; + STATE_WAITING_FOR_QUEUE : number; + allowBackground : boolean; + autoplay : boolean; + bitRate : number; + bufferSize : number; + idle : boolean; + paused : boolean; + playing : boolean; + progress : number; + state : number; + url : string; + volume : number; + waiting : boolean; + getAllowBackground () : boolean; + getAutoplay () : boolean; + getBitRate () : number; + getBufferSize () : number; + getIdle () : boolean; + getPaused () : boolean; + getPlaying () : boolean; + getProgress () : number; + getState () : number; + getUrl () : string; + getVolume () : number; + getWaiting () : boolean; + isPaused () : boolean; + isPlaying () : boolean; + pause () : void; + play () : void; + release () : void; + setBitRate (bitRate: number) : void; + setBufferSize (bufferSize: number) : void; + setPaused (paused: boolean) : void; + setUrl (url: string) : void; + setVolume (volume: number) : void; + start () : void; + stateDescription (state: number) : string; + stop () : void; + } + export interface Android { + scanMediaFiles (paths: Array, mimeTypes: Array, callback: (...args : any[]) => any) : void; + setSystemWallpaper (image: Ti.Blob, scale: boolean) : void; + } + } + export module Network { + export var INADDR_ANY : string; + export var NETWORK_LAN : number; + export var NETWORK_MOBILE : number; + export var NETWORK_NONE : number; + export var NETWORK_UNKNOWN : number; + export var NETWORK_WIFI : number; + export var NOTIFICATION_TYPE_ALERT : number; + export var NOTIFICATION_TYPE_BADGE : number; + export var NOTIFICATION_TYPE_NEWSSTAND : number; + export var NOTIFICATION_TYPE_SOUND : number; + export var READ_MODE : number; + export var READ_WRITE_MODE : number; + export var SOCKET_CLOSED : number; + export var SOCKET_CONNECTED : number; + export var SOCKET_ERROR : number; + export var SOCKET_INITIALIZED : number; + export var SOCKET_LISTENING : number; + export var TLS_VERSION_1_0 : number; + export var TLS_VERSION_1_1 : number; + export var TLS_VERSION_1_2 : number; + export var WRITE_MODE : number; + export var bubbleParent : boolean; + export var httpURLFormatter : (...args : any[]) => any; + export var networkType : number; + export var networkTypeName : string; + export var online : boolean; + export var remoteDeviceUUID : string; + export var remoteNotificationTypes : Array; + export var remoteNotificationsEnabled : boolean; + export function addConnectivityListener (callback: (...args : any[]) => any) : void; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createBonjourBrowser (serviceType: string, domain: string, parameters?: Dictionary) : Ti.Network.BonjourBrowser; + export function createBonjourService (name: string, type: string, domain: string, parameters?: Dictionary) : Ti.Network.BonjourService; + export function createHTTPClient (parameters?: Dictionary) : Ti.Network.HTTPClient; + export function createTCPSocket (hostName: string, port: number, mode: number, parameters: Dictionary) : Ti.Network.TCPSocket; + export function decodeURIComponent (value: string) : string; + export function encodeURIComponent (value: string) : string; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function getHttpURLFormatter () : (...args : any[]) => any; + export function getNetworkType () : number; + export function getNetworkTypeName () : string; + export function getOnline () : boolean; + export function getRemoteDeviceUUID () : string; + export function getRemoteNotificationTypes () : Array; + export function getRemoteNotificationsEnabled () : boolean; + export function registerForPushNotifications (config: PushNotificationConfig) : void; + export function removeConnectivityListener (callback: (...args : any[]) => any) : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setHttpURLFormatter (httpURLFormatter: (...args : any[]) => any) : void; + export function unregisterForPushNotifications () : void; + export module Socket { + export var CLOSED : number; + export var CONNECTED : number; + export var ERROR : number; + export var INITIALIZED : number; + export var LISTENING : number; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createTCP (params?: Dictionary) : Ti.Network.Socket.TCP; + export function createUDP (params?: Dictionary) : Ti.Network.Socket.UDP; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface UDP extends Ti.IOStream { + data : (...args : any[]) => any; + error : (...args : any[]) => any; + port : number; + started : (...args : any[]) => any; + getData () : (...args : any[]) => any; + getError () : (...args : any[]) => any; + getPort () : number; + getStarted () : (...args : any[]) => any; + sendBytes (port: number, host: string, data: Array) : void; + sendString (port: number, host: string, data: string) : void; + setData (data: (...args : any[]) => any) : void; + setError (error: (...args : any[]) => any) : void; + setPort (port: number) : void; + setStarted (started: (...args : any[]) => any) : void; + start (port: number) : void; + stop () : void; + } + export interface TCP extends Ti.IOStream { + accepted : (...args : any[]) => any; + connected : (...args : any[]) => any; + error : (...args : any[]) => any; + host : string; + listenQueueSize : number; + port : number; + state : number; + timeout : number; + accept (options: AcceptDict) : void; + connect () : void; + getAccepted () : (...args : any[]) => any; + getConnected () : (...args : any[]) => any; + getError () : (...args : any[]) => any; + getHost () : string; + getListenQueueSize () : number; + getPort () : number; + getState () : number; + getTimeout () : number; + listen () : void; + setAccepted (accepted: (...args : any[]) => any) : void; + setConnected (connected: (...args : any[]) => any) : void; + setError (error: (...args : any[]) => any) : void; + setHost (host: string) : void; + setListenQueueSize (listenQueueSize: number) : void; + setPort (port: number) : void; + setTimeout (timeout: number) : void; + } + } + export interface TCPSocket extends Ti.Proxy { + hostName : string; + isValid : boolean; + mode : number; + port : number; + stripTerminator : boolean; + close () : void; + connect () : void; + getHostName () : string; + getIsValid () : boolean; + getMode () : number; + getPort () : number; + getStripTerminator () : boolean; + listen () : void; + setHostName (hostName: string) : void; + setIsValid (isValid: boolean) : void; + setMode (mode: number) : void; + setPort (port: number) : void; + setStripTerminator (stripTerminator: boolean) : void; + write (data: any, sendTo: number) : void; + write (data: string, sendTo: number) : void; + } + export interface BonjourService extends Ti.Proxy { + domain : string; + isLocal : boolean; + name : string; + socket : any; + type : string; + getDomain () : string; + getIsLocal () : boolean; + getName () : string; + getSocket () : any; + getType () : string; + publish (socket: any) : void; + resolve (timeout: number) : void; + setDomain (domain: string) : void; + setIsLocal (isLocal: boolean) : void; + setName (name: string) : void; + setSocket (socket: any) : void; + setType (type: string) : void; + stop () : void; + } + export interface HTTPClient extends Ti.Proxy { + DONE : number; + HEADERS_RECEIVED : number; + LOADING : number; + OPENED : number; + UNSENT : number; + allResponseHeaders : string; + autoEncodeUrl : boolean; + autoRedirect : boolean; + cache : boolean; + connected : boolean; + connectionType : string; + domain : string; + enableKeepAlive : boolean; + file : string; + location : string; + ondatastream : (...args : any[]) => any; + onerror : (...args : any[]) => any; + onload : (...args : any[]) => any; + onreadystatechange : (...args : any[]) => any; + onsendstream : (...args : any[]) => any; + password : string; + readyState : number; + responseData : Ti.Blob; + responseText : string; + responseXML : Ti.XML.Document; + status : number; + statusText : string; + timeout : number; + tlsVersion : number; + username : string; + validatesSecureCertificate : boolean; + withCredentials : boolean; + abort () : void; + addAuthFactory (scheme: string, factory: any) : void; + addKeyManager (X509KeyManager: any) : void; + addTrustManager (X509TrustManager: any) : void; + clearCookies (host: string) : void; + getAllResponseHeaders () : string; + getAutoEncodeUrl () : boolean; + getAutoRedirect () : boolean; + getCache () : boolean; + getConnected () : boolean; + getConnectionType () : string; + getDomain () : string; + getEnableKeepAlive () : boolean; + getFile () : string; + getLocation () : string; + getOndatastream () : (...args : any[]) => any; + getOnerror () : (...args : any[]) => any; + getOnload () : (...args : any[]) => any; + getOnreadystatechange () : (...args : any[]) => any; + getOnsendstream () : (...args : any[]) => any; + getPassword () : string; + getReadyState () : number; + getResponseData () : Ti.Blob; + getResponseHeader (name: string) : string; + getResponseText () : string; + getResponseXML () : Ti.XML.Document; + getStatus () : number; + getStatusText () : string; + getTimeout () : number; + getTlsVersion () : number; + getUsername () : string; + getValidatesSecureCertificate () : boolean; + getWithCredentials () : boolean; + open (method: string, url: string, async?: boolean) : void; + send (data?: any) : void; + send (data?: string) : void; + send (data?: Ti.Filesystem.File) : void; + send (data?: Ti.Blob) : void; + setAutoEncodeUrl (autoEncodeUrl: boolean) : void; + setAutoRedirect (autoRedirect: boolean) : void; + setCache (cache: boolean) : void; + setDomain (domain: string) : void; + setEnableKeepAlive (enableKeepAlive: boolean) : void; + setFile (file: string) : void; + setOndatastream (ondatastream: (...args : any[]) => any) : void; + setOnerror (onerror: (...args : any[]) => any) : void; + setOnload (onload: (...args : any[]) => any) : void; + setOnreadystatechange (onreadystatechange: (...args : any[]) => any) : void; + setOnsendstream (onsendstream: (...args : any[]) => any) : void; + setPassword (password: string) : void; + setRequestHeader (name: string, value: string) : void; + setTimeout (timeout: number) : void; + setTlsVersion (tlsVersion: number) : void; + setUsername (username: string) : void; + setValidatesSecureCertificate (validatesSecureCertificate: boolean) : void; + setWithCredentials (withCredentials: boolean) : void; + } + export interface BonjourBrowser extends Ti.Proxy { + domain : string; + isSearching : boolean; + serviceType : string; + getDomain () : string; + getIsSearching () : boolean; + getServiceType () : string; + search () : void; + setDomain (domain: string) : void; + setIsSearching (isSearching: boolean) : void; + setServiceType (serviceType: string) : void; + stopSearch () : void; + } + } + export module Platform { + export var BATTERY_STATE_CHARGING : number; + export var BATTERY_STATE_FULL : number; + export var BATTERY_STATE_UNKNOWN : number; + export var BATTERY_STATE_UNPLUGGED : number; + export var address : string; + export var architecture : string; + export var availableMemory : number; + export var batteryLevel : number; + export var batteryMonitoring : boolean; + export var batteryState : number; + export var bubbleParent : boolean; + export var displayCaps : Ti.Platform.DisplayCaps; + export var id : string; + export var locale : string; + export var macaddress : string; + export var manufacturer : string; + export var model : string; + export var name : string; + export var netmask : string; + export var osname : string; + export var ostype : string; + export var processorCount : number; + export var runtime : string; + export var username : string; + export var version : string; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function canOpenURL (url: string) : boolean; + export function createUUID () : string; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAddress () : string; + export function getArchitecture () : string; + export function getAvailableMemory () : number; + export function getBatteryLevel () : number; + export function getBatteryMonitoring () : boolean; + export function getBatteryState () : number; + export function getBubbleParent () : boolean; + export function getDisplayCaps () : Ti.Platform.DisplayCaps; + export function getId () : string; + export function getLocale () : string; + export function getMacaddress () : string; + export function getManufacturer () : string; + export function getModel () : string; + export function getName () : string; + export function getNetmask () : string; + export function getOsname () : string; + export function getOstype () : string; + export function getProcessorCount () : number; + export function getRuntime () : string; + export function getUsername () : string; + export function getVersion () : string; + export function is24HourTimeFormat () : boolean; + export function openURL (url: string) : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBatteryMonitoring (batteryMonitoring: boolean) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface DisplayCaps extends Ti.Proxy { + density : string; + dpi : number; + logicalDensityFactor : number; + platformHeight : number; + platformWidth : number; + xdpi : number; + ydpi : number; + getDensity () : string; + getDpi () : number; + getLogicalDensityFactor () : number; + getPlatformHeight () : number; + getPlatformWidth () : number; + getXdpi () : number; + getYdpi () : number; + setDensity (density: string) : void; + setDpi (dpi: number) : void; + setLogicalDensityFactor (logicalDensityFactor: number) : void; + setPlatformHeight (platformHeight: number) : void; + setPlatformWidth (platformWidth: number) : void; + setXdpi (xdpi: number) : void; + setYdpi (ydpi: number) : void; + } + export interface Android { + API_LEVEL : number; + PHYSICAL_SIZE_CATEGORY_LARGE : number; + PHYSICAL_SIZE_CATEGORY_NORMAL : number; + PHYSICAL_SIZE_CATEGORY_SMALL : number; + PHYSICAL_SIZE_CATEGORY_UNDEFINED : number; + PHYSICAL_SIZE_CATEGORY_XLARGE : number; + physicalSizeCategory : number; + getPhysicalSizeCategory () : number; + } + } + export interface Buffer extends Ti.Proxy { + byteOrder : number; + length : number; + type : string; + value : any; + append (sourceBuffer: Ti.Buffer, sourceOffset?: number, sourceLength?: number) : number; + clear () : void; + clone (offset?: number, length?: number) : Ti.Buffer; + copy (sourceBuffer: Ti.Buffer, offset: number, sourceOffset?: number, sourceLength?: number) : number; + fill (fillByte: number, offset?: number, length?: number) : void; + getByteOrder () : number; + getLength () : number; + getType () : string; + getValue () : any; + insert (sourceBuffer: Ti.Buffer, offset: number, sourceOffset?: number, sourceLength?: number) : number; + release () : void; + setLength (length: number) : void; + toBlob () : Ti.Blob; + toString () : string; + } + export enum BufferStream { + + } + export module Calendar { + export var AUTHORIZATION_AUTHORIZED : number; + export var AUTHORIZATION_DENIED : number; + export var AUTHORIZATION_RESTRICTED : number; + export var AUTHORIZATION_UNKNOWN : number; + export var AVAILABILITY_BUSY : number; + export var AVAILABILITY_FREE : number; + export var AVAILABILITY_NOTSUPPORTED : number; + export var AVAILABILITY_TENTATIVE : number; + export var AVAILABILITY_UNAVAILABLE : number; + export var METHOD_ALERT : number; + export var METHOD_DEFAULT : number; + export var METHOD_EMAIL : number; + export var METHOD_SMS : number; + export var RECURRENCEFREQUENCY_DAILY : number; + export var RECURRENCEFREQUENCY_MONTHLY : number; + export var RECURRENCEFREQUENCY_WEEKLY : number; + export var RECURRENCEFREQUENCY_YEARLY : number; + export var SPAN_FUTUREEVENTS : number; + export var SPAN_THISEVENT : number; + export var STATE_DISMISSED : number; + export var STATE_FIRED : number; + export var STATE_SCHEDULED : number; + export var STATUS_CANCELED : number; + export var STATUS_CONFIRMED : number; + export var STATUS_NONE : number; + export var STATUS_TENTATIVE : number; + export var VISIBILITY_CONFIDENTIAL : number; + export var VISIBILITY_DEFAULT : number; + export var VISIBILITY_PRIVATE : number; + export var VISIBILITY_PUBLIC : number; + export var allAlerts : Array; + export var allCalendars : Array; + export var allEditableCalendars : Array; + export var bubbleParent : boolean; + export var defaultCalendar : Ti.Calendar.Calendar; + export var eventsAuthorization : number; + export var selectableCalendars : Array; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAllAlerts () : Array; + export function getAllCalendars () : Array; + export function getAllEditableCalendars () : Array; + export function getBubbleParent () : boolean; + export function getCalendarById (id: number) : Ti.Calendar.Calendar; + export function getDefaultCalendar () : Ti.Calendar.Calendar; + export function getEventsAuthorization () : number; + export function getSelectableCalendars () : Array; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function requestEventsAuthorization (callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface Calendar extends Ti.Proxy { + hidden : boolean; + id : string; + name : string; + selected : boolean; + createEvent (properties: Dictionary) : Ti.Calendar.Event; + getEventById (id: number) : Ti.Calendar.Event; + getEventsBetweenDates (date1: Date, date2: Date) : Array; + getEventsInDate (year: number, month: number, day: number) : Array; + getEventsInMonth (year: number, month: number) : Array; + getEventsInYear (year: number) : Array; + getHidden () : boolean; + getId () : string; + getName () : string; + getSelected () : boolean; + } + export interface Reminder extends Ti.Proxy { + id : string; + method : number; + minutes : number; + getId () : string; + getMethod () : number; + getMinutes () : number; + } + export interface Event extends Ti.Proxy { + alerts : Array; + allDay : boolean; + availability : number; + begin : Date; + description : string; + end : Date; + extendedProperties : Dictionary; + hasAlarm : boolean; + id : string; + isDetached : boolean; + location : string; + notes : string; + recurenceRule : Ti.Calendar.RecurrenceRule; + recurenceRules : Array; + reminders : Array; + status : number; + title : string; + visibility : number; + addRecurrenceRule (rule: Ti.Calendar.RecurrenceRule) : void; + createAlert (data: Dictionary) : Ti.Calendar.Alert; + createRecurenceRule (data: Dictionary) : Ti.Calendar.RecurrenceRule; + createReminder (data: Dictionary) : Ti.Calendar.Reminder; + getAlerts () : Array; + getAllDay () : boolean; + getAvailability () : number; + getBegin () : Date; + getDescription () : string; + getEnd () : Date; + getExtendedProperties () : Dictionary; + getExtendedProperty (name: string) : string; + getHasAlarm () : boolean; + getId () : string; + getIsDetached () : boolean; + getLocation () : string; + getNotes () : string; + getRecurenceRule () : Ti.Calendar.RecurrenceRule; + getRecurenceRules () : Array; + getReminders () : Array; + getStatus () : number; + getTitle () : string; + getVisibility () : number; + refresh () : boolean; + remove (span: number) : boolean; + removeRecurenceRule (rule: Ti.Calendar.RecurrenceRule) : void; + save (span: number) : boolean; + setAlerts (alerts: Array) : void; + setAllDay (allDay: boolean) : void; + setBegin (begin: Date) : void; + setEnd (end: Date) : void; + setExtendedProperty (name: string, value: string) : void; + setLocation (location: string) : void; + setNotes (notes: string) : void; + setRecurenceRule (recurenceRule: Ti.Calendar.RecurrenceRule) : void; + setRecurenceRules (recurenceRules: Array) : void; + setTitle (title: string) : void; + } + export interface RecurrenceRule extends Ti.Proxy { + calendarID : string; + daysOfTheMonth : Array; + daysOfTheWeek : daysOfTheWeekDictionary; + daysOfTheYear : Array; + end : recurrenceEndDictionary; + frequency : number; + interval : number; + monthsOfTheYear : Array; + setPositions : Array; + weeksOfTheYear : Array; + getCalendarID () : string; + getDaysOfTheMonth () : Array; + getDaysOfTheWeek () : daysOfTheWeekDictionary; + getDaysOfTheYear () : Array; + getEnd () : recurrenceEndDictionary; + getFrequency () : number; + getInterval () : number; + getMonthsOfTheYear () : Array; + getSetPositions () : Array; + getWeeksOfTheYear () : Array; + } + export interface Alert extends Ti.Proxy { + absoluteDate : Date; + alarmTime : Date; + begin : Date; + end : Date; + eventId : number; + id : string; + minutes : number; + relativeOffset : number; + state : number; + getAbsoluteDate () : Date; + getAlarmTime () : Date; + getBegin () : Date; + getEnd () : Date; + getEventId () : number; + getId () : string; + getMinutes () : number; + getRelativeOffset () : number; + getState () : number; + setAbsoluteDate (absoluteDate: Date) : void; + setRelativeOffset (relativeOffset: number) : void; + } + } + export module Map { + export var ANNOTATION_DRAG_STATE_CANCEL : number; + export var ANNOTATION_DRAG_STATE_DRAG : number; + export var ANNOTATION_DRAG_STATE_END : number; + export var ANNOTATION_DRAG_STATE_NONE : number; + export var ANNOTATION_DRAG_STATE_START : number; + export var ANNOTATION_GREEN : number; + export var ANNOTATION_PURPLE : number; + export var ANNOTATION_RED : number; + export var HYBRID_TYPE : number; + export var SATELLITE_TYPE : number; + export var STANDARD_TYPE : number; + export var TERRAIN_TYPE : number; + export var bubbleParent : boolean; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createAnnotation (parameters?: Dictionary) : Ti.Map.Annotation; + export function createView (parameters?: Dictionary) : Ti.Map.View; + export function fireEvent (name: string, event: Dictionary) : void; + export function getBubbleParent () : boolean; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface View extends Ti.UI.View { + animated : boolean; + annotations : Array; + hideAnnotationWhenTouchMap : boolean; + latitudeDelta : number; + longitudeDelta : number; + mapType : number; + region : MapRegionType; + regionFit : boolean; + userLocation : boolean; + addAnnotation (annotation: Dictionary) : void; + addAnnotation (annotation: Ti.Map.Annotation) : void; + addAnnotations (annotations: Array) : void; + addAnnotations (annotations: Array>) : void; + addRoute (route: MapRouteType) : void; + deselectAnnotation (annotation: string) : void; + deselectAnnotation (annotation: Ti.Map.Annotation) : void; + getAnimate () : boolean; + getAnimated () : boolean; + getAnnotations () : Array; + getHideAnnotationWhenTouchMap () : boolean; + getLatitudeDelta () : number; + getLongitudeDelta () : number; + getMapType () : number; + getRegion () : MapRegionType; + getRegionFit () : boolean; + getUserLocation () : boolean; + removeAllAnnotations () : void; + removeAnnotation (annotation: string) : void; + removeAnnotation (annotation: Ti.Map.Annotation) : void; + removeAnnotations (annotations: Array) : void; + removeAnnotations (annotations: Array) : void; + removeRoute (route: MapRouteType) : void; + selectAnnotation (annotation: string) : void; + selectAnnotation (annotation: Ti.Map.Annotation) : void; + setAnimate (animate: boolean) : void; + setAnimated (animated: boolean) : void; + setAnnotations (annotations: Array) : void; + setHideAnnotationWhenTouchMap (hideAnnotationWhenTouchMap: boolean) : void; + setLocation (location: MapLocationType) : void; + setMapType (mapType: number) : void; + setRegion (region: MapRegionType) : void; + setRegionFit (regionFit: boolean) : void; + setUserLocation (userLocation: boolean) : void; + zoom (level: number) : void; + } + export interface Annotation extends Ti.Proxy { + animate : boolean; + canShowCallout : boolean; + centerOffset : Point; + customView : Ti.UI.View; + draggable : boolean; + image : any; + latitude : number; + leftButton : any; + leftView : Ti.UI.View; + longitude : number; + pinImage : string; + pincolor : number; + rightButton : any; + rightView : Ti.UI.View; + subtitle : string; + subtitleid : string; + title : string; + titleid : string; + getAnimate () : boolean; + getCanShowCallout () : boolean; + getCenterOffset () : Point; + getCustomView () : Ti.UI.View; + getDraggable () : boolean; + getImage () : any; + getLatitude () : number; + getLeftButton () : any; + getLeftView () : Ti.UI.View; + getLongitude () : number; + getPinImage () : string; + getPincolor () : number; + getRightButton () : any; + getRightView () : Ti.UI.View; + getSubtitle () : string; + getSubtitleid () : string; + getTitle () : string; + getTitleid () : string; + setAnimate (animate: boolean) : void; + setCanShowCallout (canShowCallout: boolean) : void; + setCenterOffset (centerOffset: Point) : void; + setCustomView (customView: Ti.UI.View) : void; + setDraggable (draggable: boolean) : void; + setImage (image: string) : void; + setImage (image: Ti.Blob) : void; + setLatitude (latitude: number) : void; + setLeftButton (leftButton: number) : void; + setLeftButton (leftButton: string) : void; + setLeftView (leftView: Ti.UI.View) : void; + setLongitude (longitude: number) : void; + setPinImage (pinImage: string) : void; + setPincolor (pincolor: number) : void; + setRightButton (rightButton: number) : void; + setRightButton (rightButton: string) : void; + setRightView (rightView: Ti.UI.View) : void; + setSubtitle (subtitle: string) : void; + setSubtitleid (subtitleid: string) : void; + setTitle (title: string) : void; + setTitleid (titleid: string) : void; + } + } + export module Filesystem { + export var MODE_APPEND : number; + export var MODE_READ : number; + export var MODE_WRITE : number; + export var applicationCacheDirectory : string; + export var applicationDataDirectory : string; + export var applicationDirectory : string; + export var applicationSupportDirectory : string; + export var bubbleParent : boolean; + export var externalStorageDirectory : string; + export var lineEnding : string; + export var resRawDirectory : string; + export var resourcesDirectory : string; + export var separator : string; + export var tempDirectory : string; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function createTempDirectory () : Ti.Filesystem.File; + export function createTempFile () : Ti.Filesystem.File; + export function fireEvent (name: string, event: Dictionary) : void; + export function getApplicationCacheDirectory () : string; + export function getApplicationDataDirectory () : string; + export function getApplicationDirectory () : string; + export function getApplicationSupportDirectory () : string; + export function getBubbleParent () : boolean; + export function getExternalStorageDirectory () : string; + export function getFile (path: string) : Ti.Filesystem.File; + export function getLineEnding () : string; + export function getResRawDirectory () : string; + export function getResourcesDirectory () : string; + export function getSeparator () : string; + export function getTempDirectory () : string; + export function isExternalStoragePresent () : boolean; + export function openStream (mode: number, path: string) : Ti.Filesystem.FileStream; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export interface File extends Ti.Proxy { + executable : boolean; + hidden : boolean; + name : string; + nativePath : string; + parent : Ti.Filesystem.File; + readonly : boolean; + remoteBackup : boolean; + size : number; + symbolicLink : boolean; + writable : boolean; + writeable : boolean; + append (data: string) : boolean; + append (data: Ti.Blob) : boolean; + append (data: Ti.Filesystem.File) : boolean; + copy (destinationPath: string) : boolean; + createDirectory () : boolean; + createFile () : boolean; + createTimestamp () : number; + deleteDirectory (recursive?: boolean) : boolean; + deleteFile () : boolean; + exists () : boolean; + extension () : string; + getDirectoryListing () : Array; + getExecutable () : boolean; + getHidden () : boolean; + getName () : string; + getNativePath () : string; + getParent () : any; + getReadonly () : boolean; + getRemoteBackup () : boolean; + getSize () : number; + getSymbolicLink () : boolean; + getWritable () : boolean; + getWriteable () : boolean; + isDirectory () : boolean; + isFile () : boolean; + modificationTimestamp () : number; + move (newpath: string) : boolean; + open (mode: number) : Ti.Filesystem.FileStream; + read () : Ti.Blob; + rename (newname: string) : boolean; + resolve () : string; + setHidden (hidden: boolean) : void; + setRemoteBackup (remoteBackup: boolean) : void; + spaceAvailable () : number; + write (data: string, append?: boolean) : boolean; + write (data: Ti.Filesystem.File, append?: boolean) : boolean; + write (data: Ti.Blob, append?: boolean) : boolean; + } + export enum FileStream { + + } + } + export interface Yahoo { + yql (yql: string, callback: (...args : any[]) => any) : void; + } + export interface Gesture { + landscape : boolean; + orientation : number; + portrait : boolean; + getLandscape () : boolean; + getOrientation () : number; + getPortrait () : boolean; + isFaceDown () : boolean; + isFaceUp () : boolean; + isLandscape () : boolean; + isPortrait () : boolean; + } + export interface Analytics { + lastEvent : string; + addEvent (type: string, name: string, data?: any) : void; + featureEvent (name: string, data?: any) : void; + getLastEvent () : string; + navEvent (from: string, to: string, name?: string, data?: any) : void; + settingsEvent (name: string, data?: any) : void; + timedEvent (name: string, start: Date, stop: Date, duration: number, data?: any) : void; + userEvent (name: string, data?: any) : void; + } + export module Facebook { + export var BUTTON_STYLE_NORMAL : number; + export var BUTTON_STYLE_WIDE : number; + export var accessToken : string; + export var appid : string; + export var bubbleParent : boolean; + export var expirationDate : Date; + export var forceDialogAuth : boolean; + export var loggedIn : boolean; + export var permissions : Array; + export var uid : string; + export function addEventListener (name: string, callback: (...args : any[]) => any) : void; + export function applyProperties (props: Dictionary) : void; + export function authorize () : void; + export function createLoginButton (parameters?: Dictionary) : Ti.Facebook.LoginButton; + export function dialog (action: string, params: any, callback: (...args : any[]) => any) : void; + export function fireEvent (name: string, event: Dictionary) : void; + export function getAccessToken () : string; + export function getAppid () : string; + export function getBubbleParent () : boolean; + export function getExpirationDate () : Date; + export function getForceDialogAuth () : boolean; + export function getLoggedIn () : boolean; + export function getPermissions () : Array; + export function getUid () : string; + export function logout () : void; + export function removeEventListener (name: string, callback: (...args : any[]) => any) : void; + export function request (method: string, params: any, callback: (...args : any[]) => any) : void; + export function requestWithGraphPath (path: string, params: Dictionary, httpMethod: string, callback: (...args : any[]) => any) : void; + export function setAccessToken (accessToken: string) : void; + export function setAppid (appid: string) : void; + export function setBubbleParent (bubbleParent: boolean) : void; + export function setExpirationDate (expirationDate: Date) : void; + export function setForceDialogAuth (forceDialogAuth: boolean) : void; + export function setLoggedIn (loggedIn: boolean) : void; + export function setPermissions (permissions: Array) : void; + export function setUid (uid: string) : void; + export interface LoginButton extends Ti.UI.View { + style : string; + getStyle () : string; + setStyle (style: string) : void; + } + } + export enum Accelerometer { + + } + export interface Utils { + base64decode (obj: string) : Ti.Blob; + base64decode (obj: Ti.Blob) : Ti.Blob; + base64encode (obj: string) : Ti.Blob; + base64encode (obj: Ti.Blob) : Ti.Blob; + md5HexDigest (obj: string) : string; + md5HexDigest (obj: Ti.Blob) : string; + sha1 (obj: string) : string; + sha1 (obj: Ti.Blob) : string; + sha256 (obj: string) : string; + sha256 (obj: Ti.Blob) : string; + } + export interface Event { + bubbles : boolean; + cancelBubble : boolean; + source : any; + type : string; + } + export interface Stream { + MODE_APPEND : number; + MODE_READ : number; + MODE_WRITE : number; + createStream (params: CreateStreamArgs) : Ti.IOStream; + pump (inputStream: Ti.IOStream, handler: (...args : any[]) => any, maxChunkSize: number, isAsync?: boolean) : void; + read (sourceStream: Ti.IOStream, buffer: Ti.Buffer, offset?: number, length?: number, resultsCallback?: (...args : any[]) => any) : void; + readAll (sourceStream: Ti.IOStream, buffer?: Ti.Buffer, resultsCallback?: (...args : any[]) => any) : any; + write (outputStream: Ti.IOStream, buffer: Ti.Buffer, offset?: number, length?: number, resultsCallback?: (...args : any[]) => any) : void; + writeStream (inputStream: Ti.IOStream, outputStream: Ti.IOStream, maxChunkSize: number, resultsCallback?: (...args : any[]) => any) : void; + } +} + +declare class Dictionary { + +} + +declare class BarItemType { + accessibilityLabel : string; + enabled : boolean; + image : any; + title : string; + width : number; +} + +declare class MatrixCreationDict { + anchorPoint : Dictionary; + rotate : number; + scale : number; +} + +declare class TableViewIndexEntry { + index : number; + title : string; +} + +declare class FacebookRESTResponsev1 { + error : string; + method : string; + result : string; + success : boolean; +} + +declare class MapRegionType { + latitude : number; + latitudeDelta : number; + longitude : number; + longitudeDelta : number; +} + +declare class CropRectType { + height : number; + width : number; + x : number; + y : number; +} + +declare class LocationResults extends ErrorResponse { + coords : LocationCoordinates; + provider : LocationProviderDict; +} + +declare class ErrorResponse { + code : number; + error : string; + success : boolean; +} + +declare enum CloudPushNotificationsResponse { + +} + +declare class CloudResponse { + code : number; + error : boolean; + message : string; + meta : Dictionary; + success : boolean; +} + +declare class recurrenceEndDictionary { + endDate : Date; + occurrenceCount : number; +} + +declare module Global { + export function L (key: string, hint?: string) : string; + export function alert (message: string) : void; + export function clearInterval (timerId: number) : void; + export function clearTimeout (timerId: number) : void; + export function decodeURIComponent (encodedURI: string) : string; + export function encodeURIComponent (string: string) : string; + export function require (moduleId: string) : any; + export function setInterval (_function: (...args : any[]) => any, delay: number) : number; + export function setTimeout (_function: (...args : any[]) => any, delay: number) : number; + export interface console { + debug (message: any) : void; + error (message: any) : void; + info (message: any) : void; + log (message: any) : void; + warn (message: any) : void; + } + export interface String { + format (formatString: string, value: string) : string; + format (formatString: string, value: number) : string; + formatCurrency (value: number) : string; + formatDate (date: Date, format?: string) : string; + formatDecimal (value: number, locale?: string, pattern?: string) : string; + formatTime (date: Date, format?: string) : string; + } + export interface JSON { + parse (text: string, reviver: (...args : any[]) => any) : any; + stringify (value: any, replacer?: (...args : any[]) => any, space?: number) : string; + stringify (value: any, replacer?: Array, space?: string) : string; + stringify (value: any, replacer?: Array, space?: number) : string; + stringify (value: any, replacer?: (...args : any[]) => any, space?: string) : string; + } +} + +declare class ServiceIntentOptions { + startMode : number; + url : string; +} + +declare class AcceptedCallbackArgs { + inbound : Ti.Network.Socket.TCP; + socket : Ti.Network.Socket.TCP; +} + +declare class HeadingData { + accuracy : number; + magneticHeading : number; + timestamp : number; + trueHeading : number; + x : number; + y : number; + z : number; +} + +declare class FacebookGraphResponsev1 { + error : string; + path : string; + result : string; + success : boolean; +} + +declare class textAreaSelectedParams { + length : number; + location : number; +} + +declare class ThumbnailResponse extends ErrorResponse { + image : Ti.Blob; + time : number; +} + +declare class Dimension { + height : number; + width : number; + x : number; + y : number; +} + +declare class ReadCallbackArgs extends ErrorResponse { + bytesProcessed : number; + errorDescription : string; + errorState : number; + source : Ti.IOStream; +} + +declare class CloudACLsCheckResponse extends CloudResponse { + permission : Dictionary; +} + +declare class ViewTemplate { + bindId : string; + childTemplates : Array; + events : Dictionary; + properties : Dictionary; + type : string; +} + +declare class CloudChatsResponse extends CloudResponse { + chats : Array>; +} + +declare class MediaQueryType { + albumArtist : any; + albumTitle : any; + artist : any; + composer : any; + genre : any; + grouping : number; + isCompilation : any; + mediaType : any; + title : any; +} + +declare class WebAPIError { + code : number; + message : string; + name : string; +} + +declare class DocumentViewerOptions { + animated : boolean; + view : Ti.UI.View; +} + +declare class ListViewAnimationProperties { + animated : boolean; + animationStyle : number; + position : number; +} + +declare class DataCallbackArgs { + address : string; + bytesData : Array; + port : string; + stringData : string; +} + +declare class CloudPushNotificationErrorArg { + error : string; +} + +declare class ScreenshotResult { + media : Ti.Blob; +} + +declare class YQLResponse extends ErrorResponse { + data : any; + message : string; +} + +declare class ForwardGeocodeResponse extends ErrorResponse { + accuracy : number; + address : string; + city : string; + country : string; + countryCode : string; + country_code : string; + displayAddress : string; + latitude : string; + longitude : string; + postalCode : string; + region1 : string; + region2 : string; + street : string; + street1 : string; +} + +declare class CloudEventsResponse extends CloudResponse { + events : Array>; +} + +declare class ErrorCallbackArgs { + errorCode : number; + socket : Ti.Network.Socket.TCP; +} + +declare enum FailureResponse { + +} + +declare class WriteCallbackArgs extends ErrorResponse { + bytesProcessed : number; + errorDescription : string; + errorState : number; + source : Ti.IOStream; +} + +declare class CloudPushNotificationSuccessArg { + deviceToken : string; +} + +declare class MapLocationType { + animate : boolean; + latitude : number; + latitudeDelta : number; + longitude : number; + longitudeDelta : number; + regionFit : boolean; +} + +declare class DecodeStringDict { + charset : string; + length : number; + position : number; + source : Ti.Buffer; +} + +declare class ListViewContentInsetOption { + animated : boolean; + duration : number; +} + +declare class CreateStreamArgs { + mode : number; + source : any; +} + +declare enum ContactsAuthorizationResponse { + +} + +declare class CloudCheckinsResponse extends CloudResponse { + checkins : Array>; +} + +declare class CreateBufferArgs { + byteOrder : number; + length : number; + type : string; + value : any; +} + +declare class CloudPushNotificationConfig { + error : (...args : any[]) => any; + success : (...args : any[]) => any; +} + +declare class CloudReviewsResponse extends CloudResponse { + reviews : Array>; +} + +declare class Point { + x : number; + y : number; +} + +declare class CloudPhotosResponse extends CloudResponse { + photos : Array>; +} + +declare class PushNotificationConfig { + callback : (...args : any[]) => any; + error : (...args : any[]) => any; + success : (...args : any[]) => any; + types : Array; +} + +declare class MapRouteType { + color : string; + name : string; + points : Array; + width : number; +} + +declare class AcceptDict { + error : (...args : any[]) => any; + timeout : number; +} + +declare class MediaQueryInfoType { + exact : boolean; + value : any; +} + +declare class PumpCallbackArgs extends ErrorResponse { + buffer : Ti.Buffer; + bytesProcessed : number; + errorDescription : string; + errorState : number; + source : Ti.IOStream; + totalBytesProcessed : number; +} + +declare class MusicLibraryOptionsType { + allowMultipleSelections : boolean; + animated : boolean; + autohide : boolean; + cancel : (...args : any[]) => any; + error : (...args : any[]) => any; + mediaTypes : any; + success : (...args : any[]) => any; +} + +declare class launchOptions { + launchOptionsLocationKey : boolean; + source : string; + url : string; +} + +declare class WriteStreamCallbackArgs extends ErrorResponse { + bytesProcessed : number; + errorDescription : string; + errorState : number; + fromStream : Ti.IOStream; + toStream : Ti.IOStream; +} + +declare class CloudChatGroupsResponse extends CloudResponse { + chat_groups : Array>; +} + +declare class CloudPhotoCollectionsPhotosResponse extends CloudResponse { + photos : Array>; +} + +declare class DecodeNumberDict { + byteOrder : number; + position : number; + source : Ti.Buffer; + type : string; +} + +declare class ConnectedCallbackArgs { + socket : Ti.Network.Socket.TCP; +} + +declare class CloudPhotoCollectionsResponse extends CloudResponse { + collections : Array>; +} + +declare class CloudObjectsResponse extends CloudResponse { + classname : Array>; +} + +declare class MediaScannerResponse { + path : string; + uri : string; +} + +declare class CloudPostsResponse extends CloudResponse { + posts : Array>; +} + +declare class CloudSocialIntegrationsResponse extends CloudResponse { + users : Array>; +} + +declare class CameraOptionsType { + allowEditing : boolean; + animated : boolean; + arrowDirection : number; + autohide : boolean; + cancel : (...args : any[]) => any; + error : (...args : any[]) => any; + inPopOver : boolean; + mediaTypes : Array; + overlay : Ti.UI.View; + popoverView : Ti.UI.View; + saveToPhotoGallery : boolean; + showControls : boolean; + success : (...args : any[]) => any; + transform : Ti.UI._2DMatrix; + videoMaximumDuration : number; + videoQuality : number; +} + +declare class ListViewIndexEntry { + index : number; + title : string; +} + +declare class CloudStreamProgress { + progress : number; + url : string; +} + +declare class MusicLibraryResponseType { + items : Array; + representative : Ti.Media.Item; + types : number; +} + +declare class CloudEventOccurrencesResponse extends CloudResponse { + event_occurrences : Array>; +} + +declare class CloudUsersResponse extends CloudResponse { + users : Array>; +} + +declare class TableViewContentInsetOption { + animated : boolean; + duration : number; +} + +declare class CloudFriendRequestsResponse extends CloudResponse { + friend_requests : Array>; +} + +declare class CloudACLsResponse extends CloudResponse { + acls : Array>; +} + +declare class ListViewMarkerProps { + itemIndex : number; + sectionIndex : number; +} + +declare class EventsAuthorizationResponse { + code : number; + error : string; + success : boolean; +} + +declare class PlayerQueue { + items : Array; +} + +declare class CoverFlowImageType { + height : number; + image : any; + width : number; +} + +declare class BroadcastIntentOptions { + action : string; + className : string; + data : string; + flags : number; + packageName : string; + url : string; +} + +declare class CloudUsersSecureResponse extends CloudResponse { + accessToken : string; + expiresIn : number; +} + +declare class CloudClientsResponse extends CloudResponse { + ip_address : string; + location : Dictionary; +} + +declare class PushNotificationErrorArg { + type : string; +} + +declare class CloudStatusesResponse extends CloudResponse { + statuses : Array>; +} + +declare class windowToolbarParam { + animated : boolean; + barColor : string; + tintColor : string; + translucent : boolean; +} + +declare class GeocodedAddress { + address : string; + city : string; + country : string; + countryCode : string; + country_code : string; + displayAddress : string; + latitude : string; + longitude : string; + postalCode : string; + region1 : string; + region2 : string; + street : string; + street1 : string; + zipcode : string; +} + +declare class ContactsCallbackArgs extends ErrorResponse { + data : Array; +} + +declare class zoomScaleOption { + animated : boolean; +} + +declare class LocationCoordinates { + accuracy : number; + altitude : number; + altitudeAccuracy : number; + heading : number; + latitude : number; + longitude : number; + speed : number; + timestamp : number; +} + +declare class ActivityResult { + intent : Ti.Android.Intent; + requestCode : number; + resultCode : number; +} + +declare class CloudUsersSecureDialog { + title : string; +} + +declare class CloudFriendsResponse extends CloudResponse { + users : Array>; +} + +declare class PhotoGalleryOptionsType { + allowEditing : boolean; + animated : boolean; + arrowDirection : number; + autohide : boolean; + cancel : (...args : any[]) => any; + error : (...args : any[]) => any; + mediaTypes : Array; + popoverView : Ti.UI.View; + success : (...args : any[]) => any; +} + +declare class NotificationParams { + alertAction : string; + alertBody : string; + alertLaunchImage : string; + badge : number; + date : Date; + repeat : string; + sound : string; + timezone : string; + userInfo : Dictionary; +} + +declare enum SuccessResponse { + +} + +declare class daysOfTheWeekDictionary { + daysOfWeek : number; + week : number; +} + +declare class Modules { + +} + +declare class hideStatusBarParams { + animated : boolean; + animationStyle : number; +} + +declare class ListDataItem { + properties : Dictionary; + template : any; +} + +declare class ItemTemplate { + childTemplates : Array; + events : Dictionary; + properties : Dictionary; +} + +declare class MovieSize { + height : number; + width : number; +} + +declare class CameraMediaItemType { + cropRect : CropRectType; + media : Ti.Blob; + mediaType : string; +} + +declare class HeadingResponse extends ErrorResponse { + heading : HeadingData; +} + +declare class ListViewEdgeInsets { + bottom : number; + left : number; + right : number; + top : number; +} + +declare enum CloudEmailsResponse { + +} + +declare class GradientColorRef { + color : string; + offset : number; +} + +declare class Font { + fontFamily : string; + fontSize : any; + fontStyle : string; + fontWeight : string; +} + +declare class CloudPlacesResponse extends CloudResponse { + places : Array>; +} + +declare class EncodeNumberDict { + byteOrder : number; + dest : Ti.Buffer; + position : number; + source : number; + type : string; +} + +declare class showContactsParams { + animated : boolean; + cancel : (...args : any[]) => any; + fields : Array; + selectedPerson : (...args : any[]) => any; + selectedProperty : (...args : any[]) => any; +} + +declare class LocationProviderDict { + accuracy : number; + name : string; + power : number; +} + +declare class FacebookDialogResponsev1 { + cancelled : boolean; + error : string; + result : string; + success : boolean; +} + +declare class CloudFilesResponse extends CloudResponse { + files : Array>; +} + +declare class hideParams { + animated : boolean; +} + +declare class openWindowParams { + activityEnterAnimation : number; + activityExitAnimation : number; + animated : boolean; + bottom : any; + fullscreen : boolean; + height : any; + left : any; + modal : boolean; + modalStyle : number; + modalTransitionStyle : number; + navBarHidden : boolean; + right : any; + top : any; + transition : number; + width : any; +} + +declare class Gradient { + backfillEnd : boolean; + backfillStart : boolean; + colors : any; + endPoint : Point; + endRadius : number; + startPoint : Point; + startRadius : number; + type : string; +} + +declare class showStatusBarParams { + animated : boolean; + animationStyle : number; +} + +declare class MapPointType { + latitude : number; + longitude : number; +} + +declare class CloudKeyValuesResponse extends CloudResponse { + keyvalues : Array>; +} + +declare class TableViewEdgeInsets { + bottom : number; + left : number; + right : number; + top : number; +} + +declare class ReverseGeocodeResponse extends ErrorResponse { + places : Array; +} + +declare class PushNotificationSuccessArg { + deviceToken : string; + type : string; +} + +declare class PushNotificationData { + data : Dictionary; + inBackground : boolean; +} + +declare class closeWindowParams { + activityEnterAnimation : number; + activityExitAnimation : number; + animated : boolean; +} + +declare class showParams { + animated : boolean; + rect : Dictionary; + view : Ti.UI.View; +} + +declare class PreviewImageError { + message : string; +} + +declare class CloudMessagesResponse extends CloudResponse { + messages : Array>; +} + +declare class ImageAsCroppedDict { + height : number; + width : number; + x : number; + y : number; +} + +declare class PreviewImageOptions { + error : (...args : any[]) => any; + image : Ti.Blob; + success : (...args : any[]) => any; +} + +declare class contentOffsetOption { + animated : boolean; +} + +declare class TableViewAnimationProperties { + animated : boolean; + animationStyle : number; + position : number; +} + +declare enum MediaAuthorizationResponse { + +} + +declare class EncodeStringDict { + charset : string; + dest : Ti.Buffer; + destPosition : number; + source : string; + sourceLength : number; + sourcePosition : number; +} \ No newline at end of file From e8e5de4c0b96cae8692aedadf1ec42a792a0eb65 Mon Sep 17 00:00:00 2001 From: "M@ McCray" Date: Sat, 12 Oct 2013 16:42:19 -0500 Subject: [PATCH 046/150] Added definitions for Giraffe (Backbone). --- README.md | 1 + giraffe/giraffe-tests.ts | 37 ++++++++++ giraffe/giraffe.d.ts | 143 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 giraffe/giraffe-tests.ts create mode 100644 giraffe/giraffe.d.ts diff --git a/README.md b/README.md index ef760fe8ae..1158e73389 100755 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ List of Definitions * [FPSMeter](http://darsa.in/fpsmeter/) (by [Aaron Lampros](https://github.com/alampros)) * [FullCalendar](http://arshaw.com/fullcalendar/) (by [Neil Stalker](https://github.com/nestalk)) * [Gamepad](http://www.w3.org/TR/gamepad/) (by [Kon](http://phyzkit.net/)) +* [Giraffe](https://github.com/barc/backbone.giraffe) (by [Matt McCray](https://github.com/darthapo)) * [glDatePicker](http://glad.github.com/glDatePicker/) (by [Dániel Tar](https://github.com/qcz)) * [GoJS](http://gojs.net/) (by [Barbara Duckworth](https://github.com/barbara42)) * [GreenSock Animation Platform (GSAP)](http://www.greensock.com/get-started-js/) (by [Robert S.](https://github.com/codeBelt)) diff --git a/giraffe/giraffe-tests.ts b/giraffe/giraffe-tests.ts new file mode 100644 index 0000000000..70365bb59b --- /dev/null +++ b/giraffe/giraffe-tests.ts @@ -0,0 +1,37 @@ +/// + +class User extends Giraffe.Model { +} + +class MainView extends Giraffe.View { + + constructor(options?) { + this.appEvents = { + 'startup': 'app_onStartup' + } + super(options) + } + + app_onStartup() { + + } + +} + +class MyApp extends Giraffe.App { + constructor() { + this.routes= { + '': 'home' + } + super() + } + + home() { + this.attach( new MainView ) + } + +} + +var app= new MyApp(); + +app.start(); \ No newline at end of file diff --git a/giraffe/giraffe.d.ts b/giraffe/giraffe.d.ts new file mode 100644 index 0000000000..d407556a22 --- /dev/null +++ b/giraffe/giraffe.d.ts @@ -0,0 +1,143 @@ +// Type definitions for Giraffe +// Project: https://github.com/barc/backbone.giraffe +// Definitions by: Matt McCray +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module Giraffe { + + interface GiraffeObject { + app: App; + appEvents?: StringMap; + dataEvents?: StringMap; + defaultOptions?: DefaultOptions; + + initialize?(); + beforeInitialize?(); + afterInitialize?(); + + dispose?(); + beforeDispose?(); + afterDispose?(); + } + + interface AttachmentOptions { + method?: string; + forceRender?: boolean; + suppressRender?: boolean; + } + + interface DefaultOptions { + disposeOnDetach?: boolean; + alwaysRender?: boolean; + saveScrollPosition?: boolean; + documentTitle?: string; + } + + interface AppMap { + [ cid:string ]: App; + } + interface ViewMap { + [ cid:string ]: View; + } + interface StringMap { + [ def:string ]: string; + } + + var app: App; + var apps: AppMap; + var defaultOptions: DefaultOptions; + var version: string; + var views: ViewMap; + + function bindAppEvents( instance:GiraffeObject ): GiraffeObject; + function bindDataEvents( instance:GiraffeObject ): GiraffeObject; + function bindEvent( context:Backbone.Events, target:Backbone.Events, event:any, callback:Function ); + function unbindEvent( context:Backbone.Events, target:Backbone.Events, event:any, callback:Function ); + function bindEventMap( context:Backbone.Events, target:Backbone.Events, eventMap:any ); + function unbindEventMap( context:Backbone.Events, target:Backbone.Events, eventMap:any ); + + function configure( instance:any, options?:any ); + function dispose( instance:GiraffeObject, ...args:any[] ): GiraffeObject; + function disposeThis( ...args:any[] ): GiraffeObject; + + function wrapFn( obj:any, name:string, before:Function, after:Function); + + class Collection extends Backbone.Collection implements GiraffeObject { + app: App; + model: Model; + } + + class Model extends Backbone.Model implements GiraffeObject { + app: App; + } + + class Router extends Backbone.Router implements GiraffeObject { + app: App; + namespace: string; + triggers: StringMap; + + cause( appEvent:string, ...args:any[] ); + isCaused( appEvent:string, ...args:any[] ): boolean; + getRoute( appEvent:string, ...args:any[] ): string; + + reload( url:string ); + } + + class View extends Backbone.View implements GiraffeObject { + app: App; + appEvents: StringMap; + children: View[]; + dataEvents: StringMap; + defaultOptions: DefaultOptions; + documentTitle: string; + parent: View; + template: any; + ui: StringMap; + + attachTo( el:any, options?:AttachmentOptions ): View; + attach( view:View, options?:AttachmentOptions ): View; + isAttached( el:any ): boolean; + + render( options?:any ): View; + beforeRender(); + afterRender(); + templateStrategy(): string; + serialize(): any; + + setParent( parent:View ): View; + + addChild( child:View ): View; + addChildren( children:View[] ): View; + removeChild( child:View, preserve?:boolean ): View; + removeChilren( preserve?:boolean ): View; + + detach( preserve?:boolean ): View; + detachChildren( preserve?:boolean ): View; + + invoke( method:string, ...args:any[] ); + + dispose(): View; + beforeDispose(): View; + afterDispose(): View; + + static detachByElement( el:any, preserve?:boolean ): View; + static getClosestView( el:any ): View; + static getByCid( cid:string ): View; + static to$El( el:any, parent?:any, allowParentMatch?:boolean ): JQuery; + static setDocumentEvents( events:string[], prefix?:string ): string[]; + static removeDocumentEvents( prefix?:string ); + static setDocumentEventPrefix( prefix?:string ); + static setTemplateStrategy( strategy:string, instance?:any ); + } + + class App extends View { + routes: StringMap; + + addInitializer( initializer:( options?:any, callback?:()=>void )=>void ): App; + + start( options?:any ): App; + } + +} From a7dc33cf25099adb8f71ed605164885f446f2aad Mon Sep 17 00:00:00 2001 From: "M@ McCray" Date: Sat, 12 Oct 2013 17:02:23 -0500 Subject: [PATCH 047/150] Typo fix. --- giraffe/giraffe.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giraffe/giraffe.d.ts b/giraffe/giraffe.d.ts index d407556a22..40363ef4e8 100644 --- a/giraffe/giraffe.d.ts +++ b/giraffe/giraffe.d.ts @@ -111,7 +111,7 @@ declare module Giraffe { addChild( child:View ): View; addChildren( children:View[] ): View; removeChild( child:View, preserve?:boolean ): View; - removeChilren( preserve?:boolean ): View; + removeChildren( preserve?:boolean ): View; detach( preserve?:boolean ): View; detachChildren( preserve?:boolean ): View; From 0f3f9615d16410a66008fb5878d490df73d71ad5 Mon Sep 17 00:00:00 2001 From: "M@ McCray" Date: Sat, 12 Oct 2013 19:53:49 -0500 Subject: [PATCH 048/150] Added Contrib module. --- giraffe/giraffe.d.ts | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/giraffe/giraffe.d.ts b/giraffe/giraffe.d.ts index 40363ef4e8..a0756e2d4b 100644 --- a/giraffe/giraffe.d.ts +++ b/giraffe/giraffe.d.ts @@ -140,4 +140,47 @@ declare module Giraffe { start( options?:any ): App; } + module Contrib { + + class Controller extends Backbone.Events implements GiraffeObject { + app: App; + } + + class CollectionView extends View { + + collection: Collection; + modelView: View; + modelViewArgs: any[]; + modelViewEl: any; + renderOnChange: boolean; + + findByModel( model:Model ): View; + addOne( model:Model ): View; + removeOne( model:Model ): View; + + static getDefaults( ctx:any ): any; + } + + class FastCollectionView extends View { + collection: Collection; + modelTemplate: any; + modelTemplateStrategy: string; + modelEl: any; + renderOnChange: boolean; + + modelSerialize(): any; + + addAll(): View; + addOne( model:Model ): View; + removeOne( model:Model ): View; + + removeByIndex( index:number ): View; + findElByModel( model:Model ): JQuery; + findElByIndex( index:number ): JQuery; + findModelByEl( el:any ): Model; + + static getDefaults( ctx:any ): any; + } + + } } From 01439dea04e419537bb44252f133c06977d9d85e Mon Sep 17 00:00:00 2001 From: "M@ McCray" Date: Sat, 12 Oct 2013 22:14:27 -0500 Subject: [PATCH 049/150] Updated Giraffe.View.setTemplateStrategy(). --- giraffe/giraffe.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giraffe/giraffe.d.ts b/giraffe/giraffe.d.ts index a0756e2d4b..24c41aa243 100644 --- a/giraffe/giraffe.d.ts +++ b/giraffe/giraffe.d.ts @@ -129,7 +129,7 @@ declare module Giraffe { static setDocumentEvents( events:string[], prefix?:string ): string[]; static removeDocumentEvents( prefix?:string ); static setDocumentEventPrefix( prefix?:string ); - static setTemplateStrategy( strategy:string, instance?:any ); + static setTemplateStrategy( strategy:any, instance?:any ); } class App extends View { From b03290184eab70db0ab4dce14662e7daa5dae27b Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Sun, 13 Oct 2013 15:11:26 -0400 Subject: [PATCH 050/150] Fix the typing of L.Icon.Default This wasn't quite right and the 'develop' branch of the TypeScript compiler no longer accepted the hacky typing. This should be the correct typing according to information from the TS team here: https://typescript.codeplex.com/workitem/132 --- leaflet/leaflet.d.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 4bb8bcbf1f..5cdc961bdf 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -1903,20 +1903,17 @@ declare module L { * Creates an icon instance with the given options. */ constructor(options: IconOptions); - - /** - * Default properties for newly constructed icons. - */ - public static Default : IconDefault; } - export class IconDefault extends Icon { - /** - * Creates an icon instance with default options. - */ - constructor(); + export module Icon { + export class Default extends Icon { + /** + * Creates an icon instance with default options. + */ + constructor(); - imagePath: string; + static imagePath: string; + } } export interface DivIconOptions { From 0df63c1ab39276a43ad98d0852ddf9342abc2cf8 Mon Sep 17 00:00:00 2001 From: Tiddo Langerak Date: Mon, 14 Oct 2013 14:46:58 +0200 Subject: [PATCH 051/150] Requirejs should also accepts an array for path values. According to https://github.com/jrburke/requirejs/wiki/Upgrading-to-RequireJS-2.0#wiki-pathsfallbacks requirejs also accepts arrays as path values. Therefore, the type of path values is changed from string to any. --- requirejs/require.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index b00c6b1cd3..75dfbe632d 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -72,7 +72,7 @@ interface RequireConfig { // Path mappings for module names not found directly under // baseUrl. - paths?: { [key: string]: string; }; + paths?: { [key: string]: any; }; // Dictionary of Shim's. // does not cover case of key->string[] From de3c44456b1c088f63af2513748e5c066f96912f Mon Sep 17 00:00:00 2001 From: vincenthome Date: Mon, 14 Oct 2013 14:50:15 -0400 Subject: [PATCH 052/150] Update durandal.d.ts missing the result* parameter --- durandal/durandal.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/durandal/durandal.d.ts b/durandal/durandal.d.ts index a8335413da..89417e3e51 100644 --- a/durandal/durandal.d.ts +++ b/durandal/durandal.d.ts @@ -960,7 +960,7 @@ declare module 'plugins/dialog' { * @param {object} obj The object whose dialog should be closed. * @param {object} result* The results to return back to the dialog caller after closing. */ - export function close(obj: any): void; + export function close(obj: any, ...result: any[]): void; /** * Shows a dialog. From b786b9a83b2d50c80648857c5c8ea7e1801c74e3 Mon Sep 17 00:00:00 2001 From: Theodore Brown Date: Mon, 14 Oct 2013 23:02:09 -0500 Subject: [PATCH 053/150] Updated jquery.pickadate to support v3.3.0 --- jquery.pickadate/jquery.pickadate-tests.ts | 16 ++++++++++++++-- jquery.pickadate/jquery.pickadate.d.ts | 6 ++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/jquery.pickadate/jquery.pickadate-tests.ts b/jquery.pickadate/jquery.pickadate-tests.ts index 75ceafd47b..f99d55ecc3 100644 --- a/jquery.pickadate/jquery.pickadate-tests.ts +++ b/jquery.pickadate/jquery.pickadate-tests.ts @@ -39,7 +39,8 @@ $('.datepicker').pickadate({ // Escape any "rule" characters with an exclamation mark (!). format: 'You selecte!d: dddd, dd mmm, yyyy', formatSubmit: 'yyyy/mm/dd', - hiddenSuffix: '--submit' + hiddenPrefix: 'prefix__', + hiddenSuffix: '__suffix' }); $('.datepicker').pickadate({ @@ -88,6 +89,13 @@ $('.datepicker').pickadate({ ] }); +$('.datepicker').pickadate({ + disable: [ + new Date(2013, 3, 13), + new Date(2013, 3, 29) + ] +}); + $('.datepicker').pickadate({ disable: [ true, @@ -140,7 +148,8 @@ $('.timepicker').pickatime({ format: 'T!ime selected: h:i a', formatLabel: 'h:i a', formatSubmit: 'HH:i', - hiddenSuffix: '--submit' + hiddenPrefix: 'prefix__', + hiddenSuffix: '__suffix' }); $('.timepicker').pickatime({ @@ -266,6 +275,9 @@ picker.get('disable'); picker.set('clear'); +// reset disabled dates +picker.set('disable', undefined); + // Using arrays formatted as [YEAR,MONTH,DATE]. picker.set('select', [2013, 3, 20]); diff --git a/jquery.pickadate/jquery.pickadate.d.ts b/jquery.pickadate/jquery.pickadate.d.ts index 7d9531ecd3..077ae15cde 100644 --- a/jquery.pickadate/jquery.pickadate.d.ts +++ b/jquery.pickadate/jquery.pickadate.d.ts @@ -1,4 +1,4 @@ -// Type definitions for pickadate.js 3.2.0 +// Type definitions for pickadate.js 3.3.0 // Project: https://github.com/amsul/pickadate.js // Definitions by: Theodore Brown // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -37,6 +37,7 @@ interface pickadateOptions extends pickerOptions { // Formats format?: string; // default 'd mmmm, yyyy' formatSubmit?: string; // e.g. 'yyyy/mm/dd' + hiddenPrefix?: string; // default undefined hiddenSuffix?: string; // default '_submit' // Dropdown selectors @@ -51,7 +52,7 @@ interface pickadateOptions extends pickerOptions { max?: any; // Disable dates - disable?: any[]; // arrays formatted as [YEAR,MONTH,DATE] or integers representing days of the week (from 1 to 7). Switch to whitelist by setting first item in collection to `true`. + disable?: any[]; // Date objects, arrays formatted as [YEAR,MONTH,DATE], or integers representing days of the week (from 1 to 7). Switch to whitelist by setting first item in collection to `true`. // Classes klass?: { @@ -119,6 +120,7 @@ interface pickatimeOptions extends pickerOptions { format?: string; // default 'h:i A' formatLabel?: any; formatSubmit?: string; + hiddenPrefix?: string; // default undefined hiddenSuffix?: string; // default '_submit' // Time intervals From a14182b018dfeafb39501fba13f1e1691477fef4 Mon Sep 17 00:00:00 2001 From: Tiddo Langerak Date: Tue, 15 Oct 2013 07:37:49 +0200 Subject: [PATCH 054/150] Added support for the CommonJS require call --- requirejs/require.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 75dfbe632d..2c7a1ca043 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -222,6 +222,13 @@ interface Require { * Configure require.js **/ config(config: RequireConfig): Require; + + /** + * CommonJS require call + * @param module Module to load + * @return The loaded module + */ + (module: string): any; /** * Start the main app logic. From 3abbf9314240e940868733b9739d985e50de6c66 Mon Sep 17 00:00:00 2001 From: Maksim Kozhukh Date: Tue, 15 Oct 2013 22:13:48 +0300 Subject: [PATCH 055/150] Incorrect references in tests are fixed --- dhtmlxgantt/dhtmlxgantt-test.ts | 2 +- dhtmlxscheduler/dhtmlxscheduler-test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dhtmlxgantt/dhtmlxgantt-test.ts b/dhtmlxgantt/dhtmlxgantt-test.ts index 00546bd0c3..0b491ce2bc 100644 --- a/dhtmlxgantt/dhtmlxgantt-test.ts +++ b/dhtmlxgantt/dhtmlxgantt-test.ts @@ -1,4 +1,4 @@ -/// +/// //date operations var start: Date = gantt.date.week_start(new Date()); diff --git a/dhtmlxscheduler/dhtmlxscheduler-test.ts b/dhtmlxscheduler/dhtmlxscheduler-test.ts index bfdef0863a..d526a1eaf3 100644 --- a/dhtmlxscheduler/dhtmlxscheduler-test.ts +++ b/dhtmlxscheduler/dhtmlxscheduler-test.ts @@ -1,4 +1,4 @@ -/// +/// //date operations var start: Date = scheduler.date.week_start(new Date()); From 366bad1e4d596cecab7dcaf3fda4e05ffb0d0280 Mon Sep 17 00:00:00 2001 From: Juan Tamayo Date: Tue, 15 Oct 2013 19:48:49 -0700 Subject: [PATCH 056/150] Add missing 'get' from Selection.datum --- d3/d3.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index a9684658b4..e97e12bf53 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -719,6 +719,7 @@ declare module D3 { datum: { (values: (data: any, index: number) => any): UpdateSelection; (values: any): UpdateSelection; + () : any; }; filter: { From 45455e42304209598b353f4a2dae7f69557f16d2 Mon Sep 17 00:00:00 2001 From: rsmithh Date: Wed, 16 Oct 2013 15:33:44 +0100 Subject: [PATCH 057/150] Add onMessageExternal to chrome.runtime --- chrome/chrome.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index a2faba4ac2..8b77c9617a 100644 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1494,6 +1494,7 @@ declare module chrome.runtime { var onInstalled: RuntimeInstalledEvent; var onSuspendCanceled: RuntimeSuspendCanceledEvent; var onMessage: RuntimeMessageEvent; + var onMessageExternal: RuntimeMessageEvent; var sendMessage:(req:any, cb:(resp:any)=>void)=>void; } From 14d5602a8655e14024610322e75989ea6c1db142 Mon Sep 17 00:00:00 2001 From: gandjustas Date: Thu, 17 Oct 2013 00:51:39 +0400 Subject: [PATCH 058/150] Added generic type parameters --- sharepoint/SharePoint.d.ts | 274 ++++++++++++++++++------------------- 1 file changed, 136 insertions(+), 138 deletions(-) diff --git a/sharepoint/SharePoint.d.ts b/sharepoint/SharePoint.d.ts index 00202da31b..366944cf12 100644 --- a/sharepoint/SharePoint.d.ts +++ b/sharepoint/SharePoint.d.ts @@ -28,8 +28,8 @@ declare module Sys { module UI { export class Control { } export class DomEvent { - static addHandler(element: HTMLElement, eventName: string, handler: (e: Event) => void ); - static removeHandler(element: HTMLElement, eventName: string, handler: (e: Event) => void ); + static addHandler(element: HTMLElement, eventName: string, handler: (e: Event) => void); + static removeHandler(element: HTMLElement, eventName: string, handler: (e: Event) => void); } } module Net { @@ -52,8 +52,8 @@ declare module Sys { invoke(): void; completed(args: Sys.EventArgs): void; - add_completed(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void ): void; - remove_completed(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void ): void; + add_completed(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void): void; + remove_completed(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void): void; } export class WebRequestExecutor { @@ -72,24 +72,24 @@ declare module Sys { getAllResponseHeaders(): string; getResponseHeader(key: string): string; } - + export class NetworkRequestEventArgs extends EventArgs { get_webRequest(): WebRequest; } - - + + export class WebRequestManager { static get_defaultExecutorType(): string; static set_defaultExecutorType(value: string): void; static get_defaultTimeout(): number; static set_defaultTimeout(value: number): void; - static executeRequest(request: WebRequest):void; - static add_completedRequest(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void ): void; - static remove_completedRequest(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void ): void; - static add_invokingRequest(handler: (executor: WebRequestExecutor, args: NetworkRequestEventArgs) => void ): void; - static remove_invokingRequest(handler: (executor: WebRequestExecutor, args: NetworkRequestEventArgs ) => void ): void; - } + static executeRequest(request: WebRequest): void; + static add_completedRequest(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void): void; + static remove_completedRequest(handler: (executor: WebRequestExecutor, args: Sys.EventArgs) => void): void; + static add_invokingRequest(handler: (executor: WebRequestExecutor, args: NetworkRequestEventArgs) => void): void; + static remove_invokingRequest(handler: (executor: WebRequestExecutor, args: NetworkRequestEventArgs) => void): void; + } export class WebServiceProxy { static invoke( @@ -97,14 +97,14 @@ declare module Sys { methodName: string, useGet?: boolean, params?: any, - onSuccess?: (result: string, eventArgs: EventArgs) => void , - onFailure?: (error: WebServiceError) => void , + onSuccess?: (result: string, eventArgs: EventArgs) => void, + onFailure?: (error: WebServiceError) => void, userContext?: any, timeout?: number, enableJsonp?: boolean, jsonpCallbackParameter?: string): WebRequest; } - + export class WebServiceError { get_errorObject(): any; get_exceptionType(): any; @@ -121,20 +121,20 @@ declare module Sys { } declare var $get: { (id: string): HTMLElement; }; -declare var $addHandler: { (element: HTMLElement, eventName: string, handler: (e: Event) => void ): void; }; -declare var $removeHandler: { (element: HTMLElement, eventName: string, handler: (e: Event) => void ): void; }; +declare var $addHandler: { (element: HTMLElement, eventName: string, handler: (e: Event) => void): void; }; +declare var $removeHandler: { (element: HTMLElement, eventName: string, handler: (e: Event) => void): void; }; declare module SP { export class SOD { static execute(fileName: string, functionName: string, ...args: any[]): void; - static executeFunc(fileName: string, typeName: string, fn: () => void ): void; + static executeFunc(fileName: string, typeName: string, fn: () => void): void; static executeOrDelayUntilEventNotified(func: Function, eventName: string): boolean; - static executeOrDelayUntilScriptLoaded(func: () => void , depScriptFileName: string): boolean; + static executeOrDelayUntilScriptLoaded(func: () => void, depScriptFileName: string): boolean; static notifyScriptLoadedAndExecuteWaitingJobs(scriptFileName: string): void; static notifyEventAndExecuteWaitingJobs(eventName: string, args?: any[]): void; static registerSod(fileName: string, url: string): void; static registerSodDep(fileName: string, dependentFileName: string): void; - static loadMultiple(keys: string[], fn: () => void , bSync?: boolean): void; + static loadMultiple(keys: string[], fn: () => void, bSync?: boolean): void; static delayUntilEventNotified(func: Function, eventName: string): void; static get_prefetch(): boolean; @@ -148,7 +148,7 @@ declare module SP { } /** Register function to rerun on partial update in MDS-enabled site.*/ -declare function RegisterModuleInit(scriptFileName: string, initFunc: () => void ): void; +declare function RegisterModuleInit(scriptFileName: string, initFunc: () => void): void; /** Provides access to url and query string parts.*/ declare class JSRequest { @@ -216,8 +216,8 @@ declare module SP { set_formDigestHandlingEnabled(value: boolean): void; get_iFrameSourceUrl(): string; set_iFrameSourceUrl(value: string): void; - executeAsync(requestInfo:RequestInfo): void; - attemptLogin(returnUrl:string, success: (response: ResponseInfo) => void , error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void): void; + executeAsync(requestInfo: RequestInfo): void; + attemptLogin(returnUrl: string, success: (response: ResponseInfo) => void, error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void): void; } export interface RequestInfo { @@ -257,13 +257,12 @@ declare module SP { createWebRequestExecutor(): ProxyWebRequestExecutor; } } -interface MQuery -{ +interface MQuery { (selector: string, context?: any): MQueryResultSetElements; (element: HTMLElement): MQueryResultSetElements; (object: MQueryResultSetElements): MQueryResultSetElements; (object: MQueryResultSet): MQueryResultSet; - (object: T): MQueryResultSet; + (object: T): MQueryResultSet; (elementArray: HTMLElement[]): MQueryResultSetElements; (array: T[]): MQueryResultSet; (): MQueryResultSet; @@ -292,7 +291,7 @@ interface MQuery isObject(obj: any): boolean; isEmptyObject(obj: any): boolean; - ready(callback: () => void ): void; + ready(callback: () => void): void; contains(container: HTMLElement, contained: HTMLElement): boolean; proxy(fn: (...args: any[]) => any, context: any, ...args: any[]): Function; @@ -330,21 +329,21 @@ interface MQuery data(element: HTMLElement, key: string): any; data(element: HTMLElement): any; - removeData(element: HTMLElement, name?: string): MQueryResultSet; + removeData(element: HTMLElement, name?: string): MQueryResultSetElements; hasData(element: HTMLElement): boolean; } -interface MQueryResultSetElements extends MQueryResultSet{ +interface MQueryResultSetElements extends MQueryResultSet { append(node: HTMLElement): MQueryResultSetElements; append(mQuerySet: MQueryResultSetElements): MQueryResultSetElements; append(html: string): MQueryResultSetElements; bind(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; unbind(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - trigger(eventType: string): MQueryResultSet; + trigger(eventType: string): MQueryResultSetElements; one(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; - detach(): MQueryResultSet; + detach(): MQueryResultSetElements; find(selector: string): MQueryResultSetElements; closest(selector: string, context?: any): MQueryResultSetElements; @@ -442,26 +441,26 @@ interface MQueryResultSetElements extends MQueryResultSet{ submit(): MQueryResultSetElements; submit(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; unload(): MQueryResultSetElements; - unload(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; + unload(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements; } -interface MQueryResultSet { +interface MQueryResultSet { [index: number]: T; contains(contained: T): boolean; - + filter(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): MQueryResultSet; - filter(fn: (elementOfArray: T) => boolean, context?: any): MQueryResultSet; + filter(fn: (elementOfArray: T) => boolean, context?: any): MQueryResultSet; every(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; every(fn: (elementOfArray: T) => boolean, context?: any): boolean; - + some(fn: (elementOfArray: T, indexInArray: number) => boolean, context?: any): boolean; some(fn: (elementOfArray: T) => boolean, context?: any): boolean; - + map(callback: (elementOfArray: T, indexInArray: number) => any): MQueryResultSet; map(callback: (elementOfArray: T) => any): MQueryResultSet; - + forEach(fn: (elementOfArray: T, indexInArray: number) => void, context?: any): void; forEach(fn: (elementOfArray: T) => void, context?: any): void; @@ -550,12 +549,12 @@ declare class CalloutAction { render(): void; isEnabled(): boolean; isVisible(): boolean; - set (options: CalloutActionOptions): void; + set(options: CalloutActionOptions): void; } declare class Callout { /** Sets options for the callout. Not all options can be changed for the callout after its creation. */ - set (options: CalloutOptions); + set(options: CalloutOptions); /** Adds event handler to the callout. @param eventName one of the following: "opened", "opening", "closing", "closed" */ addEventCallback(eventName: string, callback: (callout: Callout) => void); @@ -755,9 +754,8 @@ declare module SPClientTemplates { /** Returns string representation of a number that represents the current value for the "List Throttle Limit" web application setting. Only appears if Throttled property is true, i.e. the target lookup list is throttled. */ MaxQueryResult: string; - /** List of choices for this field. - For a lookup field, contains array of possible values pulled from the target lookup list. */ - Choices: string[]; + /** List of choices for this field. */ + Choices: { LookupId: number; LookupValue: string; }[]; /** Number of choices. Appears only for Lookup field. */ ChoiceCount: number; @@ -1321,13 +1319,13 @@ declare module SPClientTemplates { EnableVesioning: boolean; Id: string; }; - registerInitCallback(fieldname: string, callback: () => void ): void; - registerFocusCallback(fieldname: string, callback: () => void ): void; - registerValidationErrorCallback(fieldname: string, callback: (error: any) => void ): void; + registerInitCallback(fieldname: string, callback: () => void): void; + registerFocusCallback(fieldname: string, callback: () => void): void; + registerValidationErrorCallback(fieldname: string, callback: (error: any) => void): void; registerGetValueCallback(fieldname: string, callback: () => any): void; updateControlValue(fieldname: string, value: any): void; registerClientValidator(fieldname: string, validator: SPClientForms.ClientValidation.ValidatorSet): void; - registerHasValueChangedCallback(fieldname: string, callback: (eventArg?: any) => void ); + registerHasValueChangedCallback(fieldname: string, callback: (eventArg?: any) => void); } } @@ -1406,23 +1404,23 @@ declare module SPAnimation { GetDataIndex(attributeId: Attribute): number } - export class Object{ - constructor(animationID: ID, delay: number, element: HTMLElement, finalState: State, finishFunc?: (data: any) => void , data?: any); - constructor(animationID: ID, delay: number, element: HTMLElement[], finalState: State, finishFunc?: (data: any) => void , data?: any); + export class Object { + constructor(animationID: ID, delay: number, element: HTMLElement, finalState: State, finishFunc?: (data: any) => void, data?: any); + constructor(animationID: ID, delay: number, element: HTMLElement[], finalState: State, finishFunc?: (data: any) => void, data?: any); RunAnimation(): void; } } -declare module SPAnimationUtility{ +declare module SPAnimationUtility { export class BasicAnimator { - static FadeIn(element: HTMLElement, finishFunc?: (data: any) => void , data?: any): void; - static FadeOut (element: HTMLElement, finishFunc?: (data: any) => void , data?: any): void; - static Move(element: HTMLElement, posX:number, posY:number, finishFunc?: (data: any) => void , data?: any): void; - static StrikeThrough(element: HTMLElement, strikeThroughWidth: number, finishFunc?: (data: any) => void , data?: any): void; - static Resize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void , data?: any): void; - static CommonResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: (data: any) => void , data: any, animationId:SPAnimation.ID): void; - static QuickResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void , data?: any): void; - static ResizeContainerAndFillContent(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: () => void , fAddToEnd: boolean): void; + static FadeIn(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void; + static FadeOut(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void; + static Move(element: HTMLElement, posX: number, posY: number, finishFunc?: (data: any) => void, data?: any): void; + static StrikeThrough(element: HTMLElement, strikeThroughWidth: number, finishFunc?: (data: any) => void, data?: any): void; + static Resize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void, data?: any): void; + static CommonResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: (data: any) => void, data: any, animationId: SPAnimation.ID): void; + static QuickResize(element: HTMLElement, newHeight: number, newWidth: number, finishFunc?: (data: any) => void, data?: any): void; + static ResizeContainerAndFillContent(element: HTMLElement, newHeight: number, newWidth: number, finishFunc: () => void, fAddToEnd: boolean): void; static GetWindowScrollPosition(): { x: number; y: number; }; static GetLeftOffset(element: HTMLElement): number; static GetTopOffset(element: HTMLElement): number; @@ -1669,13 +1667,13 @@ declare module SP { get_expectedContentType(): string; set_expectedContentType(value: string): void; post(body: string): void; - get (): void; - static doPost(url: string, body: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void , failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; - static doGet(url: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void , failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; - add_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void ): void; - remove_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void ): void; - add_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; - remove_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void ): void; + get(): void; + static doPost(url: string, body: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void, failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; + static doGet(url: string, expectedContentType: string, succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void, failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; + add_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void): void; + remove_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void): void; + add_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; + remove_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void; constructor(); } export class ResResources { @@ -1929,10 +1927,10 @@ declare module SP { export class ClientRequest { static get_nextSequenceId(): number; get_webRequest(): Sys.Net.WebRequest; - add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; - remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; - add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; - remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; + add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; + remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; + add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; + remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; get_navigateWhenServerRedirect(): boolean; set_navigateWhenServerRedirect(value: boolean): void; } @@ -1967,18 +1965,18 @@ declare module SP { set_webRequestExecutorFactory(value: SP.IWebRequestExecutorFactory): void; get_pendingRequest(): SP.ClientRequest; get_hasPendingRequest(): boolean; - add_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void ): void; - remove_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void ): void; - add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; - remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; - add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; - remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; - add_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void ): void; - remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void ): void; + add_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void): void; + remove_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void): void; + add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; + remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; + add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; + remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; + add_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void; + remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void; get_requestTimeout(): number; set_requestTimeout(value: number): void; - executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void , failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void ): void; - executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void ): void; + executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void, failedCallback: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void; + executeQueryAsync(succeededCallback: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void; executeQueryAsync(): void; get_staticObjects(): any; castTo(obj: SP.ClientObject, type: any): SP.ClientObject; @@ -2249,8 +2247,8 @@ declare module SP { get_versionString(): string; } export class AppCatalog { - static getAppInstances(context: SP.ClientRuntimeContext, web: SP.Web): SP.ClientObjectList; - static getDeveloperSiteAppInstancesByIds(context: SP.ClientRuntimeContext, site: SP.Site, appInstanceIds: SP.Guid[]): SP.ClientObjectList; + static getAppInstances(context: SP.ClientRuntimeContext, web: SP.Web): SP.ClientObjectList; + static getDeveloperSiteAppInstancesByIds(context: SP.ClientRuntimeContext, site: SP.Site, appInstanceIds: SP.Guid[]): SP.ClientObjectList; static isAppSideloadingEnabled(context: SP.ClientRuntimeContext): SP.BooleanResult; } export class AppContextSite extends SP.ClientObject { @@ -2271,7 +2269,7 @@ declare module SP { get_status(): SP.AppInstanceStatus; get_title(): string; get_webId(): SP.Guid; - getErrorDetails(): SP.ClientObjectList; + getErrorDetails(): SP.ClientObjectList; uninstall(): SP.GuidResult; upgrade(appPackageStream: any[]): void; cancelAllJobs(): SP.BooleanResult; @@ -2357,7 +2355,7 @@ declare module SP { constructor(); } export class BasePermissions extends SP.ClientValueObject { - set (perm: SP.PermissionKind): void; + set(perm: SP.PermissionKind): void; clear(perm: SP.PermissionKind): void; clearAll(): void; has(perm: SP.PermissionKind): boolean; @@ -3686,7 +3684,7 @@ declare module SP { choiceField, minMaxField, textField, - } + } /** Represents an item or row in a list. */ export class ListItem extends SP.SecurableObject { get_fieldValues(): any; @@ -3921,7 +3919,7 @@ declare module SP { get_isSharedWithMany(): boolean; get_isSharedWithSecurityGroup(): boolean; get_pendingAccessRequestsLink(): string; - getSharedWithUsers(): SP.ClientObjectList; + getSharedWithUsers(): SP.ClientObjectList; static getListItemSharingInformation(context: SP.ClientRuntimeContext, listID: SP.Guid, itemID: number, excludeCurrentUser: boolean, excludeSiteAdmin: boolean, excludeSecurityGroups: boolean, retrieveAnonymousLinks: boolean, retrieveUserInfoDetails: boolean, checkForAccessRequests: boolean): SP.ObjectSharingInformation; static getWebSharingInformation(context: SP.ClientRuntimeContext, excludeCurrentUser: boolean, excludeSiteAdmin: boolean, excludeSecurityGroups: boolean, retrieveAnonymousLinks: boolean, retrieveUserInfoDetails: boolean, checkForAccessRequests: boolean): SP.ObjectSharingInformation; static getObjectSharingInformation(context: SP.ClientRuntimeContext, securableObject: SP.SecurableObject, excludeCurrentUser: boolean, excludeSiteAdmin: boolean, excludeSecurityGroups: boolean, retrieveAnonymousLinks: boolean, retrieveUserInfoDetails: boolean, checkForAccessRequests: boolean, retrievePermissionLevels: boolean): SP.ObjectSharingInformation; @@ -4120,7 +4118,7 @@ declare module SP { get_value(): string; static newObject(context: SP.ClientRuntimeContext): SP.RequestVariable; append(value: string): void; - set (value: string): void; + set(value: string): void; } export class RoleAssignment extends SP.ClientObject { get_member(): SP.Principal; @@ -4193,7 +4191,7 @@ declare module SP { editor, } export class ServerSettings { - static getAlternateUrls(context: SP.ClientRuntimeContext): SP.ClientObjectList; + static getAlternateUrls(context: SP.ClientRuntimeContext): SP.ClientObjectList; static getGlobalInstalledLanguages(context: SP.ClientRuntimeContext, compatibilityLevel: number): SP.Language[]; } export class Site extends SP.ClientObject { @@ -4644,7 +4642,7 @@ declare module SP { getAppBdcCatalog(): SP.BusinessData.AppBdcCatalog; getSubwebsForCurrentUser(query: SP.SubwebQuery): SP.WebCollection; getAppInstanceById(appInstanceId: SP.Guid): SP.AppInstance; - getAppInstancesByProductId(productId: SP.Guid): SP.ClientObjectList; + getAppInstancesByProductId(productId: SP.Guid): SP.ClientObjectList; loadAndInstallAppInSpecifiedLocale(appPackageStream: any[], installationLocaleLCID: number): SP.AppInstance; loadApp(appPackageStream: any[], installationLocaleLCID: number): SP.AppInstance; loadAndInstallApp(appPackageStream: any[]): SP.AppInstance; @@ -4813,8 +4811,8 @@ declare module SP { set_moreColorsPicker(value: SP.Application.UI.MoreColorsPicker): void; } export class ThemeWebPage extends Sys.UI.Control { - add_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void ): void; - remove_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void ): void; + add_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void): void; + remove_themeDisplayUpdated(value: (sender: any, e: Sys.EventArgs) => void): void; constructor(e: HTMLElement); initialize(): void; dispose(): void; @@ -5000,11 +4998,11 @@ declare module Microsoft.SharePoint.Client.Search { getQuerySuggestionsWithResults: (iNumberOfQuerySuggestions: number, - iNumberOfResultSuggestions: number, - fPreQuerySuggestions: boolean, - fHitHighlighting: boolean, - fCapitalizeFirstLetters: boolean, - fPrefixMatchAllTerms: boolean) => QuerySuggestionResults; + iNumberOfResultSuggestions: number, + fPreQuerySuggestions: boolean, + fHitHighlighting: boolean, + fCapitalizeFirstLetters: boolean, + fPrefixMatchAllTerms: boolean) => QuerySuggestionResults; } @@ -5050,15 +5048,15 @@ declare module Microsoft.SharePoint.Client.Search { executeQuery: (query: Query) => SP.JsonObjectResult; executeQueries: (queryIds: string[], queries: Query[], handleExceptions: boolean) => SP.JsonObjectResult; recordPageClick: ( - pageInfo: string, - clickType: string, - blockType: number, - clickedResultId: string, - subResultIndex: number, - immediacySourceId: string, - immediacyQueryString: string, - immediacyTitle: string, - immediacyUrl: string) => void; + pageInfo: string, + clickType: string, + blockType: number, + clickedResultId: string, + subResultIndex: number, + immediacySourceId: string, + immediacyQueryString: string, + immediacyTitle: string, + immediacyUrl: string) => void; exportPopularQueries: (web: SP.Web, sourceId: SP.Guid) => SP.JsonObjectResult; } @@ -5364,14 +5362,14 @@ declare module Microsoft.SharePoint.Client.Search { export class DocumentCrawlLog extends SP.ClientObject { constructor(context: SP.ClientContext, site: SP.Site); getCrawledUrls: (getCountOnly: boolean, - maxRows: { High: number; Low: number; }, - queryString: string, - isLike: boolean, - contentSourceID: number, - errorLevel: number, - errorID: number, - startDateTime: Date, - endDateTime: Date) => SP.JsonObjectResult; + maxRows: { High: number; Low: number; }, + queryString: string, + isLike: boolean, + contentSourceID: number, + errorLevel: number, + errorID: number, + startDateTime: Date, + endDateTime: Date) => SP.JsonObjectResult; } export class SearchObjectOwner extends SP.ClientObject { @@ -6105,7 +6103,7 @@ declare module SP { set_newerThan(value: string): string; get_olderThan(): string; set_olderThan(value: string): string; - get_sortOrder():SocialFeedSortOrder; + get_sortOrder(): SocialFeedSortOrder; set_sortOrder(value: SocialFeedSortOrder): SocialFeedSortOrder; } @@ -6727,7 +6725,7 @@ declare module SP { get_selectedEntities(): any; set_selectedEntities(value: any): void; get_callback(): (sender: any, e: Sys.EventArgs) => void; - set_callback(value: (sender: any, e: Sys.EventArgs) => void ): void; + set_callback(value: (sender: any, e: Sys.EventArgs) => void): void; get_scopeKey(): string; get_componentType(): SP.UI.ApplicationPages.SelectorType; revertTo(ent: SP.UI.ApplicationPages.ResolveEntity): void; @@ -6745,7 +6743,7 @@ declare module SP { static instance(): SP.UI.ApplicationPages.CalendarSelector; registerSelector(selector: SP.UI.ApplicationPages.ISelectorComponent): void; getSelector(type: SP.UI.ApplicationPages.SelectorType, scopeKey: string): SP.UI.ApplicationPages.ISelectorComponent; - addHandler(scopeKey: string, people: boolean, resource: boolean, handler: (sender: any, selection: SP.UI.ApplicationPages.SelectorSelectionEventArgs) => void ): void; + addHandler(scopeKey: string, people: boolean, resource: boolean, handler: (sender: any, selection: SP.UI.ApplicationPages.SelectorSelectionEventArgs) => void): void; revertTo(scopeKey: string, ent: SP.UI.ApplicationPages.ResolveEntity): void; removeEntity(scopeKey: string, ent: SP.UI.ApplicationPages.ResolveEntity): void; constructor(); @@ -6757,7 +6755,7 @@ declare module SP { get_selectedEntities(): any; set_selectedEntities(value: any): void; get_callback(): (sender: any, e: Sys.EventArgs) => void; - set_callback(value: (sender: any, e: Sys.EventArgs) => void ): void; + set_callback(value: (sender: any, e: Sys.EventArgs) => void): void; revertTo(ent: SP.UI.ApplicationPages.ResolveEntity): void; removeEntity(ent: SP.UI.ApplicationPages.ResolveEntity): void; setEntity(ent: SP.UI.ApplicationPages.ResolveEntity): void; @@ -6889,8 +6887,8 @@ declare module SP { OnNotificationCountChanged, } export class SPNotification { - constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string, onclickHandler: () => void , extraData: any); - constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string, onclickHandler: () => void ); + constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string, onclickHandler: () => void, extraData: any); + constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string, onclickHandler: () => void); constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean, strTooltip: string); constructor(containerId: SP.UI.ContainerID, strHtml: string, bSticky: boolean); constructor(containerId: SP.UI.ContainerID, strHtml: string); @@ -6915,8 +6913,8 @@ declare module SP { constructor(); } export class Workspace { - static add_resized(handler: () => void ): void; - static remove_resized(handler: () => void ): void; + static add_resized(handler: () => void): void; + static remove_resized(handler: () => void): void; } export class Menu { static create(id: string): SP.UI.Menu; @@ -7134,7 +7132,7 @@ declare module SP { /** Gets suggestions for who the current user might want to follow. Note: The recommended API to use for this task is SocialFollowingManager.getSuggestions. Returns list of PersonProperties objects */ - getMySuggestions(): SP.ClientObjectList; + getMySuggestions(): SP.ClientObjectList; /** Removes the specified user from the user's list of suggested people to follow. */ hideSuggestion(accountName: string): void; follow(accountName: string): void; @@ -7146,10 +7144,10 @@ declare module SP { @param tagId GUID of the tag to stop following. */ stopFollowingTag(tagId: string): void; amIFollowing(accountName: string): SP.BooleanResult; - getPeopleFollowedByMe(): SP.ClientObjectList; - getPeopleFollowedBy(accountName: string): SP.ClientObjectList; - getMyFollowers(): SP.ClientObjectList; - getFollowersFor(accountName: string): SP.ClientObjectList; + getPeopleFollowedByMe(): SP.ClientObjectList; + getPeopleFollowedBy(accountName: string): SP.ClientObjectList; + getMyFollowers(): SP.ClientObjectList; + getFollowersFor(accountName: string): SP.ClientObjectList; amIFollowedBy(accountName: string): SP.BooleanResult; /** Uploads and sets the user profile picture. Pictures in bmp, jpg and png formats and up to 5,000,000 bytes are supported. @@ -7502,7 +7500,7 @@ declare module SP { static getLayoutsPageUrl(pageName: string): string; static getImageUrl(imageName: string): string; static createWikiPageInContextWeb(context: SP.ClientRuntimeContext, parameters: SP.Utilities.WikiPageCreationInformation): SP.File; - static localizeWebPartGallery(context: SP.ClientRuntimeContext, items: SP.ListItemCollection): SP.ClientObjectList; + static localizeWebPartGallery(context: SP.ClientRuntimeContext, items: SP.ListItemCollection): SP.ClientObjectList; static getAppLicenseInformation(context: SP.ClientRuntimeContext, productId: SP.Guid): SP.AppLicenseCollection; static importAppLicense(context: SP.ClientRuntimeContext, licenseTokenToImport: string, contentMarket: string, billingMarket: string, appName: string, iconUrl: string, providerName: string, appSubtype: number): void; static getAppLicenseDeploymentId(context: SP.ClientRuntimeContext): SP.GuidResult; @@ -7638,7 +7636,7 @@ declare module SP { toString(): string; } } - + export module DateTimeUtil { export class SimpleDate { construction(year: number, month: number, day: number, era: number); @@ -8116,12 +8114,12 @@ declare module SP.WorkflowServices { } -declare class SPClientAutoFill{ - static MenuOptionType : { +declare class SPClientAutoFill { + static MenuOptionType: { Option: number; Footer: number; Separator: number; - Loading:number; + Loading: number; } static KeyProperty: string; //= 'AutoFillKey'; @@ -8134,7 +8132,7 @@ declare class SPClientAutoFill{ static GetAutoFillObjFromContainer(elmChild: HTMLElement): SPClientAutoFill; static GetAutoFillMenuItemFromOption(elmChild: HTMLElement): HTMLElement; - constructor(elmTextId: string, elmContainerId: string, fnPopulateAutoFill: (targetElement: HTMLInputElement) => void ); + constructor(elmTextId: string, elmContainerId: string, fnPopulateAutoFill: (targetElement: HTMLInputElement) => void); public TextElementId: string; public AutoFillContainerId: string; public AutoFillMenuId: string; @@ -8145,16 +8143,16 @@ declare class SPClientAutoFill{ public AutoFillCallbackTimeoutID: string; public FuncOnAutoFillClose: (elmTextId: string, ojData: ISPClientAutoFillData) => void; public FuncPopulateAutoFill: (targetElement: HTMLElement) => void; - public AllOptionData: { [key:string]: ISPClientAutoFillData }; + public AllOptionData: { [key: string]: ISPClientAutoFillData }; - PopulateAutoFill(jsonObjSuggestions: ISPClientAutoFillData[], fnOnAutoFillCloseFuncName: (elmTextId: string, objData:ISPClientAutoFillData) => void ): void; + PopulateAutoFill(jsonObjSuggestions: ISPClientAutoFillData[], fnOnAutoFillCloseFuncName: (elmTextId: string, objData: ISPClientAutoFillData) => void): void; IsAutoFillOpen(): boolean; SetAutoFillHeight(): void; - SelectAutoFillOption(elemOption:HTMLElement): void; - FocusAutoFill() :void; + SelectAutoFillOption(elemOption: HTMLElement): void; + FocusAutoFill(): void; BlurAutoFill(): void; CloseAutoFill(ojData: ISPClientAutoFillData): void; - UpdateAutoFillMenuFocus(bMoveNextLink:boolean): void; + UpdateAutoFillMenuFocus(bMoveNextLink: boolean): void; UpdateAutoFillPosition(): void; } From 8c58256dc7186214ed54449d1d2644614df8d618 Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Thu, 17 Oct 2013 14:36:13 +0100 Subject: [PATCH 059/150] Set viewValue to any everywhere Documentation states `viewValue` and `modelValue` to be a string but other types do work and it's common to use them. --- angularjs/angular.d.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 1a93d41f70..be2465ff74 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -150,14 +150,11 @@ declare module ng { interface INgModelController { $render(): void; $setValidity(validationErrorKey: string, isValid: boolean): void; - $setViewValue(value: string): void; - - // XXX Not sure about the types here. Documentation states it's a string, but - // I've seen it receiving other types throughout the code. - // Falling back to any for now. + // Documentation states viewValue and modelValue to be a string but other + // types do work and it's common to use them. + $setViewValue(value: any): void; $viewValue: any; - // XXX Same as avove $modelValue: any; $parsers: IModelParser[]; From b1a5a5581eeb2ee28fb07a0fc9a9bb6941647082 Mon Sep 17 00:00:00 2001 From: Matthew James Davis Date: Thu, 17 Oct 2013 10:29:51 -0400 Subject: [PATCH 060/150] added mapsjs --- mapsjs/mapsjs.d.ts | 2547 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2547 insertions(+) create mode 100644 mapsjs/mapsjs.d.ts diff --git a/mapsjs/mapsjs.d.ts b/mapsjs/mapsjs.d.ts new file mode 100644 index 0000000000..fe388425c2 --- /dev/null +++ b/mapsjs/mapsjs.d.ts @@ -0,0 +1,2547 @@ +/** + * Mapsjs 9.6.0 Copyright (c) 2013 ISC. All Rights Reserved. +*/ + +declare module 'mapsjs' { + + export function clusterPoints(options: { + data: {}[]; + pointKey: string; + valueFunction?: (row: any) => number; + radiusFunction: (row: any) => number; + aggregateFunction?: (srcRow: any, cmpRow: any, aggRow: any) => void; + mapUnitsPerPixel: number; + marginPixels?: number; + }): {}[]; + + /** + * This is a desc of envelope export function. + * @class + * @classdesc This is a description of the envelope class. + */ + export class envelope { + + constructor(minX: number, minY: number, maxX: number, maxY: number); + + /** + * Gets the minX of the envelope. + * @returns {number} The minimum x value + */ + getMinX(): number; + + /** + * Gets the minY of the envelope + * @returns {number} The minimum y value + */ + getMinY(): number; + + /** + * Gets the maxX of the envelope + * @returns {number} The maximum x value + */ + getMaxX(): number; + + /** + * Gets the maxY of the envelope + * @returns {number} The maximum y value + */ + getMaxY(): number; + + /** + * Create a new envelope from this as deep copy + * @returns {envelope} - a new envelope + */ + clone(): envelope; + + /** + * Create a new envelope from this one plus x and y margins. + * @param {number} marginX - the x margin + * @param {number} marginY - the y margin + * @returns {envelope} - a new envelope + */ + createFromMargins(marginX: number, marginY: number): envelope; + + /** + * Create a new envelope from this one number plus bleed ratio + * @param {number} bleed - the number bleed + * @returns {envelope} a new envelope + */ + createFromBleed(bleed: number): envelope; + + /** + * Gets the center point of the envelope + * @returns {point} - center as point + */ + getCenter(): point; + + /** + * Gets the width of the envelope + * @returns {number} value of width + */ + getWidth(): number; + + /** + * Gets height of the envelope + * @returns {number} value of height + */ + getHeight(): number; + + /** + * Gets area of the envelope + * @return {number} value of area + */ + getArea(): number; + + /** + * Returns associative array of this + * Returns value of minX + * Returns value of minY + * Returns value of maxX + * Returns value of maxY + * @returns {object} values of associative array + */ + toObject(): envObject; + + /** + * Gets UL coordinate of this envelope + * @returns {point} - a new point + */ + getUL(): point; + + /** + * Gets UR of this envelope + *@returns {point} - a new point + */ + getUR(): point; + + /** + * Gets LL of this envelope + * @returns {point} - a new point + */ + getLL(): point; + + /** + * Gets LR of this envelope + * @returns {point} - a new point + */ + getLR(): point; + + /** + * Gets the aspect of the envelope plus width, height + * @returns {number} - numeric ratio + */ + getAspect(): number; + + /** + * tests for identical envelope as this + * @param {envelope} env - tests envelope + * @return {boolean} - envelope match is true, otherwise false + */ + equals(env: envelope): boolean; + + /** + * Create string of this + * @returns {string} - string in the form: [minx],[miny],[maxx],[maxy] + */ + toString(): string; + + /** + * Create geometry of this envelope. The polygon returned is closed + * @returns {geometry} - a new geometry + */ + toGeometry(): geometry; + + /** + * Tests function for point within this envelope + * @param {point} - test point + * @returns {boolean} point contained is true, otherwise false + */ + contains(pt: point): boolean; + } + /** + * @module my/envelope + */ + export module envelope { + + /** + * Creates a new MapDotNet xml envelope by Static function + * @param {string} xml - an xml string of envelope + * @returns {envelope} - a new envelope + */ + export function createFromMdnXml(xml: string): envelope; + + /** + * creates new envelope from two points using static function + * @param {point} pt1 - corner point + * @param {point} pt2 - opposite corner point + * @returns {envelope} a new envelope + */ + export function createFromPoints(pt1: point, pt2: point): envelope; + + /** + * static function creates new x and y center points envelope plus y and x margins + * @param {number} centerX - the center x as float + * @param {number} centerY - the center y as float + * @param {number} marginX - the margin x from center as float + * @param {number} marginY - the margin y from center as float + * @returns {envelope} a new envelope + */ + export function createFromCenterAndMargins(centerPtX: number, centerPtY: number, marginX: number, marginY: number): envelope; + + /** + * static functions tests intersection of two envelopes + * @param {envelope} envelope 1 - envelope 1 test + * @param {envelope} envelope 2 - envelope 2 test + * @returns {boolean} intersecting envelopes are true, otherwise false + */ + export function intersects(env1: envelope, env2: envelope): boolean; + + /** + * static function creates two-envelope union + * @param {envelope} envelope 1 - envelope 1 + * @param {envelope} envelope 2 - evelope 2 + * @returns {envelope} a new envelope as union of supplied envelopes + */ + export function union(env1: envelope, env2: envelope): envelope; + } + /** + * Constructor creates a geometry which can represent a point, line, polygon, + * mulitpoint, multilinestring. + * This is a desc of geometry export class. + * @class + * @classdesc This is a description of the geometry class. + * @param {boolean} isPath - is this a path (true if path or false for set of + * points) + * @param {boolean} isClosed - is this a closed path (true or false) + * @returns {geometry} a new geometry + */ + export class geometry { + constructor(isPath?: boolean, isClosed?: boolean); + + /** + * Creates a new polygon or polyline form the geometry according to whether the + * geometry is closed. + * @returns {geometry} a new geometry + */ + factoryPoly(): any; + + /** + * Creates a deep copy of this geometry + * @returns {geometry} a new geometry + */ + clone(): geometry; + + /** + * Iterates every vertex in the geometry and passes to the supplied action. Return true on the action to abort. + * @param {action} - must be a function with the signature action(setIdx, idx, x, y) + */ + foreachVertex(action: (setIdx: number, idx: number, x: number, y: number, s: number[]) => void): void; + + /** + * Returns geometry bounding box + * @returns {envelope} a new envelope + */ + getBounds(): envelope; + + /** + * Returns whether this geometory is a path or points + * Returns this geometry as path or point + * @returns {boolean} a path is true, collection of points is false + */ + getIsPath(): boolean; + + /** + * Returns whether this geometry is closed + * @returns {boolean} closed path is true, otherwise false + */ + getIsClosed(): boolean; + + /** + *Gets number of sets in this geometry + * @returns {number} number of sets as integer + */ + getSetCount(): number; + + /** + * Gets set by its index. Note: for polygons, first set is primary ring and subsequent + * ones are holes. + * @param {number} idx - option index of set to return as an integer; if not provided, + * returns as last set. + * @returns {number} a set as an array of points in the form [x1,y1,x2,y2, ... xn,yn] + */ + getSet(idx: number): number[]; + + /** + * Pushes set onto geometry end + * @param {number} s - set as an array of points in the form [x1,y1,x2,y2, ... xn, yn] to push + */ + pushSet(s: number[]): void; + + /** + * Pops set off end of geometry + * @returns {number} set popped as an array of points in the form [x1,y1,x2,y2, ... xn, yn] + */ + popSet(): number[]; + + /** + * Creates SVG path data string from this + * @returns {geometry} string of SVG path or null if not a path + */ + toSvgPathData(): string; + + /** + * Adds point onto last set in geometry. If geometry is empty, + * automatically creates set to add to. + * @param {point} pt - a point to add + * @returns {number} {setIdx: [0-based index of set the point was added to] , idx: [the 0- + * based index of the x-coord added]} + */ + addPointToLastSet(pt: point): { setIdx: number; idx: number; }; + + /** + * Tests for validity of get. At least one path + * with two verticies plus at least one ring with at least + * three vertices. + * Returns true if it is a point collection + * @returns {geometry} valid geometry is true, otherwise false. + */ + isValid(): boolean; + + /** + * Create wkt string from [this] + * @returns {string} a string of wkt + */ + toString(): string; + + toWkt(): string; + + /** + * Finds vertex of geometry nearest to the given point + * @param {point} pt - point of the reference point + * @returns {number|point} an associated array closestVertex with: + * - closestVertex.setIdx, index of the set the vertex is in + * - closestVertex.ptIdx, index of the point of vertex in set + * - closestVertext.pt, pt of the vertex + *- closestVertex.distance, distance of vertex to reference point in projected units + */ + findNearestVertex(pt: point): { setIdx: number; ptIdx: number; pt: point; distance: number; }; + + /** + * Finds point along boundary of geometry nearest to the given point + * @param {point} point of the reference point + * @param {boolean} close - closest point + * @returns {number|point} associated array closestPoint with: + * - closestPoint.setIdx, index of the set the point is in + * - closestPoint.ptIdx, index of the first point of the segment which the point is in + * - closestPoint.pt, pt of the point + * - closestPoint.distance, distance of the point to the reference point in projected units + */ + findNearestSegment(pt: point, close?: boolean): { setIdx: number; ptIdx: number; pt: point; distance: number; }; + + /** + * Finds coordinates in map units of midpoint of geometry + * @param {number} idx - optional index of line to find labeling point for; + if not provided, returns labeling point of last line. + * @returns {point} coordinates of midpoint of line as a point + */ + getLabelingPoint(idx?: number): point; + + /** + * Determines whether geometry contains a point + * @param {point} pt - a point to contain + * @returns {boolean} If contains point is true, otherwise false + */ + contains(pt: point): boolean; + } + + /** @module my/geometry */ + export module geometry { + + /** + * This is a desc of polyline extends geometry class. + * @class + * @classdesc This is a description of the geometry class. + */ + class polyline extends geometry { + constructor(geom: geometry); + + /** + * Gets geometry in a polyline + * @returns {geometry} a geometry + */ + getGeometry(): geometry; + + /** + * Creates deep copy polyline object of underlying geometry + * @returns {polyline} - a new geometry + */ + clone(): polyline; + + /** + * Gets number of lines in polyline + * @returns {number} - lines as integer + */ + getLineCount(): number; + + /** + * Gets line in polyline by its index + * @para {number} idx - option index of line to return as an integer; + * if not provided, returns last line + * @returns {number[]} a line as an array of x and y points in the form + */ + getLine(idx: number): number[]; + + /** + * Pushes line onto polyline end + * @param {number[]} s - a line as an array of y and y points to push + */ + pushLine(s: number[]): void; + + + popLine(): number[]; + + /** + * Calculates the line distance in a polyline according to projected map cooordinates + * @param {number} idx - options index of line to calculate the distance of an integer; if not provided, returns distance of last line + * @returns lenth in projected units in meters of distance of polyline + */ + getProjectedDistance(idx: number): number; + + /** + * Calculates distance of a line in polyline from actual distance measurements + * @param {number} idx - options index of line to calculate distance of an integer; if not provided, returns distance of the last line + * @returns {number} length in meters of polyline distance + */ + getActualDistance(idx: number): number; + + /** + * Determines polyline intersection of another geom + * @param {geometry} geom - geometry to test against + * @returns {boolean} intersection is true, otherwise false + */ + intersects(geom: geometry): boolean; + } + + /** + * This is a desc of polygon extends geometry class. + * @class + * @classdesc This is a description of the polygon extends geometry class. + */ + class polygon extends geometry { + constructor(geom: geometry); + + /** + * Returns geometry of the polygon + * @returns {geometry} a geometry + */ + getGeometry(): geometry; + + /** + * Creates new polygon object from deep copy of underlying geometry + * @returns {geometry} - a new geometry + */ + clone(): polygon; + + /** + * Gets polygon ring number + * @returns {number} - a ring integer number + */ + getRingCount(): number; + + /** + * Gets polygon ring by its index. Primary ring is first and subsequent ones are holes. + * @param {number} idx - option ring index to return as integer, if not provided, returns last set + * @returns {number[]} array of x and y points in ring + */ + getRing(idx: number): number[]; + + /** + * Pushes ring onto polygon end + * @param {number[]} s - array of x and y points in the form to push in ring + */ + pushRing(s: number[]): void; + + /** + * Pops ring of end of polygon + * @returns {number[]} popped ring as array of x and y point in the form + */ + popRing(): number[]; + + /** + * Calculates polyline line distance from projected map coord + * @param {number} idx - option line index to calculate distance as integer; if not provided, returns distance of last line + * @returns {number} polyline distence length in projected meters + */ + getProjectedArea(idx: number): number; + + /** + * Calculates polygon ring perimeter from projected map coord + * @param {number} idx - option index to get projected perimeter of ring. + * @returns {number} distance in projected meters of polygon perimeter + */ + getProjectedPerimeter(idx: number): number; + + /** + * Calculates polygon ring are from actual distance measurements + * @param {number} idx - option index to get ring perimeter. + * @returns {number} polygon area in square meters + */ + getActualArea(idx: number): number; + + /** + * Calculates polygon ring perimeter from actual distance measurements + * @param {number} idx - option index to get actual ring perimeter. + * @returns {number} polygon perimeter distance in meters + */ + getActualPerimeter(idx: number): number; + + /** + * Determines polygon intersection of another geometry + * @param {geometry} geom - geometry to test against + * @returns {boolean} intersection is true, otherwise false + */ + intersects(geom: geometry): boolean; + + /** + * Determines overlapping of polygons. + * @param {polygon} poly - polygon to test against + * @returns {boolean} overlap is true, otherwise false + */ + overlaps(poly: polygon): boolean; + } + + export module polygon { + + /** + * Create MultiPolygon from [this]. + * @returns {polygon} a new multiPolygon + */ + export function toMultiPolygon(): polygon[]; + } + } + /** + * Constructor creates a geometry style. + * This is a desc of geometryStyle export class. + * @class + * @classdesc This is a description of the geometry class. + * @returns {geometry} a new geometryStyle + */ + export class geometryStyle { + constructor(); + + /** + * Gets path outline thickness in pixels. + * @returns {number} thickness as numeric + */ + getOutlineThicknessPix(): number; + + /** + * Sets path outline thickness in pixels. + * @param {number} t - thickness as a numeric + */ + setOutlineThicknessPix(t: number): void; + + /** + * Gets path outline color as css style string + * @returns {string} outline color as string + */ + getOutlineColor(): string; + + /** + * Sets path outline color as css style string. + * @param {string} c - outline color as string + */ + setOutlineColor(t: string): void; + + /** + * Gets path outline opacity from 0 to 1. + * @returns {number} outline opacity as numeric + */ + getOutlineOpacity(): number; + + /** + * Set path outline opacity from 0 to 1. + * @param {number} o - outline opacity as numeric + */ + setOutlineOpacity(o: number): void; + + /** + * Gets path fill color as css style string + * @returns {string} fill color as string + */ + getFillColor(): string; + + /** + * Set path fill color as css style string. + * @param {string} c - fill color as string + */ + setFillColor(c: string): void; + + /** + * Gets path fill opacity from 0 to 1. + *@returns {number} fill opacity as numeric + */ + getFillOpacity(): number; + + /** + * Sets path fill opacity from 0 to 1 + * @param {number} o - fill opacity as numeric + */ + setFillOpacity(o: number): void; + + /** + * Gets dash array string for path + * @returns {string} a dash array as a string (defaults to null [solid stroke]) + */ + getDashArray(): string; + + /** + * Sets dash array string for path + * @param {string} da - CSS dash array as a string + */ + setDashArray(da: string): void; + } + /** + * Executes the license + * @returns {string} a license + */ + export var license: string; + /** + * This is a desc of point export class. + * @class + * @classdesc This is a description of the point class. + export class point { + + constructor(x: number, y: number); + + /** + * Returns x coord as float + * @returns {number} x coord as a float + */ + getX(): number; + + /** + * Returns y coord as float + * @returns {number} - a y coord as a float + */ + getY(): number; + + /** + * Converts point object to associative arry with x and y property names + * @returns {pointObject} - an associative array with x and y property names + */ + toProps(): pointObject; + + /** + * Test for matching locations of supplied point and [this] + * @param {point} pt - point to test + * @returns {boolean} - matching points is true, otherwise false + */ + equals(pt: point): boolean; + + /** + * Creates new point from [this] offset by supplied x and y deltas. + * @param {number} dx - x coord offset as float + * @param {number} dy - y coord offset as float + * @returns {point} a new point offset + */ + createOffsetBy(dx: number, dy: number): point; + + /** + * Creates new n-sided polygon from this point + * @param {number} sides - number of polygon sides + * @param {number} radius - distance to polygon vertices + * @returns {geometry|polygon} a new polygon + */ + convertToPoly(side: number, radius: number): geometry.polygon; + + /** + * Converts point object to associative array with x and y property names + * @returns {string} an associate array with x and y property names + */ + toString(): string; + + /** + * Creates a deep copy new point of this. + * @returns {point} a new point clone + */ + clone(): point; + + /** + * Returns this point's bounding box for consistency with geometry + * @returns {envelope} a new envelope + */ + getBounds(): envelope; + + /** + * Computes distance between this and supplied point + * @param {point} pt - point to compute distance to + * @returns {number} distance as a float + */ + distanceTo(pt: point): number; + } + + /** + * @module my/point + */ + export module point { + + /** + * Shows the distance for the application + * @param {number} x1 - + * @param {number} y1 - + * @param {number} x2 - + * @param {number} y2 - + * @returns {number} a distance + */ + export function distance(x1: number, y1: number, x2: number, y2: number): number; + + /** + * Shows the midpoint for the application + * @param {number} x1 - + * @param {number} y1 - + * @param {number} x2 - + * @param {number} y2 - + * @return {point} a midpoint + */ + export function midpoint(x1: number, y1: number, x2: number, y2: number): point; + } + + /** + * @module my/geometry + */ + export module sphericalMercator { + + /** + * Static function. Returns the Epsg number for the Spherical Mercator + * @return {number} an integer + */ + export function getEpsg(): number; + + /** + * Static function. Returns the minimum zoom level for this projection. + * @returns {number} an integer + */ + export function getMinZoomLevel(): number; + + /** + * Static function. Override the minimum zoom level used by this projection. Normally this is set to 1.0 and should not need to be altered. + * @param {number} minZ - minimum zoom level as numeric + */ + export function setMinZoomLevel(minZ: number): void; + + /** + * Static function. Return the maximum zoom level for this projection. + * @returns {number} an integer + */ + export function getMaxZoomLevel(): number; + + /** + * Static function. Override the maximum zoom level used by this projection. Normally set to 20.0 and should not need to be altered. + * @param {number} maxZ1 - maximum zoom level as numeric + */ + export function setMaxZoomLevel(maxZ: number): void; + + /** + * Static function. Returns tile width or height in pixels + * @returns {number} an integer + */ + export function getTileSizePix(): number; + + /** + * Static function. Returns display dpi (defaults to 96). The dpi is recomputer on page load complete. + * @returns {number} an integer + */ + export function getDpi(): number; + + /** + * Static function. Override the display dpi (defaults to 96). The dpi is recomputed on page load complete. + * @param {number} dpi - dots per inch on display + */ + export function setDpi(dpi: number): void; + + /** + * Static function. Return the radius polar and equitorial in meters for this projection. + * @returns {number} a numeric + */ + export function getRadius(): number; + + /** + * Static function. Returns circumference polar and equitorial in meters for this projection + * @returns {number} a numeric + */ + export function getCircumference(): number; + + /** + * TODO + */ + export function getHalfCircumference(): number; + + /** + *Static function. Get the envelope in map units for a given quadtree node (tile) based on x,y,z in the QuadTree + * @param {number} x - x position + * @param {number} y - y position + * @param {number} z - z position + * @returns {envelope} an envelope + */ + export function getQuadTreeNodeToMapEnvelope(x: number, y: number, z: number): envelope; + + /** + * Static function. Gets envelope (x,y array) of tile positions (indices) in QuadTree from an evelope in map units and zoom level. + * @param {envelope} env - an envelope in map units + * @param {number} z - zoom level + * @returns {envelope} an evelope + */ + export function getQuadTreeNodeRangeFromEnvelope(env: envelope, z: number): envelope; + + /** + * Static function. Gets projected map units per pixel for a given zoom level. + * @param {number} zoomLevel - zoom level + * @returns {number} float + */ + export function getProjectionUnitsPerPixel(zoomLevel: number): number; + + /** + * Returns a scale transform to apply to shapes so distance and are computations will be actual Earth-geodesic units instead of projected map units. + * @param {number} mapPtY - location where computation is made (latitude is used) + * @returns {number} float + */ + export function getActualShapeScaleTransform(mapPtY: number): number; + + /** + * Static function. Gets actual physical (on the ground) meters per pixel for a given zoom level and map point in map units. + * @param {point} mapPt - location where computation is made (latitude is used) + * @param {number} z - zoom level + * @returns {number} float + */ + export function getActualUnitsPerPixel(mapPt: point, zoomLevel: number): number; + + /** + * Static function. Gets the zoom level based on a supplied envelope in map and device units. + * @param {envelope} envelopeMap - envelope in map units + * @param {envelope} evelopeDevice - envelope in device units + * @returns {number} numeric best fit zoom level + */ + export function getBestFitZoomLevelByExtents(envelopeMap: envelope, envelopeDevice: envelope): number; + + /** + * Static function. Gets a quad-key from an x,y,z QuadTree node. + * @param {number} x - x location + * @param {number} y - y location + * @param {number} z - z location + * @returns {string} string quad-key + */ + export function getQuadKeyFromXYZ(x: number, y: number, z: number): string; + + /** + * Static function. Gets x,y,z QuadTree node from a quad-key + * @param {string} key - quad-key + * @return {object} associative array of x,y,z QuadTree node + */ + export function getXYZFromQuadKey(key: string): { x: number; y: number; z: number; }; + + /** + * Static function. Project a lon/lat point to a Spherical Mercator point + * @param {point} lonLat - point where x-coord is lon and y-coord is lat + * @returns a point + */ + export function projectFromLatLon(lonLat: point): point; + + /** + * Static function. De-project a Spherical Mercator point to a lat-lon. + * @param {point} mapPt - point in Spherical Mercator + * @returns {point} point where x-coord is lon and y-coord is lat + */ + export function deprojectToLatLon(mapPt: point): point; + } + + + /** + * Contructor creates a styled geometry from the provided geometry. This is an + * adornment pattern to add rendering style to raw geometry. + * This is a desc of styledGeometry export class. + * @class + * @classdesc This is a description of the styledGeometry class. + * @param {geometry} geometry - the geometry to adorn + * @param {geometry} geometryStyle - an optional geometryStyle + * @returns {point} a point to add + */ + export class styledGeometry { + constructor(geom: geometry, gStyle: geometryStyle); + + /** + * Set internal geometryStyle for this styledGeometry. This overrides what was passed in as second constructor param + * @param {geometryStyle} gs - new styledGeometry + */ + setGeometryStyle(gs: geometryStyle): void; + + /** + * Gets underlying geometry instance passed in. + * @returns a geometry + */ + getGeometry(): geometry; + + /** + * Gets path outline thickness in pixels. + * @returns {number} thickness as numeric + */ + getOutlineThicknessPix(): number; + + /** + * Sets path outline thickness in pixels. + * @param {number} t - thickness as numeric + */ + setOutlineThicknessPix(t: number): void; + + /** + * Gets path outline color as css style string. + * @returns {string} an outline color as a string + */ + getOutlineColor(): string; + + /** + * Sets path outline color as css style string + * @param {string} c - outline color as a string + */ + setOutlineColor(c: string): void; + + /** + * Gets path outline opacity from 0 to 1 + * @returns {number} an outline opacity as numeric + */ + getOutlineOpacity(): number; + + /** + * Sets path outline opacity from 0 to 1 + * @param {number} o - outline color as string + */ + setOutlineOpacity(o: number): void; + + /** + * Gets path fill color as css style string + * @returns {string} a fill color as a string + */ + getFillColor(): string; + + /** + * Sets path fill color as css style string + * @param {string} c - fill color as a string + */ + setFillColor(t: string): void; + + /** + * Gets path fill opacity from 0 to 1 + * @returns {number} a fill opacity as numeric + */ + getFillOpacity(): number; + + /** + * Sets path fill opacity from 0 to 1 + * @param {number} o - fill opacity as numeric + */ + setFillOpacity(o: number): void; + + /** + * Gets dash array string for path + * @returns {string} a dash array as a string (defaults to null [solid stroke]) + */ + getDashArray(): string; + + /** + * Sets dash array string for path + * @param {string} da - CSS dash array as a string + */ + setDashArray(t: string): void; + + /** + * Gets optional animation function called when SVG node is created. You can use the loopback parameter on complete to call itself and create repeating animation. + * @returns {action} in the form function (pathElement, loopback) {} + */ + getAnimation(): (pathElement: HTMLElement, loopback: () => void) => void; + + /** + * Sets optional animation function called when SVG nod is created. You can use loopback param on complete to call itself and create repeating animation. + * @param {function} a - in the form function (pathElement, loopback) {} + */ + setAnimation(any): void; + + /** + * Renders this to a canvas context. Note we attach original geometry bounds to svg doc as an expando. + * @param {string} key - key to track svg DOM element + * @param {number} mupp - map units per pixel to create SVG element + * @returns {HTMLElement} a new SVG document root + */ + createSvgPathElement(key: string, mapUnitsPerPix: number): HTMLElement; + + /** + * Renders this to a canvas context. + * @param {CanvasRenderingContext2D} ctx - canvas context to render to + */ + renderPathToCanvasContext(ctx: CanvasRenderingContext2D): void; + } + + /** + * Durandal's version. + * @returns {string} + */ + export var version: string; + + /** + * @module my/wkt + */ + export module wkt { + + /** + * Parses wkt as a point. + * @param {string} w - wkt string + * @returns {point} a point + */ + export function parsePoint(wkt: string): point; + + /** + * Parses as a multipoint. + * @param [string} w - wkt string + * @retuns {geometry} geometry holding the set of points + */ + export function parseMultiPoint(wkt: string): geometry; + + /** + * Parses wkt as a linestring. + * @param {string} w - wkt string + * @returns {geometry} geometry holding the path + */ + export function parseLineString(wkt: string): geometry; + + /** + * Parses wkt as a multilinestring + * @param {string} w - wkt string + * @returns {geometry} geometry holding set of paths + */ + export function parseMultiLineString(wkt: string): geometry; + + /** + * Parses wkt as a polygon + * @param {string} w - wkt string + * @returns {geometry} geometry holding one or more closed paths (first is outer ring + * and optional subsequent closed paths are inner rings [holes]). + */ + export function parsePolygon(wkt: string): geometry; + + /** + * Parses wkt as a mulitpolygon. + * @param {string} w - wkt string + * @returns {geometry} geometry where each polygon is added as a collection of sets (ring/holes) + * so the multipolygon is flattened into a single multi-ring polygon. + */ + export function parseMultiPolygon(wkt: string): geometry; + + + export function toMultiPolygonString(polys: geometry.polygon[]): string; + + /** + * Parses wkt and determines type from the string. + * @param {string} w - wkt string + * @@returns {geometry} point (for point) or geometry for everything else (multipolygon + is an array of geometry.) + */ + export function parse(wkt: string): any; + } + + /** + * @module my/geometry + */ + export module tile { + + /** + * A tile layer is a view on the map containing an array of rectangular content. + * This is a desc of layer export class. + * @class + * @classdesc This is a description of the layer class. + */ + export class layer { + constructor(id: string, useBackdrop?: boolean, maxConcurrentRequests?: number); + + /** + * @param {number} m - number for margin in pixels + */ + setContentExtentsMarginInPixels(m: number): void; + + /** + * Gets ID associated with this tile.layer. + * @returns {string} a string + */ + getId(): string; + + /** + * Returns true if this tile.layer uses a backdrop. + * @returns {boolean} a boolean + */ + getUseBackdrop(): boolean; + + /** + * Returns descriptor which describes how requested content is rendered or styled. + * @returns {function} an object that depends on the type of tile requestor associated with this tile layer. + */ + getDescriptor(): any; + + /** + * Sets descriptor which describes how requested content is rendered or styled. + * @param {function} d - an object that depends on type of tile requestor associated with this tile layer. + */ + setDescriptor(d: any): void; + + + notifyDescriptorChange(): void; + + /** + * Returns requestor which defines what kind of content to get and where to get it. + * @returns {tile.requestor} a boolean + */ + getRequestor(): tile.requestor; + + /** + * Sets requestor which defines what kind of content to get and where to get it. + * @param {tile.requestor} req - an instance that extends tile requestor + * @param {tile.requestor} opd - an optional descriptor so that both can be set in one call and incur only one content change event. + */ + setRequestor(req: tile.requestor, desc?: any): void; + + /** + * Returns optional renderer which defines how geometry data for a quadView is rendered. + * @returns {tile.renderer} an object + */ + getRenderer(): tile.renderer; + + /** + * Sets optional renderer which defines how geometry data for quadView is rendered. The renderer delegate (function) takes a single quadView param. + * @param {tile.renderer} r - a function taking a single parameter + */ + setRenderer(r: tile.renderer): void; + + + notifyRendererChange(): void; + + /** + * Gets visibility state of this tile.layer. + * @returns {boolean} a boolean indicating whether layer is displayed or not + */ + getIsVisible(): boolean; + + /** + * Sets visibility state of this tile.layer + * @param {boolean} v - boolean indicationg whether the layer is displayed or not + */ + setIsVisible(v: boolean): void; + + /** + * Gets opacity of this tile.layer. + * @returns {number} 0.0 transparent to 1.0 opaque + */ + getOpacity(): number; + + /** + * Sets opacity of this tile.layer. + * @param {number} o - from 0.0 transparent to 1.0 opaque + */ + setOpacity(o: number): void; + + /** + * Gets minimum zoom level where this tile.layer is visible. + * @returns {number} zoom level in the range supported by the projection (e.g. 1 to 20) + */ + getMinZoomLevel(): number; + + /** + * Sets minimum zoom level where this tile layer is visible. + * @param {number} minZ1 - any zoom level in the range supporeted by the projection (e.g. 1 to 20) + */ + setMinZoomLevel(minZ: number): void; + + /** + * Gets maximum zoom level where this tile lay is visible. + * @returns {number} zoom level in the range supported by the projection (e.g. 1 to 20) + */ + getMaxZoomLevel(): number; + + /** + * Sets maximum zoom level where this tile layer is visible. + * @param {number} maxZ1 - any zoom level in the range supported by the projection (e.g. 1 to 20) + */ + setMaxZoomLevel(maxZ: number): void; + + /** + * Sets pixel bleed on quadTiles. Defaults to 1. Setting to zero for overlay layers with translucent polygon fills is recommended. Bleed overlap can create faint lines at tile boundries when fill is not opaque. + * @param {number} bleed - number of pixels from 0 to integer > 0 + */ + setTileBleedPix(bleed: number): void; + + /** + * Sets whether or not to retain and display previous level tile content as you + * change tile levels to provide a nice zoom level change effect. Once the next + * level is loaded the old level content is always discarded. Setting this to false + * if there is translucent content to display. Defaults to true (prior to version 9.0.0001 + * this value had the same state as useBackdrop.) + * @param {boolean} ret - set to true to retain and false to discard. + */ + setRetainInterlevelContent(retain: boolean): void; + + /** + * Enables or disables the fad-in on tile content (default is true). + * @param {boolean} fadeInE - boolean to enable or disable fade-in content + */ + setEnableTileFadeIn(fadeIn: boolean): void; + + /** + * Set optional function to be called on any tile layer errors. + * @param {function} a - action to call + */ + setNotifyErrorAction(action: () => void): void; + + /** + * Sets optional function to be called when the tile loading queue for this layer + *has emptied. + * @param {function} a - action to call + */ + setNotifyLoadingQueueHasEmptiedAction(action: () => void): void; + + /** + *Sets optional function to be called by this layer's tile loader during + * processing. The supplied progress function takes tiles loaded and tiles total + * parameters. + * @param {number} tileLoaded + * @param {number} tileTotal + */ + setNotifyLoadingQueueProgressAction(action: (tileLoaded: number, tilesTotal: number) => void): void; + + /** + * Sets option request processor for this tile layer. This is an advanced + * feature allowing developers to tap into tile request pipeline for purposes + * of customizing requests or manage custom caching. This is also the + * mechanism used for offline apps with frameworks such as phonegap. + * @param { + */ + setRequestProcessor(processorFunc: ( + requestor: tile.requestor, + descriptor: any, + quad: tile.quad, + timeoutMs: number, + completeAction: (img: HTMLElement) => void, + errorAction: (msg: string) => void) => void): void; + preload(extents: envelope, startZoomLevel: number, endZoomLevel: number): void; + compose(extentsMapUnits: envelope, ententsDeviceUnits: envelope); + } + + /** + * This is a desc of layerOptions export class. + * @class + * @classdesc This is a description of the layerOptions class. + */ + export class layerOptions { + constructor(id: string, options: { + useBackdrop?: boolean; + maxConcurrentRequests?: number; + requestor?: tile.requestor; + descriptor?: any; + renderer?: tile.renderer; + requestProcessor?: any; + visible?: boolean; + opacity?: number; + minZoomLevel?: number; + maxZoomLevel?: number; + tileBleedPix?: number; + retainInterlevelContent?: boolean; + enableTileFadeIn?: boolean; + notifyErrorAction?: (msg?: string) => void; + notifyLoadingQueueHasEmptiedAction?: () => void; + }); + + /** + * Returns underlying tile layer. + * @returns {tile.layer} a tile layer + */ + getTileLayer(): tile.layer; + + /** + * Gets ID associated with this tile layerOptions + * @returns {string} a string + */ + getId(): string; + + /** + * Gets options associated with this tile layerOptions. + */ + getOptions(): {}; + } + + export class quad { + getX(): number; + getY(): number; + getLevel(): number; + getEnvelope(): envelope; + toString(): string; + getKey(): string; + equals(q: quad): boolean; + factoryParent(ancestorsBack: number): quad; + } + + /** + * @module my/geometry + */ + export module quad { + export function factoryQuadFromKey(key: string): quad; + } + /** + * A tile renderer handles converting JSON vector content loaded from the + * MapDotNet REST feature service into a canvas rendering on a tile. + * This is a desc of renderer export class. + * @class + * @classdesc This is a description of the renderer class. + */ + export class renderer { + constructor(options? : { + + + renderPoint?: (pt: point, context: CanvasRenderingContext2D) => void; + + + + renderGeometry?: (shape: geometry, context: CanvasRenderingContext2D) => void; + + + renderBitmap?: (img: HTMLElement, context: CanvasRenderingContext2D, contextSize: number, bleed: number) => void; + }); + + /** + * Sets render point function which takes a point and canvas context. The + *points passed in are transformed to pixel units and offset to context origin. + * @param {function} a - function of the form myPointRenderer (shape, context) + * @param {point} pt - shape of type point + * @param {CanvasRenderingContext2D} context - context is canvas context + * @param {number} context - context size in pixels (e.g. 256) + */ + setRenderPoint(func: (pt: point, context: CanvasRenderingContext2D) => void): void ; + + /** + * Sets render geometry function which takes a geometry and canvas context. + * The geometries passed in are transformed to pixel units and offset to the context origin. + * @param {function} a - function of the form myGeomRenderer (shape, context) + * @param {geometry} shape - shape is of type geometry + * @param {CanvasRenderingContext2D} context - context is a canvas context + * @param {number} context - context size in pixels + */ + setRenderGeometry(func: (shape: geometry, context: CanvasRenderingContext2D) => void): void; + + /** + * Sets the render bitmap function which takes an image, bleed and canvas context. + * @param {function} a - function of the form myBitmapRenderer (imp, context, contextSize, bleed) + * @param {HTMLElement} img - image is of type Image + * @param {CanvasRenderingContext2D} context - context is a canvas context + * @param {number} contextSize - context size in pixels + * @param {number} bleed - bleed is >= 1.0 and represents extra margin around tile to paint + * so no gaps when trimmed + */ + setRenderBitmap(func: (img: HTMLElement, context: CanvasRenderingContext2D, contextSize: number, bleed: number) => void): void; + + } + + + /** + * This is a desc of rendererDensityMap export class. + * @class + * @classdesc This is a description of the rendererDensityMap class. + */ + export class rendererDensityMap { + + + constructor(); + + /** + * Sets bleed margin (1.0 = no bleed, > 1.0 for positive bleed). A bleed is + * required as points in adjacent tiles add to the "heat" computation in the tile + * being rendered. + * @param {number} bleed - a numeric > 1.0 + */ + setBleed(bleed: number): void; + + /** + * Sets grid width and height in cells. + * @param {number} gridSize - integer (typical values are from 16 to 64) + */ + setGridSize(gridSize: number): void; + + /** + * Sets filter radius corresponding to one standard deviation. + * @param {number} filterStdDevRadius - integer (typical values are from 2 to 4) + */ + setFilterStdDevRadius(filterStdDevRadius: number): void; + + /** + * Sets color matrix for renderer. + * @param {number [] []} matrix - array of arrays [ (r,g,b,a) (r,g,b,a)...] from + * cold to hot (typically about a dozen colors) + */ + setColorMatrix(matrix: number[][]): void; + + /** + * Sets minimum cell value + * @param {number} mcv - minimum cell value (defaults to 0) + */ + setMinCellValue(min: number): void; + + /** + * Sets optional row action. This provides a means to creat hot spot maps by + * processing row atrributes instead a density map from counting features. + * @param {action} ra - row action function takes a single parameter (shape with + * an optionally attached fieldValues property). The function returns the value + *to add to the grid cell. + */ + setRowAction(action: (row: {}) => void): void; + + /** + * Tells renderer to re-render density map and recompute ranges. This should + * be called if data changes or due to extent changes the density changes. + * @param {} + */ + notifyRecompute(): void; + } + + + /** + * This is the base class for all requestors. + * This is a desc of requestor export class. + * @class + * @classdesc This is a description of the requestor class. + */ + export class requestor { + + /** + * This is the base class constructor for all requestors. + */ + constructor(); + + /** + * Gets formatted input using the endpoint template and supplied quad tile + * location and descriptor. + * @param {quad} quad - formatted input + * @returns {string} a uri string + */ + getFormattedEndpoint(quad: quad, descriptor: any): string; + + /** + * Gets data locally without using remote endpoint if implemented on the + * concrete requestor. + * @param {quad} quad - concrete requestor local data + * @returns {string} a json string + */ + getLocalData(quad: quad, descriptor: any): string; + + /** + * Creates unique sha1 string from this requestor plus supplied descriptor. + * This is useful in creating a unique key or folder for tile caching. This combined + * with tile's quad-key can uniquely/efficiently ID particular tile. + * @returns {string} a sha1 string + */ + hash(descriptor: any): string; + + /** + * Gets whether or not the concrete class returns bitmap image + * @returns {boolean} true (default) if REST service returns an image and false if it is JSON + */ + getIsRestImage(): boolean; + + /** + * Sets whether or not the concrete class returns a bitmap image + * @param {boolean} flag/iri - boolean + */ + setIsRestImage(flag: boolean): void; + + /** + * Gets whether or not the concrete class uses an endpoint rathar than local data. + * @returns {boolean} true (default) if this requestor uses an endpoint + */ + getUsesEndpoint(): boolean; + + /** + * Sets whether or not the concrete class uses an endpoint rather than local data. + * @param {boolean} flag/ue - boolean + */ + setUsesEndpoint(flag: boolean): void; + + /** + * Gets format of data returned by REST service + * @returns {string} string specifying data format (default 'json') + */ + getDataFormat(): string; + + /** + * Sets format of data returned by REST service + * @param {string} df - data format as string ('json' or 'jsonp') + */ + setDataFormat(df: string): void; + + /** + * Returns whether or not caching is enabled for vector-based requestors. This + * value is set on the $.ajax call 'cache' parameter. + * @returns {boolean} true (default) if caching enabled + */ + getCacheEnabled(): boolean; + + /** + * Sets whether or not caching is enabled for vector-beased requestors. This + * value is set on the $.ajax call 'cache' parameter. + * @param {boolean} flagce - true (default) if caching is enabled + */ + setCacheEnabled(flag: boolean): void; + + /** + * Gets requestor timeout in mS + * @returns {number} an integer + */ + getTimeoutMs(): number; + + /** + * Sets requestor timeout in mS + * @param {number} ms - an integer + */ + setTimeoutMs(ms: number): void; + + /** + * Gets any key/value pairs attached to ajax call (such as username and password) + * @returns {} [] associative array or null for none + */ + getKeyVals(): {}[]; + + + setKeyVals(options: {}[]): void; + + /** + * Gets maximum available zoom level content that can be retrieved from + *endpoint this requestor consumes + * @returns {number} a numeric + */ + getMaxAvailableZoomLevel(): number; + + /** + * Sets maximum available zoom level content that can be retrieved from + * endpoint this requestor consumes + * @param {number} maz1 - max available zoom level for the concrete requestor + *(defaults to projection's max) + */ + setMaxAvailableZoomLevel(max: number): void; + } + /** + * A tile requestor for Microsoft Bing maps. + * This is a desc of requestorBing extends requestor export class. + * @class + * @classdesc This is a description of the requestorBings extends requestor class. + */ + export class requestorBing extends requestor { + + /** + * This is the requestorBing constructor. + * @param {function} options - optional associative array of options + * - dataFormat: 'json' or 'jsonp' + * - timeoutMs: timeout in mS + * - maxAvailableZoomLevel: the maximum zoom level in which content is + * available (defaults to projection maxZoomLevel) + * @returns {} a new tile requestorBing + */ + constructor(options?: { + dataFormat?: string; + timeoutMs?: number; + maxAvailableZoomLevel?: number; + }); + + /** + * Gets endpoint uri + * @returns {string} endpoint to Bing tile server as a formatted string + * (e.g. ecn.t{0}.tiles.virtualearth.net/tiles/{1}{2}{3}?g={4}&mkt={5}&shading=hill) + */ + getEndpoint(): string; + + /** + * Gets endpoint scheme + * @returns {string} either 'http' or 'https' + */ + getScheme(): string; + + /** + * Sets endpoint scheme + * @param {string} s - either 'http' or 'https' + */ + setScheme(s: string): void; + + /** + * Gets Bing tile generation + * @returns {string} the tile generation as an integer + */ + getGeneration(): string; + + /** + * Sets Bing tile generation + * @param {string} g - generation as an integer + */ + setGeneration(g: string): void; + + /** + * Gets provider Market + * @returns {string} the market the tile is rendered for, defaults to 'en-US' + */ + getMarket(): string; + + /** + * Sets provider market + * @param {string} m - market as a string (e.g. 'en-US') + */ + setMarket(m: string): void; + + /** + * Gets Bing key + * @returns {string} Bing key as a string + */ + getBingKey(): string; + + /** + * Sets Bing key. Then calls Microsoft metadata service to automatically + * configure content endpoint. + * @param {string} key - Bing key as a string + */ + setBingKey(key: string): void; + } + /** + * This is a set of classes for both bitmap and vector tile requestors + * and descriptors using MapDotNet REST services. + * This is a desc of requestorMDN extends requestor export class. + * @class + * @classdesc This is a description of the requestorMDN extends requestor class. + */ + export class requestorMDN extends requestor { + constructor(endpoint: string, options?: { + dataFormat?: string; + timeoutMs?: number; + maxAvailableZoomLevel?: number; + }); + + /** + * Gets uri string of MapDotNet REST services + * @returns {string} a string + */ + getEndpoint(): string; + } + + /** + * This is a desc of descriptorMDNRestMap export class. + * @class + * @classdesc This is a description of the descriptorMDNRestMap class. + */ + export class descriptorMDNRestMap { + constructor(mapId: string, options?: { + version?: string; + + imageType?: string; + + + bleedRatio?: number; + + + mapCacheOption?: string; + + + mapCacheName?: string; + + + useQuadKeyForMapCacheName?: boolean; + + + backgroundColorStr?: string; + layerVisibility?: {}; + layerOutline?: {}; + layerFill?: {}; + layerWhere?: {}; + + + tag?: string; + }); + + /** + * Sets suspend descriptor change notifications flag. If set true, all changes to + * this descriptor will not readraw the map, set this to false to re-enable + * notifications. Setting to false will fire a notifyDescriptorChange(). This is used + * to queue multiple changes without having to redraw on each change. + * @param {boolean} flag - boolean (true or false) + */ + setSuspendDescriptorChangeNotifications(flag: boolean): void; + + /** + * Gets map id + * @returns {string} a string + */ + getMapId(): string; + + /** + * Gets REST service version + * @returns {string} a string + */ + getVersion(): string; + + /** + * Sets flag that replaces map cache name with quad-key + * @param {string} v - version number + */ + setVersion(v: string): void; + + /** + * Gets image type string ['png,''png8,''jpg'] + * @returns {string} a string + */ + getImageType(): string; + + /** + * Sets the image type string ['png','png8','jpg'] + * @param {string} v - image type string + */ + setImageType(v: string): void; + + /** + * Gets bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content + * beyond the edge of the tile extents (this is useful for point features) + * @returns {number} a numeric from 1.0 to 2.0 + */ + getBleedRatio(): number; + + /** + * Sets the bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content + * beyond the edge of the tile extents (this is useful for point features). + * @param {number} br - numeric from 1.0 to 2.0 + */ + setBleedRatio(br: number): void; + + /** + * Gets map cache option. Options include + * 'None,''ReadOnly,''ReadWrite,'ForceWrite,''Default.' + * @returns {string} a string + */ + getMapCacheOption(): string; + + /** + * Sets the map cache option. Options include + * 'None','ReadOnly','ReadWrite','ForceWrite','Default'. + * @param {string} mco - string + */ + setMapCacheOption(mco: string): void; + + /** + * Gets optional map cache name + * @returns {string} a string + */ + getMapCacheName(): string; + + /** + * Gets the optional map cache name. + * @param {string} mcn - string + */ + setMapCacheName(mcn: string): void; + + /** + * Gets flag that replaces map cache name with quad-key + * @returns {boolean} a boolean + */ + getUseQuadKeyForMapCacheName(): boolean; + + /** + * Sets the flag that replaces map cache name with the quad-key. + * @param {boolean} flag - uqmcn = boolean + */ + setUseQuadKeyForMapCacheName(flag: boolean): void; + + /** + * Gets map image background color + * @returns {string} a string + */ + getBackgroundColorStr(): string; + + /** + * Sets the map image background color + * @param {number} a - alpha byte + * @param {number} r - red byte + * @param {number} g - green byte + * @param {number} b - blue byte + */ + setBackgroundColor(a: number, r: number, g:number, b:number): void; + + /** + * Gets a boolean indicating whether or not the background is transparent. + * @returns {boolean} a boolean + */ + getIsBackgroundTransparent(): boolean; + + /** + * Set layer visibility by layer Id and boolean. These are MapDotNet map layer + * Ids, not tile layer + * @param {string} layerId - string Id + * @param {boolean} isVisible - boolean + */ + setLayerVisibility(layerId: string, isVisible: boolean): void; + + /** + * Get layer visibility by layer Id. + * @param {string} layerId - string + * @returns {boolean} true if specified layer is visible, otherwise false. + */ + getLayerVisibility(layerId: string): boolean; + + /** + * Set layer outline pen by layer id, pen color and thickness. + * @param {string} layerId - the layer Id to affect style + * @param {number} a - alpha byte + * @param {number} r - red byte + * @param {number} g - green byte + * @param {number} b - blue byte + * @param {number} thk - thickness in pixels + */ + setLayerOutline(layerId: string, a: number, r: number, g: number, b: number, thk: number): void; + + /** + * Get layer outline pen by layer id. + * @param {string} layerId - the layer Id to query + 8 @returns {string|thickness|number} associative array [color: cStr, thickness:thk} + */ + getLayerOutline(layerId: string): { color: string; thickness: number; }; + + /** + * Set layer fill by layer id and fill color as an ARGB value + * @param {string} layerId - the layer Id to affect style + * @param {number} a - alpha byte + * @param {number} r - red byte + * @param {number} g - green byte + * @param {number} b - blue byte + */ + setLayerFill(layerId: string, a: number, r: number, g: number, b: number): void; + + /** + * Set layer fill by layer id and fill color as an expression. + * @param {string} layerId - the layer Id to affect style + * @param {string} exp - SQL expression to select for color + */ + setLayerFillAsExpression(layerId: string, exp: string): void; + + /** + * Gets layer fill as a css color string or SQL expression, by layer id. + * @param {string} layerId - the layer Id to query + * @returns {string} a string + */ + getLayerFill(layerId: string): string; + + /** + * Set a layer where clause. + * @param {string} layerId - the layer Id + * @param {string} where - the where clause + * @param {boolean} merge - optional boolean, false to replace any existing where + *clause defined in the map layer (default) or true to + *merge (AND) with any existing + */ + setLayerWhere(layerId: string, where: string, merge: boolean): void; + + /** + * Set a separator for the layer where clause query string value. Default is ',' so + * this is useful if using an IN clause. + * @param {string} sep - separator, should be a single character + */ + setLayerWhereSep(sep: string): void; + + /** + * Returns a separator for the layer where clause query string value. + * @returns {string} separator, should be a single character + */ + getLayerWhereSep(): string; + + /** + * Gets layer where clause if explicitly set + * @param {string} layerId - the layer Id to query + * @returns {string} a string where clause + */ + getLayerWhere(layerId: string): string; + + /** + * Gets tag used to modify request URLs to avoid browser caching + * @returns {string} a string + */ + getTag(): string; + + /** + * Sets a tag, typically the map tag. Non-string objects are coerced to strings. + * Used to modify request URLs to avoid browser caching. + * @param {string} tag - the tag to use + */ + setTag(tag: string): void; + } + + + /** + * This is a desc of a descriptorMDNRestFeature export class. + * @class + * @classdesc This is a description of the descriptorMDNRestFeature class. + */ + export class descriptorMDNRestFeature { + constructor(mapId: string, layerId: string, options?: { + version?: string; + bleedRatio?: number; + fieldNames?: string[]; + clipToRenderBounds?: boolean; + simplifyEnabled?: boolean; + }); + + + /** + * Gets map Id + * @returns {string} a string + */ + getMapId(): string; + + /** + * Gets layer Id + * @returns {string} a string + */ + getLayerId(): string; + + /** + * Gets REST service version + * @returns {string} a string + */ + getVersion(): string; + + /** + * Sets REST service version + * @param {string} v - version number + */ + setVersion(v: string): void; + + /** + * Gets the bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content + * beyond the edge of the tile extents (this is useful for point features) + * @returns {number} numeric from 1.0 to 2.0 + */ + getBleedRatio(): number; + + /** + * Sets the bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content + * beyond the edge of the tile extents (this is useful for point features). + * @param {number} br - numeric from 1.0 to 2.0 + */ + setBleedRatio(br: number): void; + + /** + * Gets the optional field names to query. This attribute data may be used in + * dynamic client-side rendering. + * @returns {string[]} an array of strings + */ + getFieldNames(): string[]; + + /** + * Sets the optional field names to query. This attribute data may be used in + * dynamic client-side rendering. + * @param {string} names - array of strings for each field to query + */ + setFieldNames(names: string[]): void; + + /** + * Gets the flag whether to clip geometry fetched to the bounds of the request. + * This can greatly improve performance with large complex geometries. Only + * supported when back-end store is SQL 2008/2012 or PostGIS. + * @returns {boolean} a boolean + */ + getClipToRenderBounds(): boolean; + + /** + * Sets the flag whether to clip geometry fetched to the bounds of the request. + * This can greatly improve performance with large complex geometries. Only + * supported when back-end store is SQL 2008/2012 or PostGIS + * @param {boolean} flag - boolean + */ + setClipToRenderBounds(flag: boolean): void; + + /** + * Gets the flag whether to simplify paths based on the + * units per pixel for the quad tile being requested. + * @returns {boolean} a boolean + */ + getSimplifyEnabled(): boolean; + + /** + * Sets the flag whether to simplify paths based on the units per pixel for the + * quad tile being requested. + * @param {boolean} flag - boolean + */ + setSimplifyEnabled(flag: boolean): void; + + /** + * Sets descriptor change notification + * @param {function} action - notify descriptor change + */ + setNotifyDescriptorChangeAction(action: () => void): void; + } + /** + * This is a generic tile requestor suitable for several third-party tile servers. These + *include open street map, map quest, cloudmade, Nokia, etc. + * @class + * @classdesc This is a description of the requestorOpen extends requestor + * class. + */ + export class requestorOpen extends requestor { + constructor(endpoint: string, subdomains: string[], options?: { + dataFormat?: string; + timeoutMs?: number; + maxAvailableZoomLevel?: number; + }); + } + /** + * This is a requestor for local collections of data. These local collections may + * originate from inlined code or from datasources other than a MapDotNet REST + * feature service. + * @class + * @classdesc This is a description of the requestorLocal extends requestor + *class. + */ + export class requestorLocal extends requestor { + constructor(options?: { + dataFormat?: string; + timeoutMs?: number; + maxAvailableZoomLevel?: number; + data: {}[]; + }); + + /** + * Gets unparsed source data + * @returns {[]} associative array of source data + */ + getSource(): {}[]; + + /** + * Sets unparsed source data + * @param {[]} data - an associative array of source data + */ + setSource(data: {}[]): void; + + /** + * Returns your source data parsed into an internal format { Shapes + * [], Values: [], Bounds: [] } This may be useful for doing client-side queries on + * the local data where all of the WKT has been parsed into points and geometry. + * There is also a bounds collection to do a quick spatial check for complex polys. + * @returns {} parsed data + */ + getParsedData(): { + Shapes: any[]; + Values: any[]; + Bounds: envelope[]; + }; + + } + + /** + * @class + * @classdesc This is a description of the descriptorLocal class. + */ + export class descriptorLocal { + constructor(options: { + valueFieldNames: string[]; + geometryFieldName: string; + bleedRatio?: number; + }); + } + } + + interface pointObject { + x: number; + y: number; + } + /** + * This is an immutable envelope constructor. + * @param {number} minX - coord as a float + * @param {number} minY - coord as a float + * @param {number} maxX - coord as a float + * @param {number} maxY - coord as a float + * @returns {envelope} a new envelope + */ + interface envObject { + + /** + * @returns {number} minX as integer + */ + minX: number; + + /** + * @returns {number} minY coord as integer + */ + minY: number; + + /** + * @returns {number} maxX coord as integer + */ + maxX: number; + + /** + * @returns {number} maxY coord as integer + */ + maxY: number; + } + + interface mapsjsWidget { + + /** + * Gets the center of the map in spherical mercator. Use + * sphericalMercator.deprojectToLatLon static function to convert to a lat/lon. + * @return {point} a point map center + */ + getMapCenter(): point; + + /** + * Sets the center of the map in spherical mercator. Use + * sphericalMercator.projectFromLatLon static function to convert from a lat/lon. + * @param {point} center - map center as a point + */ + setMapCenter(center: point): void; + + /** + * Same as setMapCenter except will animate from current map center to the + * specified location + * @param {point} mc - map center as an isc.rim.point + * @param {number} duration - float in mS + * @param {function} onCompleteAction - optional function, if provided, is called when + * the animation is completed + */ + setMapCenterAnimate(center: point, durationMs?: number, completeAction?: () => void): void; + + /** + * Sets the map center to the current geolocation if supported. The map is + * animated to the new location. + * @param {number} durationMS - float in mS + * @param {function} completeAction - optional function, if provided, is called + * when the animation is completed + */ + setMapCenterToGeolocationAnimate(durationMs?: number, completeAction?: () => void): void; + + /** + * Gets current zoom level from 1 to 20 + * @returns {number} zoom level as a float + */ + getZoomLevel(): number; + + /** + * Sets current zoom level from 1 to 20 + * @param {number} z1 - zoom level as an integer + */ + setZoomLevel(zl: number): void; + + /** + * Sets minimum zoom level for the map + * @param {number} z1 - zoom level as an integer + */ + setMinZoomLevel(zl: number): void; + + /** + * Sets maximum zoom level for the map + * @param {number} z1 - zoom level as an integer + */ + setMaxZoomLevel(zl: number): void; + + /** + * Same as setZoomLevel but animates from the current zoom level to the new value + * @param {number} zl - zoom level as an integer + * @param {number} duration - float in mS + * @param {function} onCompleteAction - optional function, if provided, is called when + * the animation is completed + */ + setZoomLevelAnimate(zl: number, durationMs?: number, completeAction?: () => void): void; + + /** + * Updates current zoom level by applying a delta + * @param {number} delta - integer zoom level delta to apply + */ + zoomDelta(delta: number): void; + + /** + * Same as zoomDelta but animates from the current zoom level to the new + * value + * @param {number} delta - integer zoom level delta to apply + * @param {number} durationMs - float in mS + */ + zoomDeltaAnimate(delta: number, durationMs?: number): void; + + /** + * Animates between two locations (map center and zoom level) and does so as + * a parabolic path. + * @param {point} mc - destination map center as an isc.rim.point + * @param {number} zl - destination zoom level as an integer + * @param {number} duration - animation duration as a float in mS + * @param {function} onCompleteAction - optional function, if provided, is call when + * the animation is completed + */ + flyTo(center: point, zl: number, durationMs?: number, completeAction?: () => void): void; + + /** + * Gets current map extents in spherical mercator units + * @return {envelope} envelope map extents + */ + getMapExtents(): envelope; + + /** + * Gets current map units per pixel (meters) + * @returns {number} meters as a float + */ + getMapUnitsPerPixel(): number; + + /** + * Gets map extens width and height in pixels + * @returns {number} associative array + * w: width in pixels as an integer + * h: height in pixels as an integer + */ + getViewExtentsInPix(): { w: number; h: number; }; + + /** + * Gets the current projected map scale. This is the ratio of units on the screen + * to map units depicted. + * @returns {number} ration (1 to N) as a float + */ + getProjectedMapScale(): number; + + /** + * Gets the current actual map scale. This is the ratio of units on the screen to + * actual units on the earth's surface at the latitude of the current map center. + * @returns {number} ration (1 to N) as a float + */ + getActualMapScale(): number; + + /** + * Gets the best fit zoom level based on the supplied map extents for the current + * display extents in pixels. + * @param {envelope} extentsNew - new map extents to fit to as an envelope + * @returns {number} an integer between min and max supported zoom levels + */ + getBestFitZoomLevelByExtents(extentsNew: envelope): number; + + /** + * Forces the map to redraw the currently loaded tile and geometry content. + * You should not have to call this as redraws are automatically handled during + * programatic state changes. This would be for edge cases where the developer + * is affecting internal state in an undocumented way. + */ + redraw(): void; + + /** + * Updates the map to the size of its container. This updates internal parameters + * for computing map extents and handling the amount of tile content to + * download. This is handled automatically if the browser window is resized. But + * if you are sizing the map programatically (e.g. resizable panel or slider) then + * call this after the parent container has resized. + */ + resize(): void; + + /** + * pushes a tile layer onto the top of the display stack + * @param {tile.layer} tl - a tile layer + */ + pushTileLayer(tl: tile.layer): void; + + /** + * Pops a tile layer off the top of the display stack + * @returns {tile.layer} the removed tile layer as a tile layer + */ + popTileLayer(): tile.layer; + + /** + * Gets current number of tile layers on display stack + * @returns {number} a count as an integer + */ + getTileLayerCount(): number; + + /** + * Gets tile layer on display stack by its key + * @param {string} key - tile layer by key + * @returns {tile.layer} tile layer found as a tile layer or null if not found + */ + getTileLayer(key: string): tile.layer; + + /** + * Gets a map point in map units from a supplied point in pixel units from the + * currently displayed extents. + * @param {number} x - x coord in map pixels + * @param {number} y - y coord in map pixels + * @returns {point} a converted point as a point + */ + computeMapPointFromPixelLocation(x: number, y: number): point; + + /** + * Determines whether or not map extent changes can occur through gestures + * like mouse or touch drag, mouse wheel or pinch zoom. + * @param {boolean} flag - set to true to freeze the map and prevent all map + * extent changes through gestures, or false to resume normal behavior. + */ + setSuspendMapExtentChangesByGestures(flag: boolean): void; + + /** + * Sets the z-order of drawn content in relation to the gesture capture panel. The + * default behavior (false) is to have fixed content and geometry underneath the + * gesture panel in the DOM. If false, all pointer events are handled by the + * gesture capture panel and optionally parents of the map control. If true, drawn + * content will receive pointer events first and will block gestures to the map. If + * true, digitizing will not function and polygons will block map navigation. In some + * scenarios you may want to set this to true if you are placing fixed- + * content (such as point features) on the map and need to handle gestures on + * the placed content. You can call this function at any time to change the order. + * @param {boolean} flag - order of the drawn content area in relation to the gesture + * capture panel. False (default) is below and True is above. + */ + setDrawnContentZorderToTop(flag: boolean): void; + + /** + * Add a fixed element to the content area which resides at a z-level above tiled + * map content. These elements do not scale with the map scale. This is used to + * place markers or callouts on the map + * @param {HTMLElement} element - any html that can be added to the DOM + * @param {number} mapUnitsX - is the insertion point X value in map units + * @param {number} mapUnitsY - is the insertion point Y value in map units + * @param {function} addAction - is an optional function which is passed the DOM element after it is placed into the fixed element content area + * @param {HTMLElement} dragOptions - is an optional object to support making the placed object draggable, the properties include: + * dragEnabled is a boolean property that must be true to enable dragging + * downAction is an optional function taking an isc.rim.point that is called when a pointer down occurs on the element + * moveAction is an optional function taking an isc.rim.point that is called when the element moves under pointer movement + *upAction is an optional function taking an isc.rim.point that is called when a pointer up occurs on the element + */ + addFixedContentElement(element: HTMLElement, mapUnitsX: number, mapUnitsY: number, addAction: (ele: HTMLElement) => void, dragOptions: { + + /** + * @returns {boolean} a boolean + */ + dragEnabled: boolean; + + /** + * @returns {boolean} a boolean + */ + useElementInsteadOfNewGestureOverlay: boolean; + + /** + * @param {point} downPoint - + * @returns {function} + */ + downAction?: (downPoint: point) => any; + + /** + * @param {point} movePoint - + */ + moveAction?: (movePoint: point) => void; + + /** + * @param {point} upPoint - + */ + upAction?: (upPoint: point) => void; + + /** + * @param {number} delta - + */ + wheelAction?: (delta: number) => void; + }): void; + + /** + * Move an existing fixed element on the content area + * @param {HTMLElement} element - is the existing DOM element to move + * @param {number} mapUnitsX - is the new point X value in map units + * @param {number} mapUnitsY - is the new point Y value in map units + */ + moveFixedContentElement(element: HTMLElement, mapUnitsX: number, mapUnitsY: number): void; + + /** + * Removes fixed element from display by reference + * @param {HTMLElement} element - a DOM element added via addFixedContentElement + */ + removeFixedContentElement(element: HTMLElement): void; + + /** + * Add a styled path geometry to the content area which resides at a z-level + * above tiled map content. The geometry is converted to SVG and added to the + * content area DOM. If an attempt to add a geometry is made with the same + * key, the geometry is swapped out. You must remove using removePathGeometry + * for resource cleanup. + * @param {styleGeometry} styledGeom - styledGeometry to render + * @param {string} key - string used to tie a geometry to its SVG rendering in + * the DOM and is used to remove the geometry + * @returns {element} a SVG element added to the DOM + */ + addPathGeometry(styledGeom: styledGeometry, key: string): void; + + /** + * Updates an existing path geometry to reflect a style change + * @param {geometryStyle} styleNew - a new geometryStyle + * @param {string} key - string used to identify an existing + * styledGeometry in the DOM that was added by + * addPathGeometry + */ + updatePathGeometryStyle(styleNew: geometryStyle, key: string): void; + + /** + * Removes styledGeometry from display by its key + * @param {string} key - a string used to lookup the geometry to removed based on + * the key used in addPathGeometry + */ + removePathGeometry(key: string): void; + + /** + * Begins creation of an envelope by click-dragging the bounds + * @param {function} options - an action (function) taking a single envelope parameter that is called at + * the end of the envelope creation + */ + beginDigitize(options: { + /** + * a string used to keep track of the DOM element + * if the path is left behind after the call to beginDigitize + * @returns {string} a string + */ + key?: string; + shapeType: string; + geometryStyle?: geometryStyle; + + /** + * an existing styledGeometry to edit + * @returns {styledGeometry} an edited styledGeometry + styledGeometry?: styledGeometry; + + /** + * @param {number} setIdx - optional action called on a nodetap + * and hold + * @param {number} idx - optional action called on a nodetap and hold + * @returns {boolean} a boolean + */ + nodeTapAndHoldAction?: (setIdx: number, idx: number) => boolean; + + /** + * @param {number) x - optional action called on a node move for value x + * @param {number} y - optional action called on a node move for value y + * @param {string} actionType - optional action on a node move for action + * Type string + * @returns {string} a string + */ + nodeMoveAction?: (x: number, y: number, actionType: string) => any; + + /** + * optional action on geometry change + */ + shapeChangeAction?: () => void; + + /** + * an action (function) taking a single + * envelope parameter that is called at the end of the envelope creation + * @param {envelope} env - envelope parameter + */ + envelopeEndAction?: (env: envelope) => void; + suppressNodeAdd?: boolean; + + /** + * @returns {boolean} true to leave path behind when done + */ + leavePath?: boolean; + }): void; + endDigitize(): void; + + /** + * Gets a snapshot copy of current digitizing path while editing + * @returns {geometry} a geometry + */ + getDigitizeSnapshot(): geometry; + + /** + * Adds set to end of digitizing path + */ + pushSetOnDigitizePath(): void; + + /** + * Removes last set from digitizing path + * @return {number} + */ + popSetFromDigitizePath(): number[]; + + /** + * Programmatically delete a node while digitizing + * @param {number} setIdx - the set index (0-based) of the ring or path to + * remove the node from + * @param {number} nodeIdx - the node index to remove (0-based) in the specified + * ring or path + */ + deleteNodeOnDigitizePath(setIdx: number, nodeIdx: number): void; + + /** + * Returns true if digitizing is enabled + * @returns {boolean} true if digitizing is enabled, otherwise false + */ + isDigitizingEnabled(): boolean; + + /** + * Set the function called when the map extents have stopped changing + *(e.g. after an animated pan or zoom). + * @param {function} action - an action (function reference) that takes one parameter. + * The parameter passed in is an associative array with the following keys: + * - centerX + * - centerY + * - centerLat + * - centerLon + * - zoomLevel + * - mapScale (actual ground scale) + * - mapScaleProjected (map projection scale) + * - mapUnitsPerPixel + * - extents + */ + setExtentChangeCompleteAction(action: (vals: {}) => void): void; + + /** + * Set the function called when map content (map tiles and fixed elements) are + * re-positioned in the DOM This is done automatically as the map is panned + * beyond existing content and zoomed to a new level requiring content. + * @param {function} action - an action (function reference) that takes one parameter. + * The parameter passed in is an associative array with the following keys: + * - centerX + * - centerY + * - zoomLevel + * - mapUnitsPerPixel + */ + setContentRepositionAction(action: (vals: {}) => void): void; + + /** + * Sets function called when map is clicked (left mouse click or touch on + * mobile) + * @param {function} action - an action (function reference) that takes one + * parameter + * @param {point} pt - point in map units where clicked + */ + setPointerClickAction(action: (pt: point) => void): void; + + /** + * Sets function called when the map pointer is moved and then hovers + * @param {function} action - an action (function reference) that takes one + * parameter + * @param {point} pt - point in map units where hovered + */ + setPointerHoverAction(action: (pt: point) => void): void; + + /** + * Sets the margin around the map in pixels for extra content fetched so that tile + * rebuilding of the display is minimized. This is an advanced property and does not + * generally need to be adjusted. The default is 128 pixel (one half tile width) + * Increase for very large maps (width and height in pixels is large) or panning is + * active. Decrease for very small maps (e.g. mobile devices) or where panning is + * minimal. + * @param {number} cem - a pixel margin as an integer + */ + setContentExtentsMarginInPixels(cem: number): void; + } +} + +/** + * This is a jQuery widget encapsulating the MapDotNet UX RIM (Rich Interactive + * Mapping) HTML5 map control usage: + * $(myContainerDOMElement).rimMap('[widget function]', param1, param2...); + */ +interface JQuery { + + rimMap(): JQuery; + rimMap(command: any, param?: any, param2?: any, param3?: any, param4?: any, param5?: any): JQuery; + getMapsjs(): any; +} From ce23487b6c6eacaa139562423c9b617160e6b02e Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 18 Oct 2013 14:25:40 +0900 Subject: [PATCH 061/150] Follow up master/HEAD --- .../chrome-app-tests.ts.tscparams | 0 .../chrome-app.d.ts.tscparams | 0 .../dhtmlxgantt-test.ts.tscparams | 0 dhtmlxgantt/dhtmlxgantt.d.ts.tscparams | 1 + dhtmlxscheduler/dhtmlxscheduler-test.ts.tscparams | 1 + dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams | 1 + giraffe/giraffe-tests.ts.tscparams | 1 + giraffe/giraffe.d.ts.tscparams | 1 + knockout.mapper/knockout.mapper.d.ts.tscparams | 1 + mCustomScrollbar/mCustomScrollbar-tests.ts.tscparams | 1 + titanium/titanium-tests.ts.tscparams | 1 + 11 files changed, 8 insertions(+) rename handlebars/handlebars-tests.ts.tscparams => chrome/chrome-app-tests.ts.tscparams (100%) rename handlebars/handlebars.d.ts.tscparams => chrome/chrome-app.d.ts.tscparams (100%) rename zeroclipboard/zeroclipboard.d.ts.tscparams => dhtmlxgantt/dhtmlxgantt-test.ts.tscparams (100%) create mode 100644 dhtmlxgantt/dhtmlxgantt.d.ts.tscparams create mode 100644 dhtmlxscheduler/dhtmlxscheduler-test.ts.tscparams create mode 100644 dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams create mode 100644 giraffe/giraffe-tests.ts.tscparams create mode 100644 giraffe/giraffe.d.ts.tscparams create mode 100644 knockout.mapper/knockout.mapper.d.ts.tscparams create mode 100644 mCustomScrollbar/mCustomScrollbar-tests.ts.tscparams create mode 100644 titanium/titanium-tests.ts.tscparams diff --git a/handlebars/handlebars-tests.ts.tscparams b/chrome/chrome-app-tests.ts.tscparams similarity index 100% rename from handlebars/handlebars-tests.ts.tscparams rename to chrome/chrome-app-tests.ts.tscparams diff --git a/handlebars/handlebars.d.ts.tscparams b/chrome/chrome-app.d.ts.tscparams similarity index 100% rename from handlebars/handlebars.d.ts.tscparams rename to chrome/chrome-app.d.ts.tscparams diff --git a/zeroclipboard/zeroclipboard.d.ts.tscparams b/dhtmlxgantt/dhtmlxgantt-test.ts.tscparams similarity index 100% rename from zeroclipboard/zeroclipboard.d.ts.tscparams rename to dhtmlxgantt/dhtmlxgantt-test.ts.tscparams diff --git a/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams b/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/dhtmlxgantt/dhtmlxgantt.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/dhtmlxscheduler/dhtmlxscheduler-test.ts.tscparams b/dhtmlxscheduler/dhtmlxscheduler-test.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/dhtmlxscheduler/dhtmlxscheduler-test.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams b/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/dhtmlxscheduler/dhtmlxscheduler.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/giraffe/giraffe-tests.ts.tscparams b/giraffe/giraffe-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/giraffe/giraffe-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/giraffe/giraffe.d.ts.tscparams b/giraffe/giraffe.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/giraffe/giraffe.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/knockout.mapper/knockout.mapper.d.ts.tscparams b/knockout.mapper/knockout.mapper.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/knockout.mapper/knockout.mapper.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/mCustomScrollbar/mCustomScrollbar-tests.ts.tscparams b/mCustomScrollbar/mCustomScrollbar-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/mCustomScrollbar/mCustomScrollbar-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/titanium/titanium-tests.ts.tscparams b/titanium/titanium-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/titanium/titanium-tests.ts.tscparams @@ -0,0 +1 @@ +"" From 4bc2bb4d432d954fdb0da0483149f950803a28d2 Mon Sep 17 00:00:00 2001 From: Yukimune Date: Fri, 18 Oct 2013 16:51:08 +0900 Subject: [PATCH 062/150] Add a few definitions. BehaviorSubject, ReplaySubject, ConnectableObservable Fix definition around Subject. --- rx.js/rx.js.binding.d.ts | 14 +++++++++++++- rx.js/rx.js.d.ts | 12 ++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/rx.js/rx.js.binding.d.ts b/rx.js/rx.js.binding.d.ts index 7f34fcb01c..b1f7c687a5 100644 --- a/rx.js/rx.js.binding.d.ts +++ b/rx.js/rx.js.binding.d.ts @@ -15,14 +15,26 @@ declare module Rx { new (bufferSize?: number, window?: number, scheduler?: IScheduler): ReplaySubject; } + var ReplaySubject: { + new (bufferSize?: number, window?: number, scheduler?: IScheduler): ReplaySubject; + } + interface BehaviorSubject extends ISubject { new (initialValue: T): BehaviorSubject; } + var BehaviorSubject: { + new (initialValue: T): BehaviorSubject; + } + interface ConnectableObservable extends IObservable{ connect(): _IDisposable; refCount(): IObservable; - } + } + + var ConnectableObservable: { + new (): ConnectableObservable; + } interface IObservable { diff --git a/rx.js/rx.js.d.ts b/rx.js/rx.js.d.ts index dbb7adb5cd..cda048cf14 100644 --- a/rx.js/rx.js.d.ts +++ b/rx.js/rx.js.d.ts @@ -430,13 +430,13 @@ declare module Rx { dispose(): void; } - export interface Subject { - create(observer?: IObserver, observable?: IObservable): ISubject; - } + export interface Subject extends ISubject { + create(observer?: IObserver, observable?: IObservable): ISubject; + } - var Subject: { - new (): ISubject; - } + var Subject: { + new (): Subject; + } interface IAsyncSubject extends IObservable, IObserver { isDisposed: boolean; From 31a7980b238ab3ca6825ea80ed7ae09fa72e2da5 Mon Sep 17 00:00:00 2001 From: Sean Clark Hess Date: Fri, 18 Oct 2013 08:51:03 -0600 Subject: [PATCH 063/150] added rethinkdb --- rethinkdb/rethinkdb-tests.ts | 24 ++++ rethinkdb/rethinkdb.d.ts | 218 +++++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 rethinkdb/rethinkdb-tests.ts create mode 100644 rethinkdb/rethinkdb.d.ts diff --git a/rethinkdb/rethinkdb-tests.ts b/rethinkdb/rethinkdb-tests.ts new file mode 100644 index 0000000000..4e6d784497 --- /dev/null +++ b/rethinkdb/rethinkdb-tests.ts @@ -0,0 +1,24 @@ +/// + +import r = require("rethinkdb") + +r.connect({host:"localhost", port: 28015}, function(err, conn) { + console.log("HI", err, conn) + var testDb = r.db('test') + testDb.tableCreate('users').run(conn, function(err, stuff) { + var users = testDb.table('users') + + users.insert({name: "bob"}).run(conn, function() {}) + + users.filter(function(doc) { + return doc("henry").eq("bob") + }) + .between("james", "beth") + .limit(4) + .run(conn, function() { + + }) + + + }) +}) \ No newline at end of file diff --git a/rethinkdb/rethinkdb.d.ts b/rethinkdb/rethinkdb.d.ts new file mode 100644 index 0000000000..5a192f910e --- /dev/null +++ b/rethinkdb/rethinkdb.d.ts @@ -0,0 +1,218 @@ +// Type definitions for Rethinkdb 1.10.0 +// Project: http://rethinkdb.com/ +// Definitions by: Sean Hess +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "rethinkdb" { + + export function connect(host:ConnectionOptions, cb:(err:Error, conn:Connection)=>void); + + export function dbCreate(name:string):Operation; + export function dbDrop(name:string):Operation; + export function dbList():Operation; + + export function db(name:string):Db; + export function table(name:string, options?:{useOutdated:boolean}):Table; + + export function asc(property:string):Sort; + export function desc(property:string):Sort; + + export var count:Aggregator; + export function sum(prop:string):Aggregator; + export function avg(prop:string):Aggregator; + + export function row(name:string):Expression; + export function expr(stuff:any):Expression; + + export class Cursor { + hasNext():boolean; + each(cb:(err:Error, row:any)=>void, done?:()=>void); + each(cb:(err:Error, row:any)=>boolean, done?:()=>void); // returning false stops iteration + next(cb:(err:Error, row:any) => void); + toArray(cb:(err:Error, rows:any[]) => void); + close(); + } + + interface ConnectionOptions { + host:string; + port:number; + db?:string; + authKey?:string; + } + + interface Connection { + close(); + reconnect(cb:(err:Error, conn:Connection)=>void); + use(dbName:string); + addListener(event:string, cb:Function); + on(event:string, cb:Function); + } + + interface Db { + tableCreate(name:string, options?:TableOptions):Operation; + tableDrop(name:string):Operation; + tableList():Operation; + table(name:string, options?:GetTableOptions):Table; + } + + interface TableOptions { + primary_key?:string; // 'id' + durability?:string; // 'soft' + cache_size?:number; + datacenter?:string; + } + + interface GetTableOptions { + useOutdated: boolean; + } + + interface Writeable { + update(obj:Object, options?:UpdateOptions):Operation; + replace(obj:Object, options?:UpdateOptions):Operation; + replace(expr:ExpressionFunction):Operation; + delete(options?:UpdateOptions):Operation; + } + + interface Table extends Sequence { + indexCreate(name:string, index?:ExpressionFunction):Operation; + indexDrop(name:string):Operation; + indexList():Operation; + + insert(obj:any[], options?:InsertOptions):Operation; + insert(obj:any, options?:InsertOptions):Operation; + + get(key:string):Expression; // primary key + getAll(key:string, index?:Index):Selection; // without index defaults to primary key + getAll(...keys:string[]):Selection; + } + + interface Sequence extends Operation, Writeable { + + between(lower:any, upper:any, index?:Index):Sequence; + filter(rql:ExpressionFunction):Sequence; + filter(rql:Expression):Sequence; + filter(obj:{[key:string]:any}):Sequence; + + + // Join + // these return left, right + innerJoin(sequence:Sequence, join:ExpressionFunction):Sequence; + outerJoin(sequence:Sequence, join:ExpressionFunction):Sequence; + eqJoin(leftAttribute:string, rightSequence:Sequence, index?:Index):Sequence; + eqJoin(leftAttribute:ExpressionFunction, rightSequence:Sequence, index?:Index):Sequence; + zip():Sequence; + + // Transform + map(transform:ExpressionFunction):Sequence; + withFields(...selectors:any[]):Sequence; + concatMap(transform:ExpressionFunction):Sequence; + orderBy(...keys:string[]):Sequence; + orderBy(...sorts:Sort[]):Sequence; + skip(n:number):Sequence; + limit(n:number):Sequence; + slice(start:number, end?:number):Sequence; + nth(n:number):Expression; + indexesOf(obj:any):Sequence; + isEmpty():Expression; + union(sequence:Sequence):Sequence; // concatenates two sequences + sample(n:number):Sequence; + + // Aggregate + reduce(r:Reduce, base?:any):Expression; // makes a single value + count():Expression; // number query! + distinct():Sequence; + groupedMapReduce(group:ExpressionFunction, map:ExpressionFunction, reduce:Reduce, base?:any):Expression; + groupBy(...aggregators:Aggregator[]):Expression; // TODO: reduction object + contains(prop:string):Expression; + + // Manipulation + pluck(...props:string[]):Sequence; + without(...props:string[]):Sequence; + } + + interface ExpressionFunction { + (...docs:Expression[]):Expression; + } + + interface Reduce { + // TODO, do I know anything about the type of acc and val? + (acc:any, val:any):any; + } + + interface InsertOptions { + upsert: boolean; // true + durability: string; // 'soft' + return_vals: boolean; // false + } + + interface UpdateOptions { + non_atomic: boolean; + durability: string; // 'soft' + return_vals: boolean; // false + } + + interface WriteResult { + inserted: number; + replaced: number; + unchanged: number; + errors: number; + deleted: number; + skipped: number; + first_error: Error; + generated_keys: string[]; // only for insert + } + + interface JoinResult { + left:any; + right:any; + } + + interface CreateResult { + created: number; + } + + interface DropResult { + dropped: number; + } + + interface Index { + index: string; + left_bound: string; // 'closed' + right_bound: string; // 'open' + } + + interface Expression extends Writeable, Operation { + (prop:string):Expression; // not necessarily, this could be ANYTHING. I can't get to .add here for example! + merge(query:Expression):Expression; + append(prop:string):Expression; // returns another query object with them appended. Would only work on an array + contains(prop:string):Expression; + + and(b:boolean):Expression; + or(b:boolean):Expression; + eq(v:any):Expression; + ne(v:any):Expression; + not():Expression; + + gt(value:T):Expression; + ge(value:T):Expression; + lt(value:T):Expression; + le(value:T):Expression; + + add(n:number):Expression; + sub(n:number):Expression; + mul(n:number):Expression; + div(n:number):Expression; + mod(n:number):Expression; + } + + interface Operation { + run(conn:Connection, cb:(err:Error, result:T)=>void); + } + + interface Aggregator {} + interface Sort {} + + + // http://www.rethinkdb.com/api/#js + // TODO control structures +} From 7c9f57f719ced3461c965494ded115b3917264f9 Mon Sep 17 00:00:00 2001 From: Sean Clark Hess Date: Fri, 18 Oct 2013 08:55:13 -0600 Subject: [PATCH 064/150] documentation --- rethinkdb/rethinkdb.d.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rethinkdb/rethinkdb.d.ts b/rethinkdb/rethinkdb.d.ts index 5a192f910e..da63550941 100644 --- a/rethinkdb/rethinkdb.d.ts +++ b/rethinkdb/rethinkdb.d.ts @@ -2,6 +2,8 @@ // Project: http://rethinkdb.com/ // Definitions by: Sean Hess // Definitions: https://github.com/borisyankov/DefinitelyTyped +// Reference: http://www.rethinkdb.com/api/#js +// TODO: Document manipulation and below declare module "rethinkdb" { @@ -114,12 +116,12 @@ declare module "rethinkdb" { nth(n:number):Expression; indexesOf(obj:any):Sequence; isEmpty():Expression; - union(sequence:Sequence):Sequence; // concatenates two sequences + union(sequence:Sequence):Sequence; sample(n:number):Sequence; // Aggregate - reduce(r:Reduce, base?:any):Expression; // makes a single value - count():Expression; // number query! + reduce(r:Reduce, base?:any):Expression; + count():Expression; distinct():Sequence; groupedMapReduce(group:ExpressionFunction, map:ExpressionFunction, reduce:Reduce, base?:any):Expression; groupBy(...aggregators:Aggregator[]):Expression; // TODO: reduction object @@ -135,7 +137,6 @@ declare module "rethinkdb" { } interface Reduce { - // TODO, do I know anything about the type of acc and val? (acc:any, val:any):any; } @@ -182,9 +183,9 @@ declare module "rethinkdb" { } interface Expression extends Writeable, Operation { - (prop:string):Expression; // not necessarily, this could be ANYTHING. I can't get to .add here for example! + (prop:string):Expression; merge(query:Expression):Expression; - append(prop:string):Expression; // returns another query object with them appended. Would only work on an array + append(prop:string):Expression; contains(prop:string):Expression; and(b:boolean):Expression; From a096487886ede31d21685cebc7d04df4d4ae0417 Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 19 Oct 2013 22:10:59 +0900 Subject: [PATCH 065/150] Repaired CI failed --- rethinkdb/rethinkdb-tests.ts.tscparams | 1 + rethinkdb/rethinkdb.d.ts.tscparams | 1 + 2 files changed, 2 insertions(+) create mode 100644 rethinkdb/rethinkdb-tests.ts.tscparams create mode 100644 rethinkdb/rethinkdb.d.ts.tscparams diff --git a/rethinkdb/rethinkdb-tests.ts.tscparams b/rethinkdb/rethinkdb-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rethinkdb/rethinkdb-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/rethinkdb/rethinkdb.d.ts.tscparams b/rethinkdb/rethinkdb.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/rethinkdb/rethinkdb.d.ts.tscparams @@ -0,0 +1 @@ +"" From 2bfb70a40f19e75da0c8e26e11deb8402b6f4747 Mon Sep 17 00:00:00 2001 From: Josh Strobl Date: Sun, 20 Oct 2013 01:02:13 -0700 Subject: [PATCH 066/150] Adding jQuery.Timer Definitions (Post-Fork Resync) This is to add the jQuery.Timer definitions and tests, as well as the tscparams that seem to be required (hopefully DefinitelyTyped Travis CI builds will work this time). Modified alert() to be console.log() instead. Readme updated as well (ignore line #1). --- README.md | 3 +- jquery.timer/jquery.timer-tests.ts | 31 ++++++++++++++++++++ jquery.timer/jquery.timer-tests.ts.tscparams | 1 + jquery.timer/jquery.timer.d.ts | 31 ++++++++++++++++++++ jquery.timer/jquery.timer.d.ts.tscparams | 1 + 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 jquery.timer/jquery.timer-tests.ts create mode 100644 jquery.timer/jquery.timer-tests.ts.tscparams create mode 100644 jquery.timer/jquery.timer.d.ts create mode 100644 jquery.timer/jquery.timer.d.ts.tscparams diff --git a/README.md b/README.md index 780f87c306..3484db60dc 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -DefinitelyTyped [![Build Status](https://travis-ci.org/borisyankov/DefinitelyTyped.png?branch=master)](https://travis-ci.org/borisyankov/DefinitelyTyped) +DefinitelyTyped [![Build Status](https://travis-ci.org/borisyankov/DefinitelyTyped.png?branch=master)](https://travis-ci.org/borisyankov/DefinitelyTyped) =============== The repository for *high quality* TypeScript type definitions. @@ -127,6 +127,7 @@ List of Definitions * [jquery.superLink](http://james.padolsey.com/demos/plugins/jQuery/superLink/superlink.jquery.js) (by [Blake Niemyjski](https://github.com/niemyjski)) * [jQuery.timeago](http://timeago.yarp.com/) (by [François Guillot](http://fguillot.developpez.com/)) * [jQuery.Timepicker](http://fgelinas.com/code/timepicker/) (by [Anwar Javed](https://github.com/anwarjaved)) +* [jQuery.Timer](http://jchavannes.com/jquery-timer/demo) (by [Joshua Strobl](https://github.com/JoshStrobl)) * [jQuery.TinyCarousel](http://baijs.nl/tinycarousel/) (by [Christiaan Rakowski](https://github.com/csrakowski)) * [jQuery.TinyScrollbar](http://baijs.nl/tinyscrollbar/) (by [Christiaan Rakowski](https://github.com/csrakowski)) * [jQuery.Transit](http://ricostacruz.com/jquery.transit/) (by [MrBigDog2U](https://github.com/MrBigDog2U)) diff --git a/jquery.timer/jquery.timer-tests.ts b/jquery.timer/jquery.timer-tests.ts new file mode 100644 index 0000000000..2e48bbe893 --- /dev/null +++ b/jquery.timer/jquery.timer-tests.ts @@ -0,0 +1,31 @@ +/// +/// + + // Create the timer + $("body").timer( + function () { + console.log("This function just got called"); + }, 10000, true + ); + + $("body").timer.set({ time: 5000 }); // Change the time from 10000 millseconds to 5000 milliseconds + $("body").timer.toggle(false); // Reset the timer + $("body").timer.stop(); // Stop the timer + $("body").timer.play(); // Start / play the timer + + // #region Outputting if timer is active or not + var isTimerActive = $("body").timer.isActive; // Define boolean isActive as isTimerActive + if (isTimerActive == true){ + console.log("Timer is active!"); + } + else{ + console.log("Timer is not active!"); + } + // #endregion + + // #region Get time remaining + console.log("Time remaining on timer: " + $("body").timer.remaining.toString); + // #endregion + + $("body").timer.stop(); // Stop the timer once more for the purpose of the tests (to test once()) + $("body").timer.once(1000); // Run the timer ONCE in 1 second \ No newline at end of file diff --git a/jquery.timer/jquery.timer-tests.ts.tscparams b/jquery.timer/jquery.timer-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/jquery.timer/jquery.timer-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/jquery.timer/jquery.timer.d.ts b/jquery.timer/jquery.timer.d.ts new file mode 100644 index 0000000000..7777585076 --- /dev/null +++ b/jquery.timer/jquery.timer.d.ts @@ -0,0 +1,31 @@ +// Type definitions for jQueryTimer 1.0 +// Project: https://github.com/jchavannes/jquery-timer +// Definitions by: Joshua Strobl +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface JQueryTimer { + // #region Constructors + (action?: Function, time?: Number, autostart?: Boolean): Object; + set(any): Object; + // #endregion + + // #region Actions + once(time: Number): Object; + play(reset?: Boolean): Object; + pause(): Object; + stop(): Object; + toggle(reset?: Boolean): Object; + // #endregion + + // #region Properties + isActive: Boolean; + remaining: Number; + // #endregion + +} + +interface JQuery { + timer: JQueryTimer; +} \ No newline at end of file diff --git a/jquery.timer/jquery.timer.d.ts.tscparams b/jquery.timer/jquery.timer.d.ts.tscparams new file mode 100644 index 0000000000..3cc762b550 --- /dev/null +++ b/jquery.timer/jquery.timer.d.ts.tscparams @@ -0,0 +1 @@ +"" \ No newline at end of file From 1ea3ae922f4cd16aa1d607b5beae448714aa17c4 Mon Sep 17 00:00:00 2001 From: Georgios Diamantopoulos Date: Mon, 21 Oct 2013 12:35:44 +0300 Subject: [PATCH 067/150] NG directives: fixes Allow functions to be defined for template/templateUrl and array notation in controller There's not a more elegant solution that I know of until we get structs in TS anyway. --- angularjs/angular.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index be2465ff74..145696286b 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -668,15 +668,15 @@ declare module ng { interface IDirective{ priority?: number; - template?: string; - templateUrl?: string; + template?: any; + templateUrl?: any; replace?: boolean; transclude?: any; restrict?: string; scope?: any; link?: Function; compile?: Function; - controller?: Function; + controller?: any; } /////////////////////////////////////////////////////////////////////////// From a88b93381563ae44d3d873cb854a426cf4a83bda Mon Sep 17 00:00:00 2001 From: Nick Howes Date: Mon, 21 Oct 2013 14:04:09 +0100 Subject: [PATCH 068/150] queue.push callback is optional --- async/async.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async/async.d.ts b/async/async.d.ts index 5ba56e0dbb..12aa4123f3 100644 --- a/async/async.d.ts +++ b/async/async.d.ts @@ -13,7 +13,7 @@ interface AsyncWorker { (task: T, callback: Function): void; } interface AsyncQueue { length(): number; concurrency: number; - push(task: T, callback: AsyncMultipleResultsCallback): void; + push(task: T, callback?: AsyncMultipleResultsCallback): void; saturated: AsyncMultipleResultsCallback; empty: AsyncMultipleResultsCallback; drain: AsyncMultipleResultsCallback; @@ -79,4 +79,4 @@ declare var async: Async; declare module "async" { export = async; -} \ No newline at end of file +} From 710e85d0d97d5c801c7eb7c2d3841532826435d6 Mon Sep 17 00:00:00 2001 From: Josh Strobl Date: Mon, 21 Oct 2013 06:08:24 -0700 Subject: [PATCH 069/150] jQuery: Modified some functions variable types Updated the jQuery definitions file, modifying removeAttr, removeClass, removeProp, toggleClass and on functions to appropriately use string rather than any, which aligns it with the jQuery API docs. --- jquery/jquery.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index e824cf2980..10c5cb979a 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -421,14 +421,14 @@ interface JQuery { prop(map: any): JQuery; prop(propertyName: string, func: (index: any, oldPropertyValue: any) => any): JQuery; - removeAttr(attributeName: any): JQuery; + removeAttr(attributeName: string): JQuery; - removeClass(className?: any): JQuery; + removeClass(className?: string): JQuery; removeClass(func: (index: any, cls: any) => any): JQuery; - removeProp(propertyName: any): JQuery; + removeProp(propertyName: string): JQuery; - toggleClass(className: any, swtch?: boolean): JQuery; + toggleClass(className: string, swtch?: boolean): JQuery; toggleClass(swtch?: boolean): JQuery; toggleClass(func: (index: any, cls: any, swtch: any) => any): JQuery; @@ -614,8 +614,8 @@ interface JQuery { off(events?: string, selector?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; off(eventsMap: { [key: string]: any; }, selector?: any): JQuery; - on(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; - on(events: string, selector?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; + on(events: string, selector?: string, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; + on(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; on(eventsMap: { [key: string]: any; }, selector?: any, data?: any): JQuery; one(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; From 09e508fd9e752ae2fb740c1174e738510f32add8 Mon Sep 17 00:00:00 2001 From: Matthew James Davis Date: Mon, 21 Oct 2013 13:51:28 -0400 Subject: [PATCH 070/150] fix typos, syntax errors, unclear language --- mapsjs/mapsjs.d.ts | 2237 +++++++++++++++++++++++--------------------- 1 file changed, 1156 insertions(+), 1081 deletions(-) diff --git a/mapsjs/mapsjs.d.ts b/mapsjs/mapsjs.d.ts index fe388425c2..c36eeade9b 100644 --- a/mapsjs/mapsjs.d.ts +++ b/mapsjs/mapsjs.d.ts @@ -4,6 +4,11 @@ declare module 'mapsjs' { + /** + * Clusters a set of points. + * @param {object} options An options object which specifies the clustering algorithm. + * @returns {object} An array of clustered points. + */ export function clusterPoints(options: { data: {}[]; pointKey: string; @@ -15,1048 +20,1075 @@ declare module 'mapsjs' { }): {}[]; /** - * This is a desc of envelope export function. - * @class - * @classdesc This is a description of the envelope class. + * An immutable envelope + * @class envelope */ export class envelope { - constructor(minX: number, minY: number, maxX: number, maxY: number); /** - * Gets the minX of the envelope. - * @returns {number} The minimum x value + * Gets the minimum x coordinate of the envelope. + * @returns {number} The minimum x coordinate. */ getMinX(): number; /** - * Gets the minY of the envelope - * @returns {number} The minimum y value + * Gets the minimum y coordinate of the envelope + * @returns {number} The minimum y coordinate. */ getMinY(): number; /** - * Gets the maxX of the envelope - * @returns {number} The maximum x value + * Gets the maximum x coordinate of the envelope + * @returns {number} The maximum x coordinate. */ getMaxX(): number; /** - * Gets the maxY of the envelope - * @returns {number} The maximum y value + * Gets the maximum y coordinate of the envelope + * @returns {number} The maximum y coordinate. */ getMaxY(): number; /** - * Create a new envelope from this as deep copy - * @returns {envelope} - a new envelope + * Creates a new envelope from this as deep copy. + * @returns {envelope} The new cloned envelope. */ clone(): envelope; /** - * Create a new envelope from this one plus x and y margins. - * @param {number} marginX - the x margin - * @param {number} marginY - the y margin - * @returns {envelope} - a new envelope + * Creates a new envelope from this one plus x and y margins. + * @param {number} marginX The x margin. + * @param {number} marginY The y margin. + * @returns {envelope} A new envelope. */ createFromMargins(marginX: number, marginY: number): envelope; /** - * Create a new envelope from this one number plus bleed ratio - * @param {number} bleed - the number bleed - * @returns {envelope} a new envelope + * Create a new envelope from this one plus a bleed ratio. + * @param {number} bleed The bleed ratio. + * @returns {envelope} A new envelope. */ createFromBleed(bleed: number): envelope; /** - * Gets the center point of the envelope - * @returns {point} - center as point + * Gets the center point of the envelope. + * @returns {point} Center as a point. */ getCenter(): point; /** - * Gets the width of the envelope - * @returns {number} value of width + * Gets the width of the envelope. + * @returns {number} Width of the envelope. */ getWidth(): number; /** - * Gets height of the envelope - * @returns {number} value of height + * Gets height of the envelope. + * @returns {number} Height of the envelope. */ getHeight(): number; /** - * Gets area of the envelope - * @return {number} value of area + * Gets area of the envelope. + * @return {number} Area of the envelope. */ getArea(): number; /** - * Returns associative array of this - * Returns value of minX - * Returns value of minY - * Returns value of maxX - * Returns value of maxY - * @returns {object} values of associative array + * Returns the minimum and maximum coordinates of this envelope as an envObject. + * @returns {envObject} Representaton of this envelope as an envObject. */ toObject(): envObject; /** - * Gets UL coordinate of this envelope - * @returns {point} - a new point + * Gets upper left coordinate of this envelope. + * @returns {point} A new point. */ getUL(): point; /** - * Gets UR of this envelope - *@returns {point} - a new point + * Gets upper right of this envelope. + * @returns {point} A new point. */ getUR(): point; /** - * Gets LL of this envelope - * @returns {point} - a new point + * Gets lower left of this envelope. + * @returns {point} A new point. */ getLL(): point; /** - * Gets LR of this envelope - * @returns {point} - a new point + * Gets lower right of this envelope. + * @returns {point} A new point. */ getLR(): point; /** - * Gets the aspect of the envelope plus width, height - * @returns {number} - numeric ratio + * Gets the aspect of the envelope. + * @returns {number} Width-to-height ratio. */ getAspect(): number; /** - * tests for identical envelope as this - * @param {envelope} env - tests envelope - * @return {boolean} - envelope match is true, otherwise false + * Equality comparer between this and another envelope. + * @param {envelope} env Envelope to compare. + * @return {boolean} Result of equality comparison. */ equals(env: envelope): boolean; /** - * Create string of this - * @returns {string} - string in the form: [minx],[miny],[maxx],[maxy] + * Method for casting this envelope as a string. + * @returns {string} String of the form 'minX,minY,maxX,maxY'. */ toString(): string; /** - * Create geometry of this envelope. The polygon returned is closed - * @returns {geometry} - a new geometry + * Create a closed geometry from this envelope. + * @returns {geometry} A new closed path geometry. */ toGeometry(): geometry; /** - * Tests function for point within this envelope - * @param {point} - test point - * @returns {boolean} point contained is true, otherwise false + * Tests whether the given point is contained within this envelope. + * @param {point} pt Point to test. + * @returns {boolean} Result of containment test. */ contains(pt: point): boolean; } + /** - * @module my/envelope - */ + * Exposes static functions that act on or return envelopes. + * @module envelope + */ export module envelope { /** - * Creates a new MapDotNet xml envelope by Static function - * @param {string} xml - an xml string of envelope - * @returns {envelope} - a new envelope + * Creates a new envelope from MapDotNet XML. + * @param {string} xml A MapDotNet XML string of the envelope. + * @returns {envelope} A new envelope */ export function createFromMdnXml(xml: string): envelope; /** - * creates new envelope from two points using static function - * @param {point} pt1 - corner point - * @param {point} pt2 - opposite corner point - * @returns {envelope} a new envelope + * Creates new envelope from two corner points. + * @param {point} pt1 Corner point + * @param {point} pt2 Opposite corner point + * @returns {envelope} A new envelope */ export function createFromPoints(pt1: point, pt2: point): envelope; /** - * static function creates new x and y center points envelope plus y and x margins - * @param {number} centerX - the center x as float - * @param {number} centerY - the center y as float - * @param {number} marginX - the margin x from center as float - * @param {number} marginY - the margin y from center as float - * @returns {envelope} a new envelope + * Creates a new envelope from the x and y coordinates of the center + * point and x and y margins from the center point. + * @param {number} centerPtX The center x coordinate. + * @param {number} centerPtY The center y coordinate. + * @param {number} marginX The margin from center x coordinate. + * @param {number} marginY The margin from center y coordinate. + * @returns {envelope} A new envelope */ - export function createFromCenterAndMargins(centerPtX: number, centerPtY: number, marginX: number, marginY: number): envelope; + export function createFromCenterAndMargins(centerPtX: number, centerPtY: number, marginX: number, marginY: number): envelope; /** - * static functions tests intersection of two envelopes - * @param {envelope} envelope 1 - envelope 1 test - * @param {envelope} envelope 2 - envelope 2 test - * @returns {boolean} intersecting envelopes are true, otherwise false + * Tests whether two given envelopes intersect. + * @param {envelope} env1 First envelope to test. + * @param {envelope} env2 Second envelope to test. + * @returns {boolean} Result of the intersection test. */ export function intersects(env1: envelope, env2: envelope): boolean; /** - * static function creates two-envelope union - * @param {envelope} envelope 1 - envelope 1 - * @param {envelope} envelope 2 - evelope 2 - * @returns {envelope} a new envelope as union of supplied envelopes + * Creates a new envelope from the union of two given envelopes. + * @param {envelope} env1 The first enevelope to unite. + * @param {envelope} env2 The second envelope to unite. + * @returns {envelope} A new envelope. */ export function union(env1: envelope, env2: envelope): envelope; } - /** - * Constructor creates a geometry which can represent a point, line, polygon, - * mulitpoint, multilinestring. - * This is a desc of geometry export class. - * @class - * @classdesc This is a description of the geometry class. - * @param {boolean} isPath - is this a path (true if path or false for set of - * points) - * @param {boolean} isClosed - is this a closed path (true or false) - * @returns {geometry} a new geometry + + /** + * A general geometry which can represent a point, line, polygon, + * mulitpoint, multilinestring + * @class geometry */ export class geometry { constructor(isPath?: boolean, isClosed?: boolean); /** - * Creates a new polygon or polyline form the geometry according to whether the - * geometry is closed. - * @returns {geometry} a new geometry + * Creates a new polygon or polyline form the geometry according to + * whether the geometry is closed. + * @returns {any} A new polyline or polygon geometry. */ factoryPoly(): any; /** - * Creates a deep copy of this geometry - * @returns {geometry} a new geometry - */ + * Creates a deep copy of this geometry. + * @returns {geometry} The new cloned geometry. + */ clone(): geometry; /** - * Iterates every vertex in the geometry and passes to the supplied action. Return true on the action to abort. - * @param {action} - must be a function with the signature action(setIdx, idx, x, y) + * Iterates every vertex in the geometry and passes to the supplied + * callback. Return true from in the callback will break the iteration. + * @param {function} action Callback with the signature action(setIdx, idx, x, y, set). */ foreachVertex(action: (setIdx: number, idx: number, x: number, y: number, s: number[]) => void): void; /** - * Returns geometry bounding box - * @returns {envelope} a new envelope + * Returns the geometry's bounding box as an envelope. + * @returns {envelope} The bounding box of the geometry as an envelope. */ getBounds(): envelope; /** - * Returns whether this geometory is a path or points - * Returns this geometry as path or point - * @returns {boolean} a path is true, collection of points is false + * Checks whether or not this geometry is closed. + * @returns {boolean} Result of the path check. */ getIsPath(): boolean; /** - * Returns whether this geometry is closed - * @returns {boolean} closed path is true, otherwise false + * Checks whether or not this geometry is closed. + * @returns {boolean} Result of the closed check. */ getIsClosed(): boolean; /** - *Gets number of sets in this geometry - * @returns {number} number of sets as integer + * Gets the number of sets in this geometry. + * @returns {number} Number of sets. */ getSetCount(): number; /** - * Gets set by its index. Note: for polygons, first set is primary ring and subsequent - * ones are holes. - * @param {number} idx - option index of set to return as an integer; if not provided, - * returns as last set. - * @returns {number} a set as an array of points in the form [x1,y1,x2,y2, ... xn,yn] + * Gets a set from this geometry's set collection by index, or, if no + * index is provided, gets the last set. Note: for polygons, first set + * is primary ring and subsequent ones are holes. + * @param {number} [idx] Index of the set to return. + * @returns {number[]} A set as an array of points in the form [xn,yn]. */ getSet(idx: number): number[]; /** - * Pushes set onto geometry end - * @param {number} s - set as an array of points in the form [x1,y1,x2,y2, ... xn, yn] to push + * Adds a new set to this geometry's collection of sets. + * @param {number[]} s Set to add as an array of points in the form [xn,yn]. */ pushSet(s: number[]): void; /** - * Pops set off end of geometry - * @returns {number} set popped as an array of points in the form [x1,y1,x2,y2, ... xn, yn] + * Gets the last set in the geometry's set collection and removes it + * from the collection. + * @returns {number} Set removed as an array of points in the form [xn,yn]. */ popSet(): number[]; /** - * Creates SVG path data string from this - * @returns {geometry} string of SVG path or null if not a path + * Creates SVG path data from this geometry if it is a path. + * @returns {string} String of the SVG path or null the geometry is not a path. */ toSvgPathData(): string; /** - * Adds point onto last set in geometry. If geometry is empty, - * automatically creates set to add to. - * @param {point} pt - a point to add - * @returns {number} {setIdx: [0-based index of set the point was added to] , idx: [the 0- - * based index of the x-coord added]} + * Adds point to the last set in geometry's set collection. If the + * geometry is empty, a new set is added to the geometry first. + * @param {point} pt The point to add. + * @returns {object} Object of the form {setIdx, idx} where setIdx is + * the 0-based index of the set the point was added to and idx is the + * 0-based index of the point in its set. */ addPointToLastSet(pt: point): { setIdx: number; idx: number; }; /** - * Tests for validity of get. At least one path - * with two verticies plus at least one ring with at least - * three vertices. - * Returns true if it is a point collection + * Tests the validity of this geometry. An open path geometry is valid + * if it has at least one set with at least two points. A closed + * geometry is valid if it has at least one set with at least three + * points. A point (non-path) geometry is always valid. * @returns {geometry} valid geometry is true, otherwise false. */ isValid(): boolean; /** - * Create wkt string from [this] - * @returns {string} a string of wkt + * Creates a wkt string from this geometry. + * @returns {string} A string of well known text. */ toString(): string; - toWkt(): string; /** - * Finds vertex of geometry nearest to the given point - * @param {point} pt - point of the reference point - * @returns {number|point} an associated array closestVertex with: - * - closestVertex.setIdx, index of the set the vertex is in - * - closestVertex.ptIdx, index of the point of vertex in set - * - closestVertext.pt, pt of the vertex - *- closestVertex.distance, distance of vertex to reference point in projected units + * Finds the point in this geometry nearest to the given point. + * @param {point} pt Reference point. + * @returns {object} An object of the form {setIdx, ptIdx, pt, distance} + * where setIdx is the index of the set the point is in, ptIdx is the + * index of the point in the set, pt is the point object, and distance + * is the distance of the point to the reference point in map units. */ findNearestVertex(pt: point): { setIdx: number; ptIdx: number; pt: point; distance: number; }; /** * Finds point along boundary of geometry nearest to the given point - * @param {point} point of the reference point - * @param {boolean} close - closest point - * @returns {number|point} associated array closestPoint with: - * - closestPoint.setIdx, index of the set the point is in - * - closestPoint.ptIdx, index of the first point of the segment which the point is in - * - closestPoint.pt, pt of the point - * - closestPoint.distance, distance of the point to the reference point in projected units + * @param {point} pt Reference point. + * @param {boolean} [close] Flag to indicate whether this geometry + * should be treated as a closed geometry. + * @returns {object} An object of the form {setIdx, ptIdx, pt, distance} + * where setIdx is the index of the set the point is in, ptIdx is the + * index of the point in the set, pt is the point object, and distance + * is the distance of the point to the reference point in map units. */ findNearestSegment(pt: point, close?: boolean): { setIdx: number; ptIdx: number; pt: point; distance: number; }; /** - * Finds coordinates in map units of midpoint of geometry - * @param {number} idx - optional index of line to find labeling point for; - if not provided, returns labeling point of last line. - * @returns {point} coordinates of midpoint of line as a point + * Finds coordinates in map units of the midpoint of this geometry. If + * this geometry is an open path, the midpoint is the midpoint of the + * path. If this geometry is a closed path, the midpoint is the centroid + * of the polygon. If a set index is not provided, finds the labeling + * point for the last set in this geometry's set collection. + * @param {number} [idx] Index of set for which to find the labeling point. + * @returns {point} Midpoint of this geometry. */ getLabelingPoint(idx?: number): point; /** - * Determines whether geometry contains a point - * @param {point} pt - a point to contain - * @returns {boolean} If contains point is true, otherwise false + * Tests whether this geometry contains a given point/ + * @param {point} pt The reference point. + * @returns {boolean} Result of the containment test. */ contains(pt: point): boolean; } - /** @module my/geometry */ + /** + * Exposes static functions that act on or return geometries, including + * constructors for specific geometries such as polygon and polyline. + * @module geometry + */ export module geometry { /** - * This is a desc of polyline extends geometry class. - * @class - * @classdesc This is a description of the geometry class. + * A polyline object which is an open path geometry with one or more paths. + * @class polyline */ class polyline extends geometry { constructor(geom: geometry); /** - * Gets geometry in a polyline - * @returns {geometry} a geometry + * Gets the underlying geometry of the polyline. + * @returns {geometry} The polyline's underlying geometry object. */ getGeometry(): geometry; /** - * Creates deep copy polyline object of underlying geometry - * @returns {polyline} - a new geometry + * Creates a new polyline object from a deep copy of the underlying geometry. + * @returns {polyline} Thew new cloned polyline. */ clone(): polyline; /** - * Gets number of lines in polyline - * @returns {number} - lines as integer + * Gets number of lines in this polyline. + * @returns {number} Number of lines. */ getLineCount(): number; /** - * Gets line in polyline by its index - * @para {number} idx - option index of line to return as an integer; - * if not provided, returns last line - * @returns {number[]} a line as an array of x and y points in the form + * Gets a line from this polyline's liune collection by index, or, + * if no index is provided, gets the last line. + * @param {number} [idx] Index of the line to return. + * @returns {number[]} A line as an array of points in the form [xn,yn]. */ getLine(idx: number): number[]; /** - * Pushes line onto polyline end - * @param {number[]} s - a line as an array of y and y points to push + * Adds a new line to this polyline's line collection. + * @param {number[]} s Line to add as an array of points in the form [xn,yn]. */ pushLine(s: number[]): void; - + /** + * Gets the last line in the polyline's set collection and removes it + * from the collection. + * @returns {number} Line removed as an array of points in the form [xn,yn]. + */ popLine(): number[]; /** - * Calculates the line distance in a polyline according to projected map cooordinates - * @param {number} idx - options index of line to calculate the distance of an integer; if not provided, returns distance of last line - * @returns lenth in projected units in meters of distance of polyline + * Calculates distance of a line in a polyline by index according + * to projected map cooordinates. If no index is provided, uses + * the last line in the polyline's set collection. + * @param {number} [idx] Index of the line for which to compute the distance. + * @returns {number} Length in projected units of the distance of the line. */ getProjectedDistance(idx: number): number; /** - * Calculates distance of a line in polyline from actual distance measurements - * @param {number} idx - options index of line to calculate distance of an integer; if not provided, returns distance of the last line - * @returns {number} length in meters of polyline distance + * Calculates distance of a line in a polyline by index according + * to actual distance. If no index is provided, uses the last line + * in the polyline's set collection. + * @param {number} [idx] Index of the line for which to compute the distance. + * @returns {number} Distance in meters of the line. */ getActualDistance(idx: number): number; /** - * Determines polyline intersection of another geom - * @param {geometry} geom - geometry to test against - * @returns {boolean} intersection is true, otherwise false + * Determines whether this polyline intersects a given geometry. + * @param {geometry} geom Geometry to test against. + * @returns {boolean} Result of the intersection test. */ intersects(geom: geometry): boolean; } /** - * This is a desc of polygon extends geometry class. - * @class - * @classdesc This is a description of the polygon extends geometry class. + * A polyline object which is a closed path geometry with one or more paths. + * @class polygon */ class polygon extends geometry { constructor(geom: geometry); /** - * Returns geometry of the polygon - * @returns {geometry} a geometry + * Gets the underlying geometry of the polygon. + * @returns {geometry} The polygon's underlying geometry object. */ getGeometry(): geometry; /** - * Creates new polygon object from deep copy of underlying geometry - * @returns {geometry} - a new geometry + * Creates a new polygon object from a deep copy of the underlying geometry. + * @returns {polygon} Thew new cloned polygon. */ clone(): polygon; /** - * Gets polygon ring number - * @returns {number} - a ring integer number + * Gets number of rings in this polygon. + * @returns {number} Number of rings. */ getRingCount(): number; - + /** - * Gets polygon ring by its index. Primary ring is first and subsequent ones are holes. - * @param {number} idx - option ring index to return as integer, if not provided, returns last set - * @returns {number[]} array of x and y points in ring + * Gets a ring from this polygon's set collection by index, or, + * if no index is provided, gets the last ring. + * @param {number} [idx] Index of the ring to return. + * @returns {number[]} A ring as an array of points in the form [xn,yn]. */ getRing(idx: number): number[]; /** - * Pushes ring onto polygon end - * @param {number[]} s - array of x and y points in the form to push in ring - */ + * Adds a new ring to this polygon's ring collection. + * @param {number[]} s Ring to add as an array of points in the form [xn,yn]. + */ pushRing(s: number[]): void; /** - * Pops ring of end of polygon - * @returns {number[]} popped ring as array of x and y point in the form + * Gets the last ring in the polygon's ring collection and removes it + * from the collection. + * @returns {number} Ring removed as an array of points in the form [xn,yn]. */ popRing(): number[]; /** - * Calculates polyline line distance from projected map coord - * @param {number} idx - option line index to calculate distance as integer; if not provided, returns distance of last line - * @returns {number} polyline distence length in projected meters + * Calculates area of a ring in a polygon by index according + * to projected map cooordinates. If no index is provided, uses + * the last ring in the polygon's ring collection. + * @param {number} [idx] Index of the ring for which to compute the area. + * @returns {number} Area in square projected units of the ring. */ getProjectedArea(idx: number): number; /** - * Calculates polygon ring perimeter from projected map coord - * @param {number} idx - option index to get projected perimeter of ring. - * @returns {number} distance in projected meters of polygon perimeter + * Calculates perimeter of a ring in a polygon by index according + * to projected map cooordinates. If no index is provided, uses + * the last ring in the polygon's ring collection. + * @param {number} [idx] Index of the ring for which to compute the perimeter. + * @returns {number} Length in projected units of the distance of the ring. */ getProjectedPerimeter(idx: number): number; /** - * Calculates polygon ring are from actual distance measurements - * @param {number} idx - option index to get ring perimeter. - * @returns {number} polygon area in square meters + * Calculates area of a ring in a polygon by index according + * to the actual area. If no index is provided, uses the last ring + * in the polygon's ring collection. + * @param {number} [idx] Index of the ring for which to compute the area. + * @returns {number} Area in square meters of the ring. */ getActualArea(idx: number): number; /** - * Calculates polygon ring perimeter from actual distance measurements - * @param {number} idx - option index to get actual ring perimeter. - * @returns {number} polygon perimeter distance in meters + * Calculates perimeter of a ring in a polygon by index according + * to actual distance. If no index is provided, uses the last ring + * in the polygon's ring collection. + * @param {number} [idx] Index of the ring for which to compute the perimeter. + * @returns {number} Length in meters of the perimeter of the ring. */ getActualPerimeter(idx: number): number; /** - * Determines polygon intersection of another geometry - * @param {geometry} geom - geometry to test against - * @returns {boolean} intersection is true, otherwise false + * Determines whether this polygon intersects a given geometry. + * @param {geometry} geom Geometry to test against. + * @returns {boolean} Result of the intersection test. */ - intersects(geom: geometry): boolean; + intersects(geom: geometry): boolean; /** - * Determines overlapping of polygons. - * @param {polygon} poly - polygon to test against - * @returns {boolean} overlap is true, otherwise false + * Determines whether this polyline overlaps a given geometry. + * @param {geometry} geom Geometry to test against. + * @returns {boolean} Result of the intersection test. */ overlaps(poly: polygon): boolean; - } - export module polygon { - /** - * Create MultiPolygon from [this]. - * @returns {polygon} a new multiPolygon + * Convert this polygon into an array of OGC compliant polygons where + * the first set is a ring and all subsequent contained sets are holes. + * @returns {polygon[]} An array of OGC polygons. */ - export function toMultiPolygon(): polygon[]; + toMultiPolygon(): polygon[]; } } + /** - * Constructor creates a geometry style. - * This is a desc of geometryStyle export class. - * @class - * @classdesc This is a description of the geometry class. - * @returns {geometry} a new geometryStyle + * A style specification for geometry objects. + * @class geometryStyle */ export class geometryStyle { constructor(); /** * Gets path outline thickness in pixels. - * @returns {number} thickness as numeric + * @returns {number} Thickness of path outline. */ getOutlineThicknessPix(): number; /** * Sets path outline thickness in pixels. - * @param {number} t - thickness as a numeric + * @param {number} t Desired thickness. */ setOutlineThicknessPix(t: number): void; /** - * Gets path outline color as css style string - * @returns {string} outline color as string + * Gets path outline color as a CSS style string. + * @returns {string} Outline color as a CSS style string. */ getOutlineColor(): string; /** - * Sets path outline color as css style string. - * @param {string} c - outline color as string + * Sets path outline color from a CSS style string. + * @param {string} c Outline color as a CSS style string. */ - setOutlineColor(t: string): void; + setOutlineColor(c: string): void; /** - * Gets path outline opacity from 0 to 1. - * @returns {number} outline opacity as numeric + * Gets path outline opacity in decimal format. + * @returns {number} Outline opacity. */ getOutlineOpacity(): number; /** - * Set path outline opacity from 0 to 1. - * @param {number} o - outline opacity as numeric + * Set path outline opacity to a decimal between 0 and 1. + * @param {number} o Outline opacity. */ setOutlineOpacity(o: number): void; /** - * Gets path fill color as css style string - * @returns {string} fill color as string + * Gets fill color as a CSS style string. + * @returns {string} Fill color as a CSS style string. */ getFillColor(): string; /** - * Set path fill color as css style string. - * @param {string} c - fill color as string + * Sets fill color as a CSS style string. + * @param {string} c Fill color as a CSS style string. */ setFillColor(c: string): void; /** - * Gets path fill opacity from 0 to 1. - *@returns {number} fill opacity as numeric + * Gets fill opacity in decimal format. + * @returns {number} Fill opacity. */ getFillOpacity(): number; /** - * Sets path fill opacity from 0 to 1 - * @param {number} o - fill opacity as numeric + * Sets fill opacity to a decimal between 0 and 1. + * @param {number} o Fill opacity. */ setFillOpacity(o: number): void; /** - * Gets dash array string for path - * @returns {string} a dash array as a string (defaults to null [solid stroke]) + * Gets the dash array as a string. + * @returns {string} Dash array as astring. */ getDashArray(): string; /** - * Sets dash array string for path - * @param {string} da - CSS dash array as a string + * Sets dash array string from a CSS style string. Defaults to solid + * stroke if no dash array string is provided. + * @param {string} [da] Dash array as a CSS style string. */ setDashArray(da: string): void; } + /** - * Executes the license - * @returns {string} a license + * Gets the mapsjs license. + * @returns {string} The license. */ export var license: string; + /** - * This is a desc of point export class. - * @class - * @classdesc This is a description of the point class. + * A simple point class with x and y coordinates. + * @class point + */ export class point { constructor(x: number, y: number); /** - * Returns x coord as float - * @returns {number} x coord as a float + * Returns the x coordinate. + * @returns {number} The x coordinate. */ getX(): number; /** - * Returns y coord as float - * @returns {number} - a y coord as a float + * Returns the y coordinate. + * @returns {number} The y coordinate. */ getY(): number; /** - * Converts point object to associative arry with x and y property names - * @returns {pointObject} - an associative array with x and y property names + * Returns the x and y coordinates of this point as a pointObject. + * @returns {pointObject} Representaton of this point as an pointObject. */ toProps(): pointObject; /** - * Test for matching locations of supplied point and [this] - * @param {point} pt - point to test - * @returns {boolean} - matching points is true, otherwise false + * Equality comparer between this point and a given reference point. + * @param {point} pt Reference point. + * @returns {boolean} Result of the equality test. */ equals(pt: point): boolean; /** - * Creates new point from [this] offset by supplied x and y deltas. - * @param {number} dx - x coord offset as float - * @param {number} dy - y coord offset as float - * @returns {point} a new point offset + * Creates a point from this point offset by a given x and y distance. + * @param {number} dx The x offset. + * @param {number} dy The y offset. + * @returns {point} The offset point. */ createOffsetBy(dx: number, dy: number): point; /** - * Creates new n-sided polygon from this point - * @param {number} sides - number of polygon sides - * @param {number} radius - distance to polygon vertices - * @returns {geometry|polygon} a new polygon + * Creates new n-sided polygon around this point. + * @param {number} sides Number of polygon sides. + * @param {number} radius Distance to polygon points. + * @returns {polygon} The generated polygon. */ convertToPoly(side: number, radius: number): geometry.polygon; /** - * Converts point object to associative array with x and y property names - * @returns {string} an associate array with x and y property names + * Gets the wkt representation of this point. + * @returns {string} The well known text for this point. */ toString(): string; /** - * Creates a deep copy new point of this. - * @returns {point} a new point clone + * Creates a deep copy of this point. + * @returns {point} The new cloned point. */ clone(): point; /** - * Returns this point's bounding box for consistency with geometry - * @returns {envelope} a new envelope + * Returns this point's bounding box. + * @returns {envelope} The bounding box of the point as an envelope. */ getBounds(): envelope; /** - * Computes distance between this and supplied point - * @param {point} pt - point to compute distance to - * @returns {number} distance as a float + * Computes distance between this point and a given point in projected + * map units. + * @param {point} pt Point to which to compute distance. + * @returns {number} Distance from this point to the given point in + * projected map units. */ distanceTo(pt: point): number; } /** - * @module my/point + * Exposes static functions that act on points. + * @module point */ export module point { /** - * Shows the distance for the application - * @param {number} x1 - - * @param {number} y1 - - * @param {number} x2 - - * @param {number} y2 - - * @returns {number} a distance + * Computes the distance between two points in coordinate units. + * @param {number} x1 The x coordinate for the first point. + * @param {number} y1 The y coordinate for the first point. + * @param {number} x2 The x coordinate for the second point. + * @param {number} y2 The y coordinate for the second point. + * @returns {number} Distance in coordinate units. */ export function distance(x1: number, y1: number, x2: number, y2: number): number; /** - * Shows the midpoint for the application - * @param {number} x1 - - * @param {number} y1 - - * @param {number} x2 - - * @param {number} y2 - - * @return {point} a midpoint + * Computes the midpoint of two points. + * @param {number} x1 The x coordinate for the first point. + * @param {number} y1 The y coordinate for the first point. + * @param {number} x2 The x coordinate for the second point. + * @param {number} y2 The y coordinate for the second point. + * @return {point} Midpoint point. */ export function midpoint(x1: number, y1: number, x2: number, y2: number): point; } /** - * @module my/geometry - */ + * Exposes static functions related to the Spherical Mercator projection. + * @module sphericalMercator + */ export module sphericalMercator { /** - * Static function. Returns the Epsg number for the Spherical Mercator - * @return {number} an integer + * Gets the EPSG number for Spherical Mercator. + * @return {number} ESPG number. */ export function getEpsg(): number; /** - * Static function. Returns the minimum zoom level for this projection. - * @returns {number} an integer + * Gets the minimum zoom level for this projection. + * @returns {number} Minimum zoom level. */ export function getMinZoomLevel(): number; /** - * Static function. Override the minimum zoom level used by this projection. Normally this is set to 1.0 and should not need to be altered. - * @param {number} minZ - minimum zoom level as numeric + * Sets the minimum zoom level for this projection. Normally this is + * set to 1.0 and should not be altered. + * @param {number} minZ Desired minimum zoom level. */ export function setMinZoomLevel(minZ: number): void; /** - * Static function. Return the maximum zoom level for this projection. - * @returns {number} an integer + * Gets the maxmimum zoom level for this projection. + * @returns {number} Maximum zoom level. */ export function getMaxZoomLevel(): number; /** - * Static function. Override the maximum zoom level used by this projection. Normally set to 20.0 and should not need to be altered. - * @param {number} maxZ1 - maximum zoom level as numeric + * Sets the maximum zoom level for this projection. Normally this is + * set to 20.0 and should not be altered. + * @param {number} maxZ1 Desired maximum zoom level. */ export function setMaxZoomLevel(maxZ: number): void; /** - * Static function. Returns tile width or height in pixels - * @returns {number} an integer + * Gets the tile height and width in pixels. + * @returns {number} The height and width of the tiles in pixels. */ export function getTileSizePix(): number; /** - * Static function. Returns display dpi (defaults to 96). The dpi is recomputer on page load complete. - * @returns {number} an integer + * Gets the display DPI, which defaults to 96. Note: The dpi is + * recomputed on page load complete. + * @returns {number} Dots per inch on display. */ export function getDpi(): number; /** - * Static function. Override the display dpi (defaults to 96). The dpi is recomputed on page load complete. - * @param {number} dpi - dots per inch on display + * Set the display DPI, which defaults to 96. Note: The DPI is + * recomputed on page load complete. + * @param {number} dpi Dots per inch on display. */ export function setDpi(dpi: number): void; /** - * Static function. Return the radius polar and equitorial in meters for this projection. - * @returns {number} a numeric + * Return the equitorial radius in meters for this projection. + * @returns {number} Equitorial radius in meters. */ export function getRadius(): number; /** - * Static function. Returns circumference polar and equitorial in meters for this projection - * @returns {number} a numeric + * Returns equitorial circumference in meters for this projection + * @returns {number} Equitorial circumference in meters. */ export function getCircumference(): number; /** - * TODO - */ + * Returns half the equitorial circumference in meters for this projection + * @returns {number} Half of the equitorial circumference in meters. + */ export function getHalfCircumference(): number; /** - *Static function. Get the envelope in map units for a given quadtree node (tile) based on x,y,z in the QuadTree - * @param {number} x - x position - * @param {number} y - y position - * @param {number} z - z position - * @returns {envelope} an envelope + * Get the envelope in map units for a given quadtree node, i.e. tile, + * based on the given x, y, and z quadtree coordinates. + * @param {number} x The x coordinate. + * @param {number} y The y coordinate. + * @param {number} z The z coordinate. + * @returns {envelope} Envelope of the tile in map units. */ export function getQuadTreeNodeToMapEnvelope(x: number, y: number, z: number): envelope; /** - * Static function. Gets envelope (x,y array) of tile positions (indices) in QuadTree from an evelope in map units and zoom level. - * @param {envelope} env - an envelope in map units - * @param {number} z - zoom level - * @returns {envelope} an evelope + * Gets the envelope in map units of tiles in the quadtree from an + * evelope in map units and a zoom level. + * @param {envelope} env Envelope for which to find intersecting tiles. + * @param {number} z Zoom level with which to test for intersection. + * @returns {envelope} The envelope in map units of the tiles. */ export function getQuadTreeNodeRangeFromEnvelope(env: envelope, z: number): envelope; /** - * Static function. Gets projected map units per pixel for a given zoom level. - * @param {number} zoomLevel - zoom level - * @returns {number} float + * Gets projected map units per pixel for a given zoom level. + * @param {number} zoomLevel Reference zoom level. + * @returns {number} Projection units per pixel. */ export function getProjectionUnitsPerPixel(zoomLevel: number): number; /** - * Returns a scale transform to apply to shapes so distance and are computations will be actual Earth-geodesic units instead of projected map units. - * @param {number} mapPtY - location where computation is made (latitude is used) - * @returns {number} float + * Gets the required scale transform to apply to shapes so distance + * and area computations yield actual Earth-geodesic units instead of + * projected map units. + * @param {number} mapPtY Reference latitude for the computation. + * @returns {number} Scale transform multiplier. */ export function getActualShapeScaleTransform(mapPtY: number): number; /** - * Static function. Gets actual physical (on the ground) meters per pixel for a given zoom level and map point in map units. - * @param {point} mapPt - location where computation is made (latitude is used) - * @param {number} z - zoom level - * @returns {number} float + * Gets actual, on-the-ground meters per pixel for a given zoom level + * and map point in map units. + * @param {point} mapPt Reference location for the computation. + * @param {number} z Reference zoom level. + * @returns {number} Meters per pixel multiplier. */ export function getActualUnitsPerPixel(mapPt: point, zoomLevel: number): number; /** - * Static function. Gets the zoom level based on a supplied envelope in map and device units. - * @param {envelope} envelopeMap - envelope in map units - * @param {envelope} evelopeDevice - envelope in device units - * @returns {number} numeric best fit zoom level + * Gets the optimal zoom level for a given envelope in map units + * based on the envelope of visible device area in pixels. + * @param {envelope} envelopeMap Envelope in map units to display. + * @param {envelope} envelopeDevice Envelope in pixels of visible area. + * @returns {number} Optimal zoom level for viewing envelopeMap. */ export function getBestFitZoomLevelByExtents(envelopeMap: envelope, envelopeDevice: envelope): number; /** - * Static function. Gets a quad-key from an x,y,z QuadTree node. - * @param {number} x - x location - * @param {number} y - y location - * @param {number} z - z location - * @returns {string} string quad-key + * Gets a quad-key from x, y, and z coordinates. + * @param {number} x The x coordinate. + * @param {number} y The y coordinate. + * @param {number} z The z coordinate. + * @returns {string} Quad-key string. */ export function getQuadKeyFromXYZ(x: number, y: number, z: number): string; /** - * Static function. Gets x,y,z QuadTree node from a quad-key - * @param {string} key - quad-key - * @return {object} associative array of x,y,z QuadTree node - */ + * Gets x, y, and z coordinates as an object from a given quad-key. + * @param {string} key Reference quad-key. + * @return {object} JavaScript object of the form {x,y,z}. + */ export function getXYZFromQuadKey(key: string): { x: number; y: number; z: number; }; /** - * Static function. Project a lon/lat point to a Spherical Mercator point - * @param {point} lonLat - point where x-coord is lon and y-coord is lat - * @returns a point + * Project a point from latitude/longitude to Spherical Mercator. + * @param {point} lonLat Point object in latitude/longitude. + * @returns {point} The same point in Spherical Mercator. */ export function projectFromLatLon(lonLat: point): point; /** - * Static function. De-project a Spherical Mercator point to a lat-lon. - * @param {point} mapPt - point in Spherical Mercator - * @returns {point} point where x-coord is lon and y-coord is lat + * Project a point from Spherical Mercator to latitude/longitude. + * @param {point} mapPt Point object in Spherical Mercator. + * @returns {point} The same point in latitude/longitude. */ export function deprojectToLatLon(mapPt: point): point; } - /** - * Contructor creates a styled geometry from the provided geometry. This is an - * adornment pattern to add rendering style to raw geometry. - * This is a desc of styledGeometry export class. - * @class - * @classdesc This is a description of the styledGeometry class. - * @param {geometry} geometry - the geometry to adorn - * @param {geometry} geometryStyle - an optional geometryStyle - * @returns {point} a point to add + * A geometry object decorated with a geometry style object + * @class styledGeometry */ export class styledGeometry { constructor(geom: geometry, gStyle: geometryStyle); /** - * Set internal geometryStyle for this styledGeometry. This overrides what was passed in as second constructor param - * @param {geometryStyle} gs - new styledGeometry + * Set this styledGeometry's geometryStyle. + * @param {geometryStyle} gs A new styledGeometry. */ setGeometryStyle(gs: geometryStyle): void; /** - * Gets underlying geometry instance passed in. - * @returns a geometry + * Gets the styledGeometry's underlying geometry object. + * @returns {geometry} The underlying geometry. */ getGeometry(): geometry; /** * Gets path outline thickness in pixels. - * @returns {number} thickness as numeric + * @returns {number} Thickness in pixels. */ getOutlineThicknessPix(): number; /** * Sets path outline thickness in pixels. - * @param {number} t - thickness as numeric + * @param {number} t Thickness in pixels. */ setOutlineThicknessPix(t: number): void; /** - * Gets path outline color as css style string. - * @returns {string} an outline color as a string + * Gets path outline color as a CSS style string. + * @returns {string} Outline color as a CSS style string. */ getOutlineColor(): string; /** - * Sets path outline color as css style string - * @param {string} c - outline color as a string + * Gets path outline opacity in decimal format. + * @returns {number} Outline opacity. */ setOutlineColor(c: string): void; /** - * Gets path outline opacity from 0 to 1 - * @returns {number} an outline opacity as numeric + * Gets path outline opacity in decimal format. + * @returns {number} Outline opacity. */ getOutlineOpacity(): number; /** - * Sets path outline opacity from 0 to 1 - * @param {number} o - outline color as string + * Set path outline opacity to a decimal between 0 and 1. + * @param {number} o Outline opacity. */ setOutlineOpacity(o: number): void; - /** - * Gets path fill color as css style string - * @returns {string} a fill color as a string + /** + * Gets fill color as a CSS style string. + * @returns {string} Fill color as a CSS style string. */ getFillColor(): string; /** - * Sets path fill color as css style string - * @param {string} c - fill color as a string + * Sets fill color as a CSS style string. + * @param {string} c Fill color as a CSS style string. */ - setFillColor(t: string): void; + setFillColor(c: string): void; /** - * Gets path fill opacity from 0 to 1 - * @returns {number} a fill opacity as numeric + * Gets fill opacity in decimal format. + * @returns {number} Fill opacity. */ getFillOpacity(): number; /** - * Sets path fill opacity from 0 to 1 - * @param {number} o - fill opacity as numeric + * Sets fill opacity to a decimal between 0 and 1. + * @param {number} o Fill opacity. */ setFillOpacity(o: number): void; /** - * Gets dash array string for path - * @returns {string} a dash array as a string (defaults to null [solid stroke]) + * Gets the dash array as a string. + * @returns {string} Dash array as astring. */ getDashArray(): string; /** - * Sets dash array string for path - * @param {string} da - CSS dash array as a string + * Sets dash array string from a CSS style string. Defaults to solid + * stroke if no dash array string is provided. + * @param {string} [da] Dash array as a CSS style string. */ - setDashArray(t: string): void; + setDashArray(da: string): void; /** - * Gets optional animation function called when SVG node is created. You can use the loopback parameter on complete to call itself and create repeating animation. - * @returns {action} in the form function (pathElement, loopback) {} + * Gets optional animation function called when SVG node is created. + * @returns {function} Function with the signature animation(pathElement, loopback). */ getAnimation(): (pathElement: HTMLElement, loopback: () => void) => void; /** - * Sets optional animation function called when SVG nod is created. You can use loopback param on complete to call itself and create repeating animation. - * @param {function} a - in the form function (pathElement, loopback) {} + * You can use the loopback parameter on complete to call itself and + * create repeating animation. + * @param {function} Function with the signature animation(pathElement, loopback). */ - setAnimation(any): void; + setAnimation((pathElement: HTMLElement, loopback: () => void) => void): void; /** - * Renders this to a canvas context. Note we attach original geometry bounds to svg doc as an expando. - * @param {string} key - key to track svg DOM element - * @param {number} mupp - map units per pixel to create SVG element - * @returns {HTMLElement} a new SVG document root + * Renders this geometry as an SVG path. Note: We attach original + * geometry bounds to svg doc as an expando. + * @param {string} key Identifer to keep track of the SVG DOM element. + * @param {number} mupp Map units per pixel with which to create the SVG element. + * @returns {HTMLElement} A new SVG document root. */ createSvgPathElement(key: string, mapUnitsPerPix: number): HTMLElement; /** * Renders this to a canvas context. - * @param {CanvasRenderingContext2D} ctx - canvas context to render to + * @param {CanvasRenderingContext2D} ctx Canvas context to which to render. */ renderPathToCanvasContext(ctx: CanvasRenderingContext2D): void; } /** - * Durandal's version. - * @returns {string} + * The mapjs version. */ export var version: string; /** - * @module my/wkt - */ + * Exposes static functions for working with well known text. + * @module wkt + */ export module wkt { /** - * Parses wkt as a point. - * @param {string} w - wkt string - * @returns {point} a point + * Parses WKT as a point. + * @param {string} w A WKT string. + * @returns {point} The parsed point. */ export function parsePoint(wkt: string): point; /** - * Parses as a multipoint. - * @param [string} w - wkt string - * @retuns {geometry} geometry holding the set of points + * Parses WKT as a multipoint. + * @param [string} w A WKT string. + * @retuns {geometry} The parsed multipoint geometry. */ export function parseMultiPoint(wkt: string): geometry; /** - * Parses wkt as a linestring. - * @param {string} w - wkt string - * @returns {geometry} geometry holding the path + * Parses WKT as an open path geometry with a single set. + * @param {string} w A WKT string. + * @returns {geometry} The parsed open path geometry. */ export function parseLineString(wkt: string): geometry; /** - * Parses wkt as a multilinestring - * @param {string} w - wkt string - * @returns {geometry} geometry holding set of paths + * Parses WKT as an open path geometry with multiple sets. + * @param {string} w A WKT string. + * @returns {geometry} The parsed open path geometry. */ export function parseMultiLineString(wkt: string): geometry; /** - * Parses wkt as a polygon - * @param {string} w - wkt string - * @returns {geometry} geometry holding one or more closed paths (first is outer ring - * and optional subsequent closed paths are inner rings [holes]). + * Parses WKT as a closed path geometry with a single set. + * @param {string} w A WKT string. + * @returns {geometry} The parsed closed path geometry. */ export function parsePolygon(wkt: string): geometry; /** - * Parses wkt as a mulitpolygon. - * @param {string} w - wkt string - * @returns {geometry} geometry where each polygon is added as a collection of sets (ring/holes) - * so the multipolygon is flattened into a single multi-ring polygon. + * Parses WKT as a closed path geometry with multiple sets. + * @param {string} w A WKT string. + * @returns {geometry} The parsed closed path geometry. */ export function parseMultiPolygon(wkt: string): geometry; - - export function toMultiPolygonString(polys: geometry.polygon[]): string; - /** - * Parses wkt and determines type from the string. - * @param {string} w - wkt string - * @@returns {geometry} point (for point) or geometry for everything else (multipolygon - is an array of geometry.) + * Parses WKT as a geometry and determines its type from the string. + * @param {string} w The WKT string. + * @returns {any} The parsed shape, a point, geometry, or an array of + * polygons depending on the WKT. */ export function parse(wkt: string): any; + + /** + * Converts an array of polygons to an OGC compliant multipolygon WKT string. + * @param {polygon[]} polys Set of polygons to parse into WKT. + * @returns {geometry} The OGC compliant WKT for the polygons. + */ + export function toMultiPolygonString(polys: geometry.polygon[]): string; } /** - * @module my/geometry - */ + * Exposes various tile-related constructors, including layers, descriptors, + * and requestors. + * @module tile + */ export module tile { /** * A tile layer is a view on the map containing an array of rectangular content. - * This is a desc of layer export class. - * @class - * @classdesc This is a description of the layer class. + * @class layer */ export class layer { constructor(id: string, useBackdrop?: boolean, maxConcurrentRequests?: number); @@ -1064,161 +1096,179 @@ declare module 'mapsjs' { /** * @param {number} m - number for margin in pixels */ - setContentExtentsMarginInPixels(m: number): void; + // setContentExtentsMarginInPixels(m: number): void; /** - * Gets ID associated with this tile.layer. - * @returns {string} a string + * Gets ID associated with this tile layer. + * @returns {string} ID of the layer. */ getId(): string; /** - * Returns true if this tile.layer uses a backdrop. - * @returns {boolean} a boolean + * Determines whether this tile layer uses a backdrop. + * @returns {boolean} Whether or not the layer uses a backdrop. */ getUseBackdrop(): boolean; /** - * Returns descriptor which describes how requested content is rendered or styled. - * @returns {function} an object that depends on the type of tile requestor associated with this tile layer. + * Returns the tile layer's descriptor, which describes how + * requested content is rendered or styled. + * @returns {object} The tile layer's descriptor. */ getDescriptor(): any; /** - * Sets descriptor which describes how requested content is rendered or styled. - * @param {function} d - an object that depends on type of tile requestor associated with this tile layer. + * Sets the tile layer's descriptor, which describes how requested + * content is rendered or styled. + * @param {function} d A descriptor for this tile layer. */ setDescriptor(d: any): void; - + /** + * Notifies the tile layer to check for changes to its descriptor. + */ notifyDescriptorChange(): void; /** - * Returns requestor which defines what kind of content to get and where to get it. - * @returns {tile.requestor} a boolean + * Returns this tile layer's requestor which defines what kind of + * content to get and where to get it. + * @returns {requestor} This tile layer's requestor. */ getRequestor(): tile.requestor; /** - * Sets requestor which defines what kind of content to get and where to get it. - * @param {tile.requestor} req - an instance that extends tile requestor - * @param {tile.requestor} opd - an optional descriptor so that both can be set in one call and incur only one content change event. - */ + * Sets this tile layer's requestor, which defines what kind of + * content to get and where to get it. + * @param {tile.requestor} req A requestor object. + * @param {tile.requestor} [desc] Descriptor object so that both + * can be set in one call and incur only one content change event. + */ setRequestor(req: tile.requestor, desc?: any): void; /** - * Returns optional renderer which defines how geometry data for a quadView is rendered. - * @returns {tile.renderer} an object + * Returns this tile layer's renderer if it exists, which defines + * how geometry data for a quadView is rendered. + * @returns {renderer} The renderer object. */ getRenderer(): tile.renderer; /** - * Sets optional renderer which defines how geometry data for quadView is rendered. The renderer delegate (function) takes a single quadView param. - * @param {tile.renderer} r - a function taking a single parameter + * Sets optional renderer which defines how geometry data for + * quadView is rendered. + * @param {renderer} r The renderer delegate function with + * signature renderer(quadview). */ setRenderer(r: tile.renderer): void; - + /** + * Notifies the tile layer to check for changes to its renderer. + */ notifyRendererChange(): void; /** - * Gets visibility state of this tile.layer. - * @returns {boolean} a boolean indicating whether layer is displayed or not + * Gets the visibility state of this tile layer. + * @returns {boolean} Whether or not this layer is visible. */ getIsVisible(): boolean; /** - * Sets visibility state of this tile.layer - * @param {boolean} v - boolean indicationg whether the layer is displayed or not + * Sets visibility state of this tile layer. + * @param {boolean} v Whether this layer should be visible or not. */ setIsVisible(v: boolean): void; /** - * Gets opacity of this tile.layer. - * @returns {number} 0.0 transparent to 1.0 opaque + * Gets the opacity of this tile layer. + * @returns {number} Opacity as a decimal. */ getOpacity(): number; /** - * Sets opacity of this tile.layer. - * @param {number} o - from 0.0 transparent to 1.0 opaque + * Sets opacity of this tile layer. + * @param {number} o Opacity as a decimal. */ setOpacity(o: number): void; /** - * Gets minimum zoom level where this tile.layer is visible. - * @returns {number} zoom level in the range supported by the projection (e.g. 1 to 20) + * Gets minimum zoom level where this tile layer is visible. + * @returns {number} The minimum zoom level. */ getMinZoomLevel(): number; /** * Sets minimum zoom level where this tile layer is visible. - * @param {number} minZ1 - any zoom level in the range supporeted by the projection (e.g. 1 to 20) + * @param {number} minZ The desired minimum zoom level. */ setMinZoomLevel(minZ: number): void; /** - * Gets maximum zoom level where this tile lay is visible. - * @returns {number} zoom level in the range supported by the projection (e.g. 1 to 20) + * Gets maximum zoom level where this tile layer is visible. + * @returns {number} The maximum zoom level. */ getMaxZoomLevel(): number; /** * Sets maximum zoom level where this tile layer is visible. - * @param {number} maxZ1 - any zoom level in the range supported by the projection (e.g. 1 to 20) + * @param {number} maxZ The desired maximum zoom level. */ setMaxZoomLevel(maxZ: number): void; /** - * Sets pixel bleed on quadTiles. Defaults to 1. Setting to zero for overlay layers with translucent polygon fills is recommended. Bleed overlap can create faint lines at tile boundries when fill is not opaque. - * @param {number} bleed - number of pixels from 0 to integer > 0 + * Sets pixel bleed on quadTiles, which defaults to 1. Setting this + * to zero for overlay layers with translucent polygon fills is + * recommended. Bleed overlap can create faint lines at tile + * boundries when fill is not opaque. + * @param {number} bleed The number of pixels to bleed. */ setTileBleedPix(bleed: number): void; /** - * Sets whether or not to retain and display previous level tile content as you - * change tile levels to provide a nice zoom level change effect. Once the next - * level is loaded the old level content is always discarded. Setting this to false - * if there is translucent content to display. Defaults to true (prior to version 9.0.0001 - * this value had the same state as useBackdrop.) - * @param {boolean} ret - set to true to retain and false to discard. + * Sets whether or not to retain and display previous level tile + * content as you change tile levels to provide a nice zoom level + * change effect. Once the next level is loaded the old level + * content is always discarded. This should be set to false if there + * is translucent content to display. Defaults to true (prior to + * version 9.0.0001 this value had the same state as useBackdrop.) + * @param {boolean} ret Whether or not to retain interlevel content. */ setRetainInterlevelContent(retain: boolean): void; /** - * Enables or disables the fad-in on tile content (default is true). - * @param {boolean} fadeInE - boolean to enable or disable fade-in content + * Enables or disables the fade in on tile content, which defaults to enabled. + * @param {boolean} fadeIn Whether or not fade in on tile content + * should be enabled. */ setEnableTileFadeIn(fadeIn: boolean): void; /** - * Set optional function to be called on any tile layer errors. - * @param {function} a - action to call + * Sets the default action to take on error. + * @param {function} action Function to execute on error. */ setNotifyErrorAction(action: () => void): void; /** - * Sets optional function to be called when the tile loading queue for this layer - *has emptied. - * @param {function} a - action to call + * Sets an optional function to be called when the tile loading + * queue for this layer has emptied. + * @param {function} action Callback function. */ setNotifyLoadingQueueHasEmptiedAction(action: () => void): void; /** - *Sets optional function to be called by this layer's tile loader during - * processing. The supplied progress function takes tiles loaded and tiles total - * parameters. - * @param {number} tileLoaded - * @param {number} tileTotal + * Sets the optional function to be called by this layer's tile + * loader during processing. The supplied progress function takes + * tiles loaded and tiles total parameters. + * @param {function} action Callback of the signature action(tileLoaded, tilesTotal). */ - setNotifyLoadingQueueProgressAction(action: (tileLoaded: number, tilesTotal: number) => void): void; + setNotifyLoadingQueueProgressAction(action: (tilesLoaded: number, tilesTotal: number) => void): void; /** - * Sets option request processor for this tile layer. This is an advanced - * feature allowing developers to tap into tile request pipeline for purposes - * of customizing requests or manage custom caching. This is also the - * mechanism used for offline apps with frameworks such as phonegap. - * @param { + * Sets optional request processor for this tile layer. This is + * an advanced feature allowing developers to tap into tile + * request pipeline for purposes of customizing requests or manage + * custom caching. This is also the mechanism used for offline + * apps with frameworks such as phonegap. + * @param {function} Processor function with signature + * processor(requestor, descriptor, quad, timeoutMs, complete, error) */ setRequestProcessor(processorFunc: ( requestor: tile.requestor, @@ -1227,14 +1277,53 @@ declare module 'mapsjs' { timeoutMs: number, completeAction: (img: HTMLElement) => void, errorAction: (msg: string) => void) => void): void; + + /** + * Instructs the tile loader to populate a specified tile pyramid. + * This is used to fetch content (e.g. bitmap tiles) and preload + * it into the browser cache. + * @param {envelope} extents Envelope for which to fetch content. + * @param {number} startZoomLevel Minimum zoom level for which to + * fetch content. + * @param {number} endZoomLevel Maximum zoom level for which to + * fetch content. + */ preload(extents: envelope, startZoomLevel: number, endZoomLevel: number): void; - compose(extentsMapUnits: envelope, ententsDeviceUnits: envelope); + + /** + * Composes an array of quadtiles with composition information and + * requestor endpoints. This can be used to create static images + * or print-ready versions of this tile layer at arbitrary extents + * (both source and target) For example: If you needed a 5x3 inch + * 300 dpi output you can specify extents in device units to be + * 1500x900. This function determines the correct zoom level so + * that the source extents fits in the target extents to the + * nearest integer zoom level. + * @param {envelope} extentsMapUnits Source extents in map units. + * @param {envelope} extentsDeviceUnits Target extents in pixels. + * @returns {object} Composed object in the form + * {quadCollection, endpointCollection, idxMinX, idxMinY, ulX, ulY } + * where quadCollection is an array of quad objects, endpointCollection + * is an array of REST endpoints from which to obtain the tiled content, + * idxMinX and idxMinY are the minimum x and y tile indicies of the + * collection respectively, and ulX and ulY are the offset in pixels + * of the upper left tile from the upper left target extents. + */ + compose(extentsMapUnits: envelope, extentsDeviceUnits: envelope): { + quadCollection: tile.quad[]; + endpointCollection: string[]; + idxMinX: number; + idxMinY: number; + ulX: number; + ulY: number; + }; } /** - * This is a desc of layerOptions export class. - * @class - * @classdesc This is a description of the layerOptions class. + * A layerOptions object is a method for constructing a tile layer for + * immediate use, for example by passing it to the jQuery widget or + * in the knockout binding. + * @class layerOptions */ export class layerOptions { constructor(id: string, options: { @@ -1256,296 +1345,345 @@ declare module 'mapsjs' { }); /** - * Returns underlying tile layer. - * @returns {tile.layer} a tile layer + * Returns the underlying tile layer. + * @returns {layer} The underlying tile layer. */ getTileLayer(): tile.layer; /** - * Gets ID associated with this tile layerOptions - * @returns {string} a string + * Gets ID associated with the underlying tile layer. + * @returns {string} ID of the layer. */ getId(): string; /** - * Gets options associated with this tile layerOptions. + * Gets this layerOptions object as a JavaScript object. */ - getOptions(): {}; + getOptions(): any; } + /** + * The quad class represents a quad tile within three dimensional + * coordinate space. + * @class quad + */ export class quad { + + /** + * Gets the x coodinate of this quad tile. + * @returns {number} The x coordinate of this quad tile. + */ getX(): number; + + /** + * Gets the y coordinate of this quad tile. + * @returns {number} The y coordinate of this quad tile. + */ getY(): number; + + /** + * Gets the z coordinate of this quad tile, or depth. + * @returns {number} The z coordinate of this quad tile. + */ getLevel(): number; + + /** + * Gets the envelope in map units which encompasses this quad tile. + * @returns {envelope} The encompassing envelope of this quad tile. + */ getEnvelope(): envelope; + + /** + * Gets the string representation of this quad tile as a quad key. + * @returns {string} Quad key for this quad tile as a string. + */ toString(): string; + + /** + * Gets the quad key for this quad tile as a string. + * @returns {string} Quad key for this quad tile as a string. + */ getKey(): string; + + /** + * Compares this quad tile with another quad tile and determines + * whether or not they are equal. + * @param {quad} Quad tile with which to check for equality with this quad tile. + * @returns {boolean} Result of the equality test. + */ equals(q: quad): boolean; + + /** + * Generates the quad tile which is a given number of levels above + * this tile in the pyramid and in which this quad tile is contained. + * @param {number} ancestorsBack Number of levels above this tile the + * generated tile should be. + * @returns {quad} The generated parent tile. + */ factoryParent(ancestorsBack: number): quad; } /** - * @module my/geometry + * Exposes static functions for generating and handling quad tiles. + * @module quad */ export module quad { + + /** + * Generates a new quad tile based on a given quad key. + * @param {string} key The quad key from which to generate the quad tile. + * @returns The generated quad tile. + */ export function factoryQuadFromKey(key: string): quad; } + /** * A tile renderer handles converting JSON vector content loaded from the * MapDotNet REST feature service into a canvas rendering on a tile. - * This is a desc of renderer export class. - * @class - * @classdesc This is a description of the renderer class. + * @class renderer */ export class renderer { constructor(options? : { - - renderPoint?: (pt: point, context: CanvasRenderingContext2D) => void; - - - - renderGeometry?: (shape: geometry, context: CanvasRenderingContext2D) => void; - - - renderBitmap?: (img: HTMLElement, context: CanvasRenderingContext2D, contextSize: number, bleed: number) => void; + renderGeometry?: (shape: geometry, context: CanvasRenderingContext2D) => void; + renderBitmap?: (img: HTMLElement, context: CanvasRenderingContext2D, contextSize: number, bleed: number) => void; }); /** - * Sets render point function which takes a point and canvas context. The - *points passed in are transformed to pixel units and offset to context origin. - * @param {function} a - function of the form myPointRenderer (shape, context) - * @param {point} pt - shape of type point - * @param {CanvasRenderingContext2D} context - context is canvas context - * @param {number} context - context size in pixels (e.g. 256) + * Sets the render point function which takes a point and canvas + * context and renders the point to the canvas. The points passed + * in are transformed to pixel units and offset to context origin. + * @param {function} func Function of the form func(shape, context) + * where shape is the point object to be rendered and context is the + * canvas context on which to render. */ setRenderPoint(func: (pt: point, context: CanvasRenderingContext2D) => void): void ; /** - * Sets render geometry function which takes a geometry and canvas context. - * The geometries passed in are transformed to pixel units and offset to the context origin. - * @param {function} a - function of the form myGeomRenderer (shape, context) - * @param {geometry} shape - shape is of type geometry - * @param {CanvasRenderingContext2D} context - context is a canvas context - * @param {number} context - context size in pixels + * Sets render geometry function which takes a geometry and canvas + * context and renders the geometry to the canvas context. The + * geometries passed in are transformed to pixel units and offset + * to the context origin. + * @param {function} func Function with signature func(shape, context) + * where shape is the geometry to render and context is the canvas + * context on which to render. */ setRenderGeometry(func: (shape: geometry, context: CanvasRenderingContext2D) => void): void; /** - * Sets the render bitmap function which takes an image, bleed and canvas context. - * @param {function} a - function of the form myBitmapRenderer (imp, context, contextSize, bleed) - * @param {HTMLElement} img - image is of type Image - * @param {CanvasRenderingContext2D} context - context is a canvas context - * @param {number} contextSize - context size in pixels - * @param {number} bleed - bleed is >= 1.0 and represents extra margin around tile to paint - * so no gaps when trimmed + * Sets the render bitmap function which takes a bitmap image and + * a canvas context and renders the image to the canvas context. + * @param {function} func Function with the signature + * func(img, context, contextSize, bleed) where img is the bitmap + * image to render, context is the canvas context on which to + * render the image, contextSize is the size of the canvas context + * in pixels and bleed is the margin around each tile to bleed. */ setRenderBitmap(func: (img: HTMLElement, context: CanvasRenderingContext2D, contextSize: number, bleed: number) => void): void; - } - /** - * This is a desc of rendererDensityMap export class. - * @class - * @classdesc This is a description of the rendererDensityMap class. + * An auto-ranging density map renderer. + * @class rendererDensityMap */ export class rendererDensityMap { - constructor(); /** - * Sets bleed margin (1.0 = no bleed, > 1.0 for positive bleed). A bleed is - * required as points in adjacent tiles add to the "heat" computation in the tile - * being rendered. - * @param {number} bleed - a numeric > 1.0 + * Sets the bleed ratio, which is the sets the percentage of the + * margin around each tile to use in the tile's computation. Note: + * some bleed (i.e., greater than 1) is required since a heat map + * relies on adjacent data. + * @param {number} bleed The desired bleed ratio. */ setBleed(bleed: number): void; /** - * Sets grid width and height in cells. - * @param {number} gridSize - integer (typical values are from 16 to 64) + * Sets the number of rows and columns of cells to be used for + * computation within the grid. + * @param {number} gridSize Number of rows and columns used in + * the grid. */ setGridSize(gridSize: number): void; /** - * Sets filter radius corresponding to one standard deviation. - * @param {number} filterStdDevRadius - integer (typical values are from 2 to 4) + * Sets filter radius corresponding to standard deviations. The + * filter radius is the cutoff point at which adjacent cells no + * longer contribute to a cell's calculation. + * @param {number} filterStdDevRadius Number of standard deviations + * from the mean of a normal distribution to which to give positive + * weight. */ setFilterStdDevRadius(filterStdDevRadius: number): void; /** - * Sets color matrix for renderer. - * @param {number [] []} matrix - array of arrays [ (r,g,b,a) (r,g,b,a)...] from - * cold to hot (typically about a dozen colors) + * Sets color ranges from cold to hot for the renderer. + * @param {number[][]} matrix Array of arrrays of numbers, each + * of the form [r,g,b,a], where each array represents a color and + * colors range from cold to hot. Note: Typically, a dozen colors + * is sufficient. */ setColorMatrix(matrix: number[][]): void; /** - * Sets minimum cell value - * @param {number} mcv - minimum cell value (defaults to 0) + * Sets the minimum required cell value for a cell to receive + * a color. Default minimum value is 0. + * @param {number} mcv The minimum cell value for painting. */ setMinCellValue(min: number): void; /** - * Sets optional row action. This provides a means to creat hot spot maps by - * processing row atrributes instead a density map from counting features. - * @param {action} ra - row action function takes a single parameter (shape with - * an optionally attached fieldValues property). The function returns the value - *to add to the grid cell. + * Sets an optional action to perform on each row. This enables + * processing the values on one or more columns for each row for + * use in the density map computations. + * @param {action} ra Function to call on each row with signature + * action(row). The value returned from the function will is added + * to the cell's value. */ - setRowAction(action: (row: {}) => void): void; + setRowAction(action: (row: any) => number): void; /** - * Tells renderer to re-render density map and recompute ranges. This should - * be called if data changes or due to extent changes the density changes. - * @param {} + * Tells renderer to re-render density map and recompute ranges. + * This should be called if the data changes or if, due to extent + * changes, the density changes. */ notifyRecompute(): void; } - /** - * This is the base class for all requestors. - * This is a desc of requestor export class. - * @class - * @classdesc This is a description of the requestor class. + * This is a base requestor class. + * @class requestor */ export class requestor { - /** - * This is the base class constructor for all requestors. - */ constructor(); /** - * Gets formatted input using the endpoint template and supplied quad tile - * location and descriptor. - * @param {quad} quad - formatted input - * @returns {string} a uri string + * Gets formatted endpoint using the supplied quadtile and a descriptor. + * @param {quad} quad Quadtile for which to fetch the endpoint. + * @returns {string} The requested URI string. */ getFormattedEndpoint(quad: quad, descriptor: any): string; /** - * Gets data locally without using remote endpoint if implemented on the - * concrete requestor. - * @param {quad} quad - concrete requestor local data - * @returns {string} a json string + * Gets data locally if the requestor supports it. + * @param {quad} quad Quadtile for which to fetch the endpoint. + * @returns {string} The requested JSON data. */ getLocalData(quad: quad, descriptor: any): string; /** - * Creates unique sha1 string from this requestor plus supplied descriptor. - * This is useful in creating a unique key or folder for tile caching. This combined - * with tile's quad-key can uniquely/efficiently ID particular tile. - * @returns {string} a sha1 string + * Creates unique sha1 hash from this requestor and the supplied + * descriptor. This is useful in creating a unique key or folder + * for tile caching. This combined with a tile's quad-key can + * efficiently and uniquely identify a particular tile. + * @params {descriptor} The descriptor for which to create the hash. + * @returns {string} The generated sha1 hash. */ hash(descriptor: any): string; /** - * Gets whether or not the concrete class returns bitmap image - * @returns {boolean} true (default) if REST service returns an image and false if it is JSON + * Determines whether or not this requestor returns bitmap images. + * @returns {boolean} Whether or not this requestor returns bitmap + * images. */ getIsRestImage(): boolean; /** - * Sets whether or not the concrete class returns a bitmap image - * @param {boolean} flag/iri - boolean + * Sets whether this requestor should return bitmap images. + * @param {boolean} flag Whether or not this requestor should return + * bitmap images. */ setIsRestImage(flag: boolean): void; /** - * Gets whether or not the concrete class uses an endpoint rathar than local data. - * @returns {boolean} true (default) if this requestor uses an endpoint + * Determines whether or not this requestor uses an endpoint + * rather than local data. + * @returns {boolean} Whether or not this requestor gets data from + * an endpoint. */ getUsesEndpoint(): boolean; /** - * Sets whether or not the concrete class uses an endpoint rather than local data. - * @param {boolean} flag/ue - boolean + * Sets whether or not this requestor uses an endpoint rather than + * local data. + * @param {boolean} Whether or not this requestor should get data + * from an endpoint. */ setUsesEndpoint(flag: boolean): void; /** - * Gets format of data returned by REST service - * @returns {string} string specifying data format (default 'json') + * Gets format of data returned by REST service. + * @returns {string} Data format returned by the REST service. */ getDataFormat(): string; /** - * Sets format of data returned by REST service - * @param {string} df - data format as string ('json' or 'jsonp') + * Sets format of data that should be returned by REST service. + * @param {string} df Name of the data format the REST service + * should use. */ setDataFormat(df: string): void; /** - * Returns whether or not caching is enabled for vector-based requestors. This - * value is set on the $.ajax call 'cache' parameter. - * @returns {boolean} true (default) if caching enabled + * Returns whether or not caching is enabled for vector-based + * requestors. + * @returns {boolean} Whether or not caching is enabled. */ getCacheEnabled(): boolean; /** - * Sets whether or not caching is enabled for vector-beased requestors. This - * value is set on the $.ajax call 'cache' parameter. + * Sets whether or not caching is enabled for vector-beased requestors. * @param {boolean} flagce - true (default) if caching is enabled */ setCacheEnabled(flag: boolean): void; /** - * Gets requestor timeout in mS - * @returns {number} an integer + * Gets requestor timeout in miliseconds. + * @returns {number} Requestor timeout in miliseconds. */ getTimeoutMs(): number; /** - * Sets requestor timeout in mS - * @param {number} ms - an integer + * Sets requestor timeout in miliseconds. + * @param {number} ms Desired requestor timeout in miliseconds. */ setTimeoutMs(ms: number): void; - /** - * Gets any key/value pairs attached to ajax call (such as username and password) - * @returns {} [] associative array or null for none + /** ??? + * Gets the additional + * @returns {object[]} */ getKeyVals(): {}[]; - + /** Set any key/value pairs that are attached to the ajax call (such as username and password) + */ setKeyVals(options: {}[]): void; /** - * Gets maximum available zoom level content that can be retrieved from - *endpoint this requestor consumes - * @returns {number} a numeric + * Gets maximum available zoom level content that can be retrieved + * from the endpoint this requestor consumes. + * @returns {number} The maximum available zoom level for this requestor. */ getMaxAvailableZoomLevel(): number; /** - * Sets maximum available zoom level content that can be retrieved from - * endpoint this requestor consumes - * @param {number} maz1 - max available zoom level for the concrete requestor - *(defaults to projection's max) + * Sets maximum available zoom level content that can be retrieved + * from the endpoint this requestor consumes. Note: This defaults + * to the projection's maximum available zoom level, which is 20 + * in spherical mercator. + * @param {number} max The maximum available zoom level for this requestor. */ setMaxAvailableZoomLevel(max: number): void; } + /** * A tile requestor for Microsoft Bing maps. - * This is a desc of requestorBing extends requestor export class. - * @class - * @classdesc This is a description of the requestorBings extends requestor class. + * @class requestorBing */ export class requestorBing extends requestor { - /** - * This is the requestorBing constructor. - * @param {function} options - optional associative array of options - * - dataFormat: 'json' or 'jsonp' - * - timeoutMs: timeout in mS - * - maxAvailableZoomLevel: the maximum zoom level in which content is - * available (defaults to projection maxZoomLevel) - * @returns {} a new tile requestorBing - */ constructor(options?: { dataFormat?: string; timeoutMs?: number; @@ -1553,21 +1691,21 @@ declare module 'mapsjs' { }); /** - * Gets endpoint uri + * Gets the formatted endpoint uri for Bing maps, e.g. + * ecn.t{0}.tiles.virtualearth.net/tiles/{1}{2}{3}?g={4}&mkt={5}&shading=hill. * @returns {string} endpoint to Bing tile server as a formatted string - * (e.g. ecn.t{0}.tiles.virtualearth.net/tiles/{1}{2}{3}?g={4}&mkt={5}&shading=hill) */ getEndpoint(): string; /** - * Gets endpoint scheme - * @returns {string} either 'http' or 'https' + * Gets the protocol for the endpoint, either 'http' or 'https'. + * @returns {string} The endpoint protocol. */ getScheme(): string; /** - * Sets endpoint scheme - * @param {string} s - either 'http' or 'https' + * Sets endpoint protocol to either 'http' or 'https'. + * @param {string} s Protocol to use in endpoints. */ setScheme(s: string): void; @@ -1584,36 +1722,36 @@ declare module 'mapsjs' { setGeneration(g: string): void; /** - * Gets provider Market - * @returns {string} the market the tile is rendered for, defaults to 'en-US' + * Gets the language code for which the tiles are rendered. The + * default code is 'en-US'. + * @returns {string} The language code for which tiles are rendered. */ getMarket(): string; /** - * Sets provider market - * @param {string} m - market as a string (e.g. 'en-US') + * Sets language code for which to render tiles. For example, + * 'en-US'. + * @param {string} m Language code for which to render tiles. */ setMarket(m: string): void; /** - * Gets Bing key - * @returns {string} Bing key as a string + * Gets the Bing key associated with this requestor. + * @returns {string} The Bing key for this requestor. */ getBingKey(): string; /** - * Sets Bing key. Then calls Microsoft metadata service to automatically - * configure content endpoint. - * @param {string} key - Bing key as a string + * Sets Bing key which then calls Microsoft metadata service and + * automatically configures content endpoint. + * @param {string} key Bing key. */ setBingKey(key: string): void; } + /** - * This is a set of classes for both bitmap and vector tile requestors - * and descriptors using MapDotNet REST services. - * This is a desc of requestorMDN extends requestor export class. - * @class - * @classdesc This is a description of the requestorMDN extends requestor class. + * The bitmap or vector tile requestor using MapDotNet REST services. + * @class requestorMDN */ export class requestorMDN extends requestor { constructor(endpoint: string, options?: { @@ -1623,264 +1761,265 @@ declare module 'mapsjs' { }); /** - * Gets uri string of MapDotNet REST services - * @returns {string} a string + * Gets uri endpoint for the MapDotNet REST service. + * @returns {string} Uri endpoint for the MapDotNet REST service. */ getEndpoint(): string; } /** - * This is a desc of descriptorMDNRestMap export class. - * @class - * @classdesc This is a description of the descriptorMDNRestMap class. + * Creates an instance of a descriptor for describing content from a + * MapDotNet UX REST map service. + * @class descriptorMDNRestMap */ export class descriptorMDNRestMap { constructor(mapId: string, options?: { version?: string; - imageType?: string; - - bleedRatio?: number; - - mapCacheOption?: string; - - mapCacheName?: string; - - useQuadKeyForMapCacheName?: boolean; - - backgroundColorStr?: string; layerVisibility?: {}; layerOutline?: {}; layerFill?: {}; layerWhere?: {}; - - tag?: string; }); /** - * Sets suspend descriptor change notifications flag. If set true, all changes to - * this descriptor will not readraw the map, set this to false to re-enable - * notifications. Setting to false will fire a notifyDescriptorChange(). This is used - * to queue multiple changes without having to redraw on each change. - * @param {boolean} flag - boolean (true or false) + * Sets the flag to suspend descriptor change notifications. If + * set true, all changes to this descriptor will not cause the map + * to redraw. Setting to false will enable redraws and immediately + * force a redraw. + * @param {boolean} flag Whether or not descriptor change notifications + * should be enabled. */ setSuspendDescriptorChangeNotifications(flag: boolean): void; /** - * Gets map id - * @returns {string} a string + * Gets the map ID. + * @returns {string} The map ID. */ getMapId(): string; /** - * Gets REST service version - * @returns {string} a string + * Gets the REST service version. + * @returns {string} The REST service version. */ getVersion(): string; /** - * Sets flag that replaces map cache name with quad-key - * @param {string} v - version number + * Sets the REST service version. + * @param {string} v The version number. */ setVersion(v: string): void; /** - * Gets image type string ['png,''png8,''jpg'] - * @returns {string} a string + * Gets image type associated with this descriptor, either 'png', + * 'png8', or 'jpg'. + * @returns {string} The image type associated with this descriptor. */ getImageType(): string; /** - * Sets the image type string ['png','png8','jpg'] - * @param {string} v - image type string + * Gets image type associated with this descriptor to one of 'png', + * 'png8', or 'jpg'. + * @param {string} t The image type associated which should be + * associated with this descriptor. */ - setImageType(v: string): void; + setImageType(t: string): void; /** - * Gets bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content - * beyond the edge of the tile extents (this is useful for point features) - * @returns {number} a numeric from 1.0 to 2.0 + * Gets bleed ratio for the layer associated with this descriptor. + * @returns {number} The bleed ratio. */ getBleedRatio(): number; /** - * Sets the bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content - * beyond the edge of the tile extents (this is useful for point features). - * @param {number} br - numeric from 1.0 to 2.0 + * Sets the bleed ratio. Bleeds greater than 1.0 will fetch content + * beyond the edge of the tile extents (this is useful for point + * features). + * @param {number} br The desired bleed ratio, between 1.0 and 2.0. */ setBleedRatio(br: number): void; /** - * Gets map cache option. Options include - * 'None,''ReadOnly,''ReadWrite,'ForceWrite,''Default.' - * @returns {string} a string + * Gets the map's cache setting, which is one of 'None', + * 'ReadOnly', 'ReadWrite', 'ForceWrite', and 'Default.' + * @returns {string} The map's cache setting. */ getMapCacheOption(): string; /** - * Sets the map cache option. Options include - * 'None','ReadOnly','ReadWrite','ForceWrite','Default'. - * @param {string} mco - string + * Gets the map's cache setting to one of 'None', + * 'ReadOnly', 'ReadWrite', 'ForceWrite', and 'Default.' + * @param {string} mco The desired cache setting for the map. */ setMapCacheOption(mco: string): void; /** - * Gets optional map cache name - * @returns {string} a string + * Gets the optional map cache name. + * @returns {string} The map cache name. */ getMapCacheName(): string; /** - * Gets the optional map cache name. - * @param {string} mcn - string + * Sets the optional map cache name. + * @param {string} mcn The desired map cache name. */ setMapCacheName(mcn: string): void; /** - * Gets flag that replaces map cache name with quad-key - * @returns {boolean} a boolean + * Determines whether the map is flagged to use the quadkey as its + * map cache name. + * @returns {boolean} Whether or not the map has been flagged to + * use the quadkey as its map cache name. */ getUseQuadKeyForMapCacheName(): boolean; /** - * Sets the flag that replaces map cache name with the quad-key. - * @param {boolean} flag - uqmcn = boolean + * Sets the flag that uses the quadkey as its map cache name. + * @param {boolean} flag Whether or not the map should be flagged + * to use the quadkey as its map cache name. */ setUseQuadKeyForMapCacheName(flag: boolean): void; /** - * Gets map image background color - * @returns {string} a string + * Gets map image background color. + * @returns {string} CSS style string for the map image background color. */ getBackgroundColorStr(): string; /** - * Sets the map image background color - * @param {number} a - alpha byte - * @param {number} r - red byte - * @param {number} g - green byte - * @param {number} b - blue byte + * Sets the map image background color. + * @param {number} a Alpha level. + * @param {number} r Red level. + * @param {number} g Green level. + * @param {number} b Blue level. */ setBackgroundColor(a: number, r: number, g:number, b:number): void; /** - * Gets a boolean indicating whether or not the background is transparent. - * @returns {boolean} a boolean + * Checks whether or not the map background is transparent. + * @returns {boolean} Whether or not the map background is transparent. */ getIsBackgroundTransparent(): boolean; /** - * Set layer visibility by layer Id and boolean. These are MapDotNet map layer - * Ids, not tile layer - * @param {string} layerId - string Id - * @param {boolean} isVisible - boolean + * Sets a layer's visibility. + * @param {string} layerId The MapDotNet map layer ID. + * @param {boolean} isVisible Whether or not the layer should be visible. */ setLayerVisibility(layerId: string, isVisible: boolean): void; /** - * Get layer visibility by layer Id. - * @param {string} layerId - string - * @returns {boolean} true if specified layer is visible, otherwise false. + * Gets a layer's visibility. + * @param {string} layerId The MapDotNet map layer ID. + * @returns {boolean} Whether or not the layer is visible. */ getLayerVisibility(layerId: string): boolean; /** - * Set layer outline pen by layer id, pen color and thickness. - * @param {string} layerId - the layer Id to affect style - * @param {number} a - alpha byte - * @param {number} r - red byte - * @param {number} g - green byte - * @param {number} b - blue byte - * @param {number} thk - thickness in pixels + * Sets a layer's outline color and thickness. + * @param {string} layerId The MapDotNet map layer ID. + * @param {number} a Alpha level. + * @param {number} r Red level. + * @param {number} g Green level. + * @param {number} b Blue level. + * @param {number} thk Outline thickness in pixels. */ setLayerOutline(layerId: string, a: number, r: number, g: number, b: number, thk: number): void; /** - * Get layer outline pen by layer id. - * @param {string} layerId - the layer Id to query - 8 @returns {string|thickness|number} associative array [color: cStr, thickness:thk} + * Gets a layer's outline color and thickness. + * @param {string} layerId The MapDotNet map layer ID. + * @returns {object} JavaScript object of the form {color, thickness} + * where color is the CSS style string of the outline color and + * thickness is the outline thickness in pixels. */ getLayerOutline(layerId: string): { color: string; thickness: number; }; /** - * Set layer fill by layer id and fill color as an ARGB value - * @param {string} layerId - the layer Id to affect style - * @param {number} a - alpha byte - * @param {number} r - red byte - * @param {number} g - green byte - * @param {number} b - blue byte + * Sets a layer's fill color. + * @param {string} layerId The MapDotNet map layer ID. + * @param {number} a Alpha level. + * @param {number} r Red level. + * @param {number} g Green level. + * @param {number} b Blue level. */ setLayerFill(layerId: string, a: number, r: number, g: number, b: number): void; /** - * Set layer fill by layer id and fill color as an expression. - * @param {string} layerId - the layer Id to affect style - * @param {string} exp - SQL expression to select for color + * Sets a layer's fill color as a SQL expression. + * @param {string} layerId The MapDotNet map layer ID. + * @param {string} exp The SQL expression to select a row's fill color. */ setLayerFillAsExpression(layerId: string, exp: string): void; /** - * Gets layer fill as a css color string or SQL expression, by layer id. - * @param {string} layerId - the layer Id to query - * @returns {string} a string + * Gets a layer's fill color as a CSS style string or as a SQL expression. + * @param {string} layerId The MapDotNet map layer ID. + * @returns {string} Either the CSS style string or the SQL expression, + * according to how the layer's fill color was set. */ getLayerFill(layerId: string): string; /** - * Set a layer where clause. - * @param {string} layerId - the layer Id - * @param {string} where - the where clause - * @param {boolean} merge - optional boolean, false to replace any existing where - *clause defined in the map layer (default) or true to - *merge (AND) with any existing + * Add or replace the where clause for a layer. The where clause + * is a SQL expression used to filter rows. + * @param {string} layerId The MapDotNet map layer ID. + * @param {string} where The desired SQL where expression. + * @param {boolean} [merge] Whether to merge the new where clause + * with the existing where clause using a SQL AND or to replace + * the existing where clause with the new one. Defaults to true (merge). */ setLayerWhere(layerId: string, where: string, merge: boolean): void; /** - * Set a separator for the layer where clause query string value. Default is ',' so - * this is useful if using an IN clause. - * @param {string} sep - separator, should be a single character + * Sets a separator character for the layer where clause expression + * in the query string. This is set to ',' by default, which is + * consistent with SQL. + * @param {string} sep The desired seperator, which should be a + * single character. */ setLayerWhereSep(sep: string): void; /** - * Returns a separator for the layer where clause query string value. - * @returns {string} separator, should be a single character + * Returns the current separator for the layer where clause in the + * query string. + * @returns {string} The current seperator. */ getLayerWhereSep(): string; /** - * Gets layer where clause if explicitly set - * @param {string} layerId - the layer Id to query - * @returns {string} a string where clause + * Gets the current layer where clause. + * @param {string} layerId The MapDotNet map layer ID. + * @returns {string} The current where clause. If no where clause + * is in use, this will return an empty string. */ getLayerWhere(layerId: string): string; /** - * Gets tag used to modify request URLs to avoid browser caching - * @returns {string} a string + * Gets a tag which is used to modify the request URIs to avoid + * browser caching + * @returns {string} The map's tag. */ getTag(): string; /** - * Sets a tag, typically the map tag. Non-string objects are coerced to strings. - * Used to modify request URLs to avoid browser caching. - * @param {string} tag - the tag to use + * Sets the map's tag, which is used modify request URIs to avoid + * browser caching. + * @param {string} tag The desired tag. */ setTag(tag: string): void; } - /** - * This is a desc of a descriptorMDNRestFeature export class. - * @class - * @classdesc This is a description of the descriptorMDNRestFeature class. + * Creates an instance of a descriptor for describing content from + * a MapDotNet REST feature service. + * @class descriptorMDNRestFeature */ export class descriptorMDNRestFeature { constructor(mapId: string, layerId: string, options?: { @@ -1891,49 +2030,47 @@ declare module 'mapsjs' { simplifyEnabled?: boolean; }); - /** - * Gets map Id - * @returns {string} a string + * Gets the map ID. + * @returns {string} The map ID. */ getMapId(): string; /** - * Gets layer Id - * @returns {string} a string + * Gets the layer's ID. + * @returns {string} The layer's ID. */ getLayerId(): string; /** - * Gets REST service version - * @returns {string} a string + * Gets the version of the REST service. + * @returns {string} The REST service version. */ getVersion(): string; /** - * Sets REST service version - * @param {string} v - version number + * Sets the REST service version number. + * @param {string} v The version number to set. */ setVersion(v: string): void; /** - * Gets the bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content - * beyond the edge of the tile extents (this is useful for point features) - * @returns {number} numeric from 1.0 to 2.0 + * Gets the bleed ratio. + * @returns {number} The current bleed ratio. */ getBleedRatio(): number; /** - * Sets the bleed ratio from 1.0 to 2.0. Bleeds greater than 1.0 will fetch content + * Sets the bleed ratio. Bleeds greater than 1.0 will fetch content * beyond the edge of the tile extents (this is useful for point features). - * @param {number} br - numeric from 1.0 to 2.0 + * @param {number} br The desired bleed ratio, a number between 1.0 and 2.0. */ setBleedRatio(br: number): void; /** - * Gets the optional field names to query. This attribute data may be used in - * dynamic client-side rendering. - * @returns {string[]} an array of strings + * Gets the optional field names to query. This attribute data may + * be used in dynamic client-side rendering. + * @returns {string[]} An array of field names as strings. */ getFieldNames(): string[]; @@ -1945,47 +2082,49 @@ declare module 'mapsjs' { setFieldNames(names: string[]): void; /** - * Gets the flag whether to clip geometry fetched to the bounds of the request. - * This can greatly improve performance with large complex geometries. Only - * supported when back-end store is SQL 2008/2012 or PostGIS. - * @returns {boolean} a boolean + * Checks the flag whether to clip geometry fetched at the bounds + * of the request. + * @returns {boolean} The value of the flag. */ getClipToRenderBounds(): boolean; /** - * Sets the flag whether to clip geometry fetched to the bounds of the request. - * This can greatly improve performance with large complex geometries. Only - * supported when back-end store is SQL 2008/2012 or PostGIS - * @param {boolean} flag - boolean + * Sets the flag whether to clip geometry fetched at the bounds + * of the request. This can greatly improve performance with large + * complex geometries. Only supported when back-end store is SQL + * 2008/2012 or PostGIS. + * @param {boolean} flag Whether or not to clip geometries fetched + * at the bounds of the request. */ setClipToRenderBounds(flag: boolean): void; /** - * Gets the flag whether to simplify paths based on the - * units per pixel for the quad tile being requested. - * @returns {boolean} a boolean + * Checks the flag whether to simplify paths based on the units per + * pixel for the quad tile being requested. + * @returns {boolean} The value of the flag. */ getSimplifyEnabled(): boolean; /** - * Sets the flag whether to simplify paths based on the units per pixel for the - * quad tile being requested. - * @param {boolean} flag - boolean + * Sets the flag whether to simplify paths based on the units per + * pixel for the quad tile being requested. + * @param {boolean} flag Whether or not to simply paths based on + * the units per pixel. */ setSimplifyEnabled(flag: boolean): void; /** - * Sets descriptor change notification - * @param {function} action - notify descriptor change + * Sets the action to perform on descriptor change. + * @param {function} action Function with signature action(). */ setNotifyDescriptorChangeAction(action: () => void): void; } + /** - * This is a generic tile requestor suitable for several third-party tile servers. These - *include open street map, map quest, cloudmade, Nokia, etc. - * @class - * @classdesc This is a description of the requestorOpen extends requestor - * class. + * This is a generic tile requestor suitable for several third-party + * tile servers. These include open street map, map quest, cloudmade, + * Nokia, etc. + * @class requestorOpen */ export class requestorOpen extends requestor { constructor(endpoint: string, subdomains: string[], options?: { @@ -1994,13 +2133,12 @@ declare module 'mapsjs' { maxAvailableZoomLevel?: number; }); } + /** * This is a requestor for local collections of data. These local collections may * originate from inlined code or from datasources other than a MapDotNet REST * feature service. - * @class - * @classdesc This is a description of the requestorLocal extends requestor - *class. + * @class requestorLocal */ export class requestorLocal extends requestor { constructor(options?: { @@ -2011,35 +2149,37 @@ declare module 'mapsjs' { }); /** - * Gets unparsed source data - * @returns {[]} associative array of source data + * Gets the unparsed source data. + * @returns {object} Array of source data objects. */ getSource(): {}[]; /** - * Sets unparsed source data - * @param {[]} data - an associative array of source data + * Sets source data. + * @param {object} data An array of JavaScript objects to use as + * the requestor source data. */ setSource(data: {}[]): void; /** - * Returns your source data parsed into an internal format { Shapes - * [], Values: [], Bounds: [] } This may be useful for doing client-side queries on - * the local data where all of the WKT has been parsed into points and geometry. - * There is also a bounds collection to do a quick spatial check for complex polys. - * @returns {} parsed data + * Returns your source data parsed into theformat { Shapes: [], + * Values: [], Bounds: [] } This may be useful for doing client-side + * queries on the local data where all of the WKT has been parsed + * into points and geometry. There is also a bounds collection to + * do a quick spatial check for complex polygons. + * @returns {object} Parsed data object in the form {Shapes, Values, Bounds}. */ getParsedData(): { Shapes: any[]; Values: any[]; Bounds: envelope[]; }; - } /** - * @class - * @classdesc This is a description of the descriptorLocal class. + * Local descriptor object for describing source data when the source + * data is fecthed by a local requestor. + * @class descriptorLocal */ export class descriptorLocal { constructor(options: { @@ -2054,14 +2194,7 @@ declare module 'mapsjs' { x: number; y: number; } - /** - * This is an immutable envelope constructor. - * @param {number} minX - coord as a float - * @param {number} minY - coord as a float - * @param {number} maxX - coord as a float - * @param {number} maxY - coord as a float - * @returns {envelope} a new envelope - */ + interface envObject { /** @@ -2090,269 +2223,255 @@ declare module 'mapsjs' { /** * Gets the center of the map in spherical mercator. Use * sphericalMercator.deprojectToLatLon static function to convert to a lat/lon. - * @return {point} a point map center + * @return {point} A point map center */ getMapCenter(): point; /** * Sets the center of the map in spherical mercator. Use * sphericalMercator.projectFromLatLon static function to convert from a lat/lon. - * @param {point} center - map center as a point + * @param {point} center The map center as a point */ setMapCenter(center: point): void; /** * Same as setMapCenter except will animate from current map center to the * specified location - * @param {point} mc - map center as an isc.rim.point - * @param {number} duration - float in mS - * @param {function} onCompleteAction - optional function, if provided, is called when - * the animation is completed + * @param {point} center The map center as a point. + * @param {number} [durationMs] Duration in miliseconds. + * @param {function} [completeAction] Callback to perform on animaton complete. */ setMapCenterAnimate(center: point, durationMs?: number, completeAction?: () => void): void; /** * Sets the map center to the current geolocation if supported. The map is * animated to the new location. - * @param {number} durationMS - float in mS - * @param {function} completeAction - optional function, if provided, is called - * when the animation is completed + * @param {number} [durationMs] Duration in miliseconds. + * @param {function} [completeAction] Callback to perform on animaton complete. */ setMapCenterToGeolocationAnimate(durationMs?: number, completeAction?: () => void): void; /** - * Gets current zoom level from 1 to 20 - * @returns {number} zoom level as a float + * Gets the current zoom level. + * @returns {number} The current zoom level. */ getZoomLevel(): number; /** - * Sets current zoom level from 1 to 20 - * @param {number} z1 - zoom level as an integer + * Sets the current zoom level. + * @param {number} z1 The desired zoom level. */ setZoomLevel(zl: number): void; /** - * Sets minimum zoom level for the map - * @param {number} z1 - zoom level as an integer + * Sets the minimum zoom level for the map. + * @param {number} zl Desired minimum zoom level. */ setMinZoomLevel(zl: number): void; /** - * Sets maximum zoom level for the map - * @param {number} z1 - zoom level as an integer + * Sets the maximum zoom level for the map. + * @param {number} z1 The desired maximum zoom level. */ setMaxZoomLevel(zl: number): void; /** - * Same as setZoomLevel but animates from the current zoom level to the new value - * @param {number} zl - zoom level as an integer - * @param {number} duration - float in mS - * @param {function} onCompleteAction - optional function, if provided, is called when - * the animation is completed + * Animates the map from the current zoom level to the given zoom level. + * @param {number} zl The desired zoom level. + * @param {number} [durationMs] The duration in miliseconds. + * @param {function} [completeAction] Function to call when the animation + * completes with signature completeAction(). */ setZoomLevelAnimate(zl: number, durationMs?: number, completeAction?: () => void): void; /** - * Updates current zoom level by applying a delta - * @param {number} delta - integer zoom level delta to apply + * Changes the current zoom level. + * @param {number} delta Change to be added to the current zoom level. */ zoomDelta(delta: number): void; /** - * Same as zoomDelta but animates from the current zoom level to the new - * value - * @param {number} delta - integer zoom level delta to apply - * @param {number} durationMs - float in mS + * Animates a change to the current zoom level. + * @param {number} delta Change to be added to the current zoom level. + * @param {number} [durationMs] Duration in miliseconds. */ zoomDeltaAnimate(delta: number, durationMs?: number): void; /** - * Animates between two locations (map center and zoom level) and does so as - * a parabolic path. - * @param {point} mc - destination map center as an isc.rim.point - * @param {number} zl - destination zoom level as an integer - * @param {number} duration - animation duration as a float in mS - * @param {function} onCompleteAction - optional function, if provided, is call when - * the animation is completed + * Animates parabolically from the current map center and zoom level + * to the given map center and zoom level. + * @param {point} center Desired map center as a point. + * @param {number} zl Desired zoom level. + * @param {number} [durationMs] Animation duration in miliseconds. + * @param {function} [completeAction] Function to call after the animation + * completes with signature completeAction(). */ flyTo(center: point, zl: number, durationMs?: number, completeAction?: () => void): void; /** - * Gets current map extents in spherical mercator units - * @return {envelope} envelope map extents + * Gets the current map extents in spherical mercator units. + * @return {envelope} envelope The current map extents. */ getMapExtents(): envelope; /** - * Gets current map units per pixel (meters) - * @returns {number} meters as a float + * Gets the current map units per pixel. + * @returns {number} Map units (meters) per pixel. */ getMapUnitsPerPixel(): number; /** - * Gets map extens width and height in pixels - * @returns {number} associative array - * w: width in pixels as an integer - * h: height in pixels as an integer + * Gets the map extents' width and height in pixels. + * @returns {object} JavaScript object of the form {w, h} where w is + * the current extents' width in pixels and h is the current extents' + * height in pixels. */ getViewExtentsInPix(): { w: number; h: number; }; /** - * Gets the current projected map scale. This is the ratio of units on the screen - * to map units depicted. - * @returns {number} ration (1 to N) as a float + * Gets the current projected map scale. This is the ratio of units on + * the screen to map units depicted. + * @returns {number} Ratio of screen units to map units. */ getProjectedMapScale(): number; /** - * Gets the current actual map scale. This is the ratio of units on the screen to - * actual units on the earth's surface at the latitude of the current map center. - * @returns {number} ration (1 to N) as a float + * Gets the current actual map scale. This is the ratio of units on + * the screen to actual units on the earth's surface at the latitude + * of the current map center. + * @returns {number} The ratio of screen units to actual meters. */ getActualMapScale(): number; /** - * Gets the best fit zoom level based on the supplied map extents for the current - * display extents in pixels. - * @param {envelope} extentsNew - new map extents to fit to as an envelope - * @returns {number} an integer between min and max supported zoom levels + * Gets the best fit zoom level based on the supplied map extents for + * the current display extents in pixels. + * @param {envelope} extentsNew New map extents to fit. + * @returns {number} The zoom level which best fits the extents. */ getBestFitZoomLevelByExtents(extentsNew: envelope): number; /** - * Forces the map to redraw the currently loaded tile and geometry content. - * You should not have to call this as redraws are automatically handled during - * programatic state changes. This would be for edge cases where the developer - * is affecting internal state in an undocumented way. + * Forces the map to redraw the currently loaded tile and geometry + * content. You should not have to call this as redraws are automatically + * handled during programatic state changes. This would be for edge cases + * where the developer is affecting internal state in an undocumented way. */ redraw(): void; /** - * Updates the map to the size of its container. This updates internal parameters - * for computing map extents and handling the amount of tile content to - * download. This is handled automatically if the browser window is resized. But - * if you are sizing the map programatically (e.g. resizable panel or slider) then - * call this after the parent container has resized. + * Updates the map to the size of its container. This updates internal + * parameters for computing map extents and handling the amount of tile + * content to download. This is handled automatically if the browser + * window is resized. But if you are sizing the map programatically + * (e.g. resizable panel or slider) then call this after the parent + * container has resized. */ resize(): void; /** - * pushes a tile layer onto the top of the display stack - * @param {tile.layer} tl - a tile layer + * Pushes a supplied tile layer onto the top of the display stack. + * @param {tile.layer} tl The desired tile layer. */ pushTileLayer(tl: tile.layer): void; /** - * Pops a tile layer off the top of the display stack - * @returns {tile.layer} the removed tile layer as a tile layer + * Removes a tile layer off the top of the display stack + * @returns {tile.layer} The removed tile layer. */ popTileLayer(): tile.layer; /** - * Gets current number of tile layers on display stack - * @returns {number} a count as an integer + * Gets the current number of tile layers in the display stack. + * @returns {number} The number of tile layers in the display stack. */ getTileLayerCount(): number; /** - * Gets tile layer on display stack by its key - * @param {string} key - tile layer by key - * @returns {tile.layer} tile layer found as a tile layer or null if not found + * Gets a tile layer from the display stack by its key. + * @param {string} key The desired tile layer's key. + * @returns {tile.layer} The tile layer associated with the key, or null + * if no tile layer is associated with the key. */ getTileLayer(key: string): tile.layer; /** - * Gets a map point in map units from a supplied point in pixel units from the - * currently displayed extents. - * @param {number} x - x coord in map pixels - * @param {number} y - y coord in map pixels - * @returns {point} a converted point as a point + * Gets a point in map units from supplied coordinates pixel units + * with respect to the currently displayed extents. + * @param {number} x The x coordinate in pixels. + * @param {number} y The y coordinate in pixels. + * @returns {point} The generated point in map units. */ computeMapPointFromPixelLocation(x: number, y: number): point; /** - * Determines whether or not map extent changes can occur through gestures - * like mouse or touch drag, mouse wheel or pinch zoom. - * @param {boolean} flag - set to true to freeze the map and prevent all map - * extent changes through gestures, or false to resume normal behavior. + * Flags whether or not map extent changes can occur through gestures + * like mouse or touch drag, mouse wheel, or pinch zoom. + * @param {boolean} flag Whether or not gestures should affect map + * extent changes. */ setSuspendMapExtentChangesByGestures(flag: boolean): void; /** - * Sets the z-order of drawn content in relation to the gesture capture panel. The - * default behavior (false) is to have fixed content and geometry underneath the - * gesture panel in the DOM. If false, all pointer events are handled by the - * gesture capture panel and optionally parents of the map control. If true, drawn - * content will receive pointer events first and will block gestures to the map. If - * true, digitizing will not function and polygons will block map navigation. In some - * scenarios you may want to set this to true if you are placing fixed- - * content (such as point features) on the map and need to handle gestures on - * the placed content. You can call this function at any time to change the order. - * @param {boolean} flag - order of the drawn content area in relation to the gesture - * capture panel. False (default) is below and True is above. + * Sets the z-order of drawn content in relation to the gesture capture + * panel. The default behavior (false) is to have fixed content and + * geometry underneath the gesture panel in the DOM. If false, all + * pointer events are handled by the gesture capture panel and + * optionally parents of the map control. If true, drawn content will + * receive pointer events first and will block gestures to the map. If + * true, digitizing will not function and polygons will block map + * navigation. In some scenarios you may want to set this to true if you + * are placing fixed content (such as point features) on the map and + * need to handle gestures on the placed content. You can call this + * function at any time to change the order. + * @param {boolean} flag Whether or not the fixed content layer should + * reside above the gesture layer. */ setDrawnContentZorderToTop(flag: boolean): void; /** - * Add a fixed element to the content area which resides at a z-level above tiled - * map content. These elements do not scale with the map scale. This is used to - * place markers or callouts on the map - * @param {HTMLElement} element - any html that can be added to the DOM - * @param {number} mapUnitsX - is the insertion point X value in map units - * @param {number} mapUnitsY - is the insertion point Y value in map units - * @param {function} addAction - is an optional function which is passed the DOM element after it is placed into the fixed element content area - * @param {HTMLElement} dragOptions - is an optional object to support making the placed object draggable, the properties include: - * dragEnabled is a boolean property that must be true to enable dragging - * downAction is an optional function taking an isc.rim.point that is called when a pointer down occurs on the element - * moveAction is an optional function taking an isc.rim.point that is called when the element moves under pointer movement - *upAction is an optional function taking an isc.rim.point that is called when a pointer up occurs on the element + * Add a fixed element to the content area which resides at a z-level + * above tiled map content. These elements do not scale with the map + * scale. This is used to place markers or callouts on the map + * @param {HTMLElement} element Any html that can be added to the DOM. + * @param {number} mapUnitsX The x coordinate of the insertion point in map units. + * @param {number} mapUnitsY The y coordinate of the insertion point in map units. + * @param {function} [addAction] Callback function called after the + * DOM element has been placed with signature addAction(element). + * @param {object} dragOptions JavaScript object of the form {dragEnabled, + * useElementInsteadOfNewGestureOverlay, downAction, moveAction, upAction, + * wheelAction } where dragEnabled flags whether dragging should be + * enabled on the element, and downAction, moveAction, upAction, and + * wheelAction are callback functions invoked on mousedown, mousemove, + * mouseup, and scroll events respectively. */ - addFixedContentElement(element: HTMLElement, mapUnitsX: number, mapUnitsY: number, addAction: (ele: HTMLElement) => void, dragOptions: { - - /** - * @returns {boolean} a boolean - */ - dragEnabled: boolean; - - /** - * @returns {boolean} a boolean - */ - useElementInsteadOfNewGestureOverlay: boolean; - - /** - * @param {point} downPoint - - * @returns {function} - */ - downAction?: (downPoint: point) => any; - - /** - * @param {point} movePoint - - */ - moveAction?: (movePoint: point) => void; - - /** - * @param {point} upPoint - - */ - upAction?: (upPoint: point) => void; - - /** - * @param {number} delta - - */ - wheelAction?: (delta: number) => void; - }): void; + addFixedContentElement( + element: HTMLElement, + mapUnitsX: number, + mapUnitsY: number, + addAction?: (ele: HTMLElement) => void, + dragOptions?: { + dragEnabled: boolean; + useElementInsteadOfNewGestureOverlay: boolean; + downAction?: (downPoint: point) => any; + moveAction?: (movePoint: point) => void; + upAction?: (upPoint: point) => void; + wheelAction?: (delta: number) => void; + } + ): void; /** - * Move an existing fixed element on the content area - * @param {HTMLElement} element - is the existing DOM element to move - * @param {number} mapUnitsX - is the new point X value in map units - * @param {number} mapUnitsY - is the new point Y value in map units + * Move an existing fixed content element. + * @param {HTMLElement} element The existing DOM element to move. + * @param {number} mapUnitsX The new x coordinate in map units. + * @param {number} mapUnitsY The new y coordinate in map units. */ moveFixedContentElement(element: HTMLElement, mapUnitsX: number, mapUnitsY: number): void; /** - * Removes fixed element from display by reference - * @param {HTMLElement} element - a DOM element added via addFixedContentElement + * Removes a fixed content element. + * @param {HTMLElement} element The DOM element to remove. Note: This + * must be the same element added by addFixedContentElement. */ removeFixedContentElement(element: HTMLElement): void; @@ -2362,183 +2481,139 @@ declare module 'mapsjs' { * content area DOM. If an attempt to add a geometry is made with the same * key, the geometry is swapped out. You must remove using removePathGeometry * for resource cleanup. - * @param {styleGeometry} styledGeom - styledGeometry to render - * @param {string} key - string used to tie a geometry to its SVG rendering in - * the DOM and is used to remove the geometry - * @returns {element} a SVG element added to the DOM + * @param {styleGeometry} styledGeom THe styledGeometry to render. + * @param {string} key String used to tie a geometry to its SVG + * rendering in the DOM. + * @returns {element} The SVG element which was added to the DOM. */ addPathGeometry(styledGeom: styledGeometry, key: string): void; /** - * Updates an existing path geometry to reflect a style change - * @param {geometryStyle} styleNew - a new geometryStyle - * @param {string} key - string used to identify an existing - * styledGeometry in the DOM that was added by - * addPathGeometry + * Updates an existing path geometry to reflect a style change. + * @param {geometryStyle} styleNew The new geometryStyle. + * @param {string} key The key of the geometry to receive the new style. */ updatePathGeometryStyle(styleNew: geometryStyle, key: string): void; /** - * Removes styledGeometry from display by its key - * @param {string} key - a string used to lookup the geometry to removed based on - * the key used in addPathGeometry + * Removes a styledGeometry from display. + * @param {string} key The key of the geometry to remove. */ removePathGeometry(key: string): void; - + /** - * Begins creation of an envelope by click-dragging the bounds - * @param {function} options - an action (function) taking a single envelope parameter that is called at - * the end of the envelope creation + * Initiates digitization on the map control. This creates a new + * geometry and adds verticies to the geometry accord to mouse + * click locations. + * @param {object} options JavaScript object of the form { key, + * shapeType, geometryStyle, nodeTapAndHoldAction, nodeMoveAction, + * shapeChangeAction, envelopeEndAction, supressNodeAdd, leavePath } + * where key is a a string associated with this geometry, shapeType + * is the type of shape this geometry is, one of 'point', 'path', or + * 'polygon', geometryStyle is a geometryStyle which should be applied + * to the digitized geometry, nodeTapAndHoldAction is a callback invoked + * when any point in the geometry is clicked and held and has the + * signature nodeTapAndHoldAction(setIdx, idx), nodeMoveAction is a + * callback invoked after any node is dragged to a new location and + * has signature nodeMoveAction(x, y, actionType), shapeChangeAction + * is a callback that is invoked after the geometry shape changes and, + * has signature shapeChangeAction(), envelopeEndAction is a callback + * invoked after an envelope is created and has signature envelopeEndAction(envelope), + * and leavePath is a flag that indicates whether the digitized shape + * should be left on the map after digitization is complete. */ beginDigitize(options: { - /** - * a string used to keep track of the DOM element - * if the path is left behind after the call to beginDigitize - * @returns {string} a string - */ - key?: string; + key?: string; shapeType: string; geometryStyle?: geometryStyle; - - /** - * an existing styledGeometry to edit - * @returns {styledGeometry} an edited styledGeometry - styledGeometry?: styledGeometry; - - /** - * @param {number} setIdx - optional action called on a nodetap - * and hold - * @param {number} idx - optional action called on a nodetap and hold - * @returns {boolean} a boolean - */ - nodeTapAndHoldAction?: (setIdx: number, idx: number) => boolean; - - /** - * @param {number) x - optional action called on a node move for value x - * @param {number} y - optional action called on a node move for value y - * @param {string} actionType - optional action on a node move for action - * Type string - * @returns {string} a string - */ - nodeMoveAction?: (x: number, y: number, actionType: string) => any; - - /** - * optional action on geometry change - */ - shapeChangeAction?: () => void; - - /** - * an action (function) taking a single - * envelope parameter that is called at the end of the envelope creation - * @param {envelope} env - envelope parameter - */ - envelopeEndAction?: (env: envelope) => void; + nodeTapAndHoldAction?: (setIdx: number, idx: number) => boolean; + nodeMoveAction?: (x: number, y: number, actionType: string) => any; + shapeChangeAction?: () => void; + envelopeEndAction?: (env: envelope) => void; suppressNodeAdd?: boolean; - - /** - * @returns {boolean} true to leave path behind when done - */ - leavePath?: boolean; + leavePath?: boolean; }): void; endDigitize(): void; /** - * Gets a snapshot copy of current digitizing path while editing - * @returns {geometry} a geometry + * Gets a snapshot copy of the currently digitizing path. + * @returns {geometry} The currently digitizing path. */ getDigitizeSnapshot(): geometry; /** - * Adds set to end of digitizing path + * Forces additional digitized points to be pushed to a new set of the + * currently digitizing geometry. */ pushSetOnDigitizePath(): void; /** - * Removes last set from digitizing path - * @return {number} + * Removes the last set from the currently digitizing path. + * @return {number[]} The last set from the currently digitizing path + * in the form [xn,yn]. */ popSetFromDigitizePath(): number[]; /** - * Programmatically delete a node while digitizing - * @param {number} setIdx - the set index (0-based) of the ring or path to - * remove the node from - * @param {number} nodeIdx - the node index to remove (0-based) in the specified - * ring or path + * Programmatically delete a node from the currently digitizing path. + * @param {number} setIdx The index of the set from which to remove the node. + * @param {number} nodeIdx The index of the node to remove. */ deleteNodeOnDigitizePath(setIdx: number, nodeIdx: number): void; /** - * Returns true if digitizing is enabled - * @returns {boolean} true if digitizing is enabled, otherwise false + * Determines whether a shape is currently being digitized. + * @returns {boolean} Whether or not a shape is being digitized. */ isDigitizingEnabled(): boolean; /** * Set the function called when the map extents have stopped changing - *(e.g. after an animated pan or zoom). - * @param {function} action - an action (function reference) that takes one parameter. - * The parameter passed in is an associative array with the following keys: - * - centerX - * - centerY - * - centerLat - * - centerLon - * - zoomLevel - * - mapScale (actual ground scale) - * - mapScaleProjected (map projection scale) - * - mapUnitsPerPixel - * - extents + * (e.g. after an animated pan or zoom). + * @param {function} action The function to call when the extents + * finish changing with signature action(object) where object is of + * the form { centerX, centerY, centerLat, centerLon, zoomLevel, mapScale, + * mapScaleProjected, mapUnitsPerPixel, extents }. */ setExtentChangeCompleteAction(action: (vals: {}) => void): void; /** * Set the function called when map content (map tiles and fixed elements) are - * re-positioned in the DOM This is done automatically as the map is panned + * re-positioned in the DOM. This is done automatically as the map is panned * beyond existing content and zoomed to a new level requiring content. - * @param {function} action - an action (function reference) that takes one parameter. - * The parameter passed in is an associative array with the following keys: - * - centerX - * - centerY - * - zoomLevel - * - mapUnitsPerPixel + * @param {function} action The function to call when the map content + * completes repositioning with signature action(object) where object + * is of the form { centerX, centerY, zoomLevel, mapUnitsPerPixel }. */ setContentRepositionAction(action: (vals: {}) => void): void; /** - * Sets function called when map is clicked (left mouse click or touch on - * mobile) - * @param {function} action - an action (function reference) that takes one - * parameter - * @param {point} pt - point in map units where clicked + * Sets function called when map is clicked or tapped. + * @param {function} action The function to call on mouse click or tap + * with signature action(point). */ setPointerClickAction(action: (pt: point) => void): void; /** - * Sets function called when the map pointer is moved and then hovers - * @param {function} action - an action (function reference) that takes one - * parameter - * @param {point} pt - point in map units where hovered + * Sets function called when the map pointer hovers over the map. + * @param {function} action The function to call on mouse hover with + * signature action(point). */ setPointerHoverAction(action: (pt: point) => void): void; /** * Sets the margin around the map in pixels for extra content fetched so that tile * rebuilding of the display is minimized. This is an advanced property and does not - * generally need to be adjusted. The default is 128 pixel (one half tile width) - * Increase for very large maps (width and height in pixels is large) or panning is - * active. Decrease for very small maps (e.g. mobile devices) or where panning is - * minimal. - * @param {number} cem - a pixel margin as an integer + * generally need to be adjusted. The default is 128 pixels, or half the width + * of a tile. This should be increased for maps which are very large in pixels + * or where panning is constant. This should be decreased for very small maps, + * such as on mobile devices, or where panning is minimal. + * @param {number} cem The content extent margin in pixels. */ setContentExtentsMarginInPixels(cem: number): void; } } -/** - * This is a jQuery widget encapsulating the MapDotNet UX RIM (Rich Interactive - * Mapping) HTML5 map control usage: - * $(myContainerDOMElement).rimMap('[widget function]', param1, param2...); - */ interface JQuery { rimMap(): JQuery; From c8c8718a100e941073afcb08830aab27d0d39cc0 Mon Sep 17 00:00:00 2001 From: Matthew James Davis Date: Mon, 21 Oct 2013 15:06:02 -0400 Subject: [PATCH 071/150] added tscparams for travis cl tests --- mapsjs/mapsjs.d.ts.tscparams | 1 + 1 file changed, 1 insertion(+) create mode 100644 mapsjs/mapsjs.d.ts.tscparams diff --git a/mapsjs/mapsjs.d.ts.tscparams b/mapsjs/mapsjs.d.ts.tscparams new file mode 100644 index 0000000000..3cc762b550 --- /dev/null +++ b/mapsjs/mapsjs.d.ts.tscparams @@ -0,0 +1 @@ +"" \ No newline at end of file From b1179617ffeb8256f233a20834ea1b840cf2dfb0 Mon Sep 17 00:00:00 2001 From: Matthew James Davis Date: Tue, 22 Oct 2013 10:19:20 -0400 Subject: [PATCH 072/150] fixed syntax error, missing parameter name --- mapsjs/mapsjs.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapsjs/mapsjs.d.ts b/mapsjs/mapsjs.d.ts index c36eeade9b..ef921d27c1 100644 --- a/mapsjs/mapsjs.d.ts +++ b/mapsjs/mapsjs.d.ts @@ -986,13 +986,13 @@ declare module 'mapsjs' { * @returns {function} Function with the signature animation(pathElement, loopback). */ getAnimation(): (pathElement: HTMLElement, loopback: () => void) => void; - + /** * You can use the loopback parameter on complete to call itself and * create repeating animation. * @param {function} Function with the signature animation(pathElement, loopback). */ - setAnimation((pathElement: HTMLElement, loopback: () => void) => void): void; + setAnimation(action: (pathElement: HTMLElement, loopback: () => void) => void): void; /** * Renders this geometry as an SVG path. Note: We attach original From d9735793e979b1710bd39c1da18744a5bc8c317d Mon Sep 17 00:00:00 2001 From: Duncan Mak Date: Tue, 22 Oct 2013 11:22:35 -0400 Subject: [PATCH 073/150] Update signatures for EventEmitter. Allow for method chaining in addListener/removeListener, on/once, and removeAllListeners. Fix return type for 'emit'. This patch mirrors the changes made to the API docs in this commit: https://github.com/joyent/node/commit/41cbdc5e64d090e0708dd2a63d4cd63000019bb1 --- node/node.d.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/node/node.d.ts b/node/node.d.ts index 5bdda94eef..421e6665b3 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -68,14 +68,14 @@ declare var Buffer: { ************************************************/ interface EventEmitter { - addListener(event: string, listener: Function): void; - on(event: string, listener: Function): void; - once(event: string, listener: Function): void; - removeListener(event: string, listener: Function): void; - removeAllListeners(event?: string): void; + addListener(event: string, listener: Function): EventEmitter; + on(event: string, listener: Function): EventEmitter; + once(event: string, listener: Function): EventEmitter; + removeListener(event: string, listener: Function): EventEmitter; + removeAllListeners(event?: string): EventEmitter; setMaxListeners(n: number): void; listeners(event: string): Function[]; - emit(event: string, arg1?: any, arg2?: any): void; + emit(event: string, arg1?: any, arg2?: any): boolean; } interface WritableStream extends EventEmitter { @@ -209,25 +209,25 @@ declare module "querystring" { declare module "events" { export interface NodeEventEmitter { - addListener(event: string, listener: Function): void; - on(event: string, listener: Function): any; - once(event: string, listener: Function): void; - removeListener(event: string, listener: Function): void; - removeAllListeners(event?: string): void; + addListener(event: string, listener: Function): NodeEventEmitter; + on(event: string, listener: Function): NodeEventEmitter; + once(event: string, listener: Function): NodeEventEmitter; + removeListener(event: string, listener: Function): NodeEventEmitter; + removeAllListeners(event?: string): NodeEventEmitter; setMaxListeners(n: number): void; listeners(event: string): Function[]; - emit(event: string, arg1?: any, arg2?: any): void; + emit(event: string, arg1?: any, arg2?: any): boolean; } export class EventEmitter implements NodeEventEmitter { - addListener(event: string, listener: Function): void; - on(event: string, listener: Function): any; - once(event: string, listener: Function): void; - removeListener(event: string, listener: Function): void; - removeAllListeners(event?: string): void; + addListener(event: string, listener: Function): EventEmitter; + on(event: string, listener: Function): EventEmitter; + once(event: string, listener: Function): EventEmitter; + removeListener(event: string, listener: Function): EventEmitter; + removeAllListeners(event?: string): EventEmitter; setMaxListeners(n: number): void; listeners(event: string): Function[]; - emit(event: string, arg1?: any, arg2?: any): void; + emit(event: string, arg1?: any, arg2?: any): boolean; } } From 69935860d7ef4a558418f2e429f600f5fa56e9b4 Mon Sep 17 00:00:00 2001 From: John Simon Date: Tue, 22 Oct 2013 11:35:10 -0400 Subject: [PATCH 074/150] Add any types to everything in Q.d.ts so it works with --noImplicitAny --- q/Q.d.ts | 72 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/q/Q.d.ts b/q/Q.d.ts index 95d1007212..a9126c0077 100644 --- a/q/Q.d.ts +++ b/q/Q.d.ts @@ -8,10 +8,10 @@ declare function Q(promise: Q.IPromise): Q.Promise; declare module Q { interface IPromise { - then(onFulfill: (value: T) => IPromise, onReject?: (reason) => IPromise): IPromise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason) => U): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason) => IPromise): IPromise; - then(onFulfill: (value: T) => U, onReject?: (reason) => U): IPromise; + then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise): IPromise; + then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U): IPromise; + then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise): IPromise; + then(onFulfill: (value: T) => U, onReject?: (reason: any) => U): IPromise; } interface Deferred { @@ -19,28 +19,28 @@ declare module Q { resolve(value: T): void; reject(reason: any): void; notify(value: any): void; - makeNodeResolver(): (reason, value: T) => void; + makeNodeResolver(): (reason: any, value: T) => void; } interface Promise { fin(finallyCallback: () => any): Promise; finally(finallyCallback: () => any): Promise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason) => IPromise, onProgress?: Function): Promise; - then(onFulfill: (value: T) => IPromise, onReject?: (reason) => U, onProgress?: Function): Promise; - then(onFulfill: (value: T) => U, onReject?: (reason) => IPromise, onProgress?: Function): Promise; - then(onFulfill: (value: T) => U, onReject?: (reason) => U, onProgress?: Function): Promise; + then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => IPromise, onProgress?: Function): Promise; + then(onFulfill: (value: T) => IPromise, onReject?: (reason: any) => U, onProgress?: Function): Promise; + then(onFulfill: (value: T) => U, onReject?: (reason: any) => IPromise, onProgress?: Function): Promise; + then(onFulfill: (value: T) => U, onReject?: (reason: any) => U, onProgress?: Function): Promise; spread(onFulfilled: Function, onRejected?: Function): Promise; - fail(onRejected: (reason) => U): Promise; - fail(onRejected: (reason) => IPromise): Promise; - catch(onRejected: (reason) => U): Promise; - catch(onRejected: (reason) => IPromise): Promise; + fail(onRejected: (reason: any) => U): Promise; + fail(onRejected: (reason: any) => IPromise): Promise; + catch(onRejected: (reason: any) => U): Promise; + catch(onRejected: (reason: any) => IPromise): Promise; - progress(onProgress: (progress) => any): Promise; + progress(onProgress: (progress: any) => any): Promise; - done(onFulfilled?: (value: T) => any, onRejected?: (reason) => any, onProgress?: (progress) => any): void; + done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; get(propertyName: String): Promise; set(propertyName: String, value: any): Promise; @@ -78,17 +78,17 @@ declare module Q { export function when(value: T, onFulfilled: (val: T) => IPromise): Promise; export function when(value: T, onFulfilled: (val: T) => U): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason) => IPromise, onProgress?: (progress) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason) => U, onProgress?: (progress) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason) => IPromise, onProgress?: (progress) => any): Promise; - export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason) => U, onProgress?: (progress) => any): Promise; + export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason: any) => IPromise, onProgress?: (progress: any) => any): Promise; + export function when(value: IPromise, onFulfilled: (val: T) => IPromise, onRejected?: (reason: any) => U, onProgress?: (progress: any) => any): Promise; + export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason: any) => IPromise, onProgress?: (progress: any) => any): Promise; + export function when(value: IPromise, onFulfilled: (val: T) => U, onRejected?: (reason: any) => U, onProgress?: (progress: any) => any): Promise; //export function try(method: Function, ...args: any[]): Promise; // <- This is broken currently - not sure how to fix. export function fbind(method: (...args: any[]) => IPromise, ...args: any[]): (...args: any[]) => Promise; export function fbind(method: (...args: any[]) => T, ...args: any[]): (...args: any[]) => Promise; - export function fcall(method: (...args) => T, ...args: any[]): Promise; + export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; export function send(obj: any, functionName: string, ...args: any[]): Promise; export function invoke(obj: any, functionName: string, ...args: any[]): Promise; @@ -110,15 +110,15 @@ declare module Q { export function allResolved(promises: any[]): Promise[]>; export function allResolved(promises: IPromise[]): Promise[]>; - export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason) => IPromise): Promise; - export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason) => U): Promise; - export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason) => IPromise): Promise; - export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason) => U): Promise; + export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason: any) => IPromise): Promise; + export function spread(promises: any[], onFulfilled: (...args: any[]) => IPromise, onRejected: (reason: any) => U): Promise; + export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason: any) => IPromise): Promise; + export function spread(promises: any[], onFulfilled: (...args: any[]) => U, onRejected: (reason: any) => U): Promise; - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason) => IPromise): Promise; - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason) => U): Promise; - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason) => IPromise): Promise; - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason) => U): Promise; + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason: any) => IPromise): Promise; + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => IPromise, onRejected: (reason: any) => U): Promise; + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason: any) => IPromise): Promise; + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U, onRejected: (reason: any) => U): Promise; export function timeout(promise: Promise, ms: number, message?: string): Promise; @@ -131,18 +131,18 @@ declare module Q { export function defer(): Deferred; - export function reject(reason?): Promise; + export function reject(reason?: any): Promise; - export function promise(resolver: (resolve: (val: IPromise) => void , reject: (reason) => void , notify: (progress) => void ) => void ): Promise; - export function promise(resolver: (resolve: (val: T) => void , reject: (reason) => void , notify: (progress) => void ) => void ): Promise; + export function promise(resolver: (resolve: (val: IPromise) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; + export function promise(resolver: (resolve: (val: T) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; - export function promised(callback: (...any) => T): (...any) => Promise; + export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; - export function isPromise(object): boolean; - export function isPromiseAlike(object): boolean; - export function isPending(object): boolean; + export function isPromise(object: any): boolean; + export function isPromiseAlike(object: any): boolean; + export function isPending(object: any): boolean; - export function async(generatorFunction: any): (...args) => Promise; + export function async(generatorFunction: any): (...args: any[]) => Promise; export function nextTick(callback: Function): void; export var oneerror: () => void; From 147d7a1339ac322041bbbff71bebe87f951aec62 Mon Sep 17 00:00:00 2001 From: mapsjs Date: Thu, 17 Oct 2013 11:04:10 -0400 Subject: [PATCH 075/150] Added setBackground --- mapsjs/mapsjs.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mapsjs/mapsjs.d.ts b/mapsjs/mapsjs.d.ts index ef921d27c1..f901267709 100644 --- a/mapsjs/mapsjs.d.ts +++ b/mapsjs/mapsjs.d.ts @@ -2611,6 +2611,12 @@ declare module 'mapsjs' { * @param {number} cem The content extent margin in pixels. */ setContentExtentsMarginInPixels(cem: number): void; + + /** + * Sets the background color of the map using a css color string + * @param {number} b- a css color string + */ + setBackground(b: string): void; } } From 360a60d46fefb3edfa528a18d4dbcd976b7c12b2 Mon Sep 17 00:00:00 2001 From: mapsjs Date: Tue, 22 Oct 2013 16:33:40 -0400 Subject: [PATCH 076/150] Added tile layer functions --- mapsjs/mapsjs.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mapsjs/mapsjs.d.ts b/mapsjs/mapsjs.d.ts index f901267709..c43fd5d565 100644 --- a/mapsjs/mapsjs.d.ts +++ b/mapsjs/mapsjs.d.ts @@ -2380,6 +2380,17 @@ declare module 'mapsjs' { * @returns {tile.layer} The removed tile layer. */ popTileLayer(): tile.layer; + + /** + * Removes a tile layer off the display stack by reference + * @param {tile.layer} tl - a tile layer + */ + removeTileLayer(tl: tile.layer): void; + + /** + * Removes all tile layers off the display stack + */ + removeAllTileLayers(): void; /** * Gets the current number of tile layers in the display stack. From 7c16bf020b7c3031444e66174663e00e8310a203 Mon Sep 17 00:00:00 2001 From: Basarat Syed Date: Wed, 23 Oct 2013 10:48:34 +1100 Subject: [PATCH 077/150] fix(jake) fix definitions to match new node definitions --- jake/jake.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jake/jake.d.ts b/jake/jake.d.ts index f7e7a9e77c..14d488bd3a 100644 --- a/jake/jake.d.ts +++ b/jake/jake.d.ts @@ -201,14 +201,14 @@ declare module jake{ */ reenable(): void; - addListener(event: string, listener: Function); - on(event: string, listener: Function); - once(event: string, listener: Function): void; - removeListener(event: string, listener: Function): void; - removeAllListeners(event?: string): void; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, arg1?: any, arg2?: any): void; + addListener(event: string, listener: Function): EventEmitter; + on(event: string, listener: Function): EventEmitter; + once(event: string, listener: Function): EventEmitter; + removeListener(event: string, listener: Function): EventEmitter; + removeAllListeners(event?: string): EventEmitter; + setMaxListeners(n: number): void; + listeners(event: string): Function[]; + emit(event: string, arg1?: any, arg2?: any): boolean; } From 0dafab44a49bae52e1ab3a998e6bcdb4572f9a51 Mon Sep 17 00:00:00 2001 From: Basarat Syed Date: Wed, 23 Oct 2013 10:53:15 +1100 Subject: [PATCH 078/150] fix(browser-harness) fix for new definitions of nodejs --- browser-harness/browser-harness.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/browser-harness/browser-harness.d.ts b/browser-harness/browser-harness.d.ts index 3b8cf08be8..8c410b94a3 100644 --- a/browser-harness/browser-harness.d.ts +++ b/browser-harness/browser-harness.d.ts @@ -9,25 +9,25 @@ declare module "browser-harness" { import events = require("events"); interface HarnessEvents extends events.NodeEventEmitter { - once(event: string, listener: (driver: Driver) => void); - once(event: 'ready', listener: (driver: Driver) => void); + once(event: string, listener: (driver: Driver) => void): events.NodeEventEmitter; + once(event: 'ready', listener: (driver: Driver) => void): events.NodeEventEmitter; - on(event: string, listener: (driver: Driver) => void); - on(event: 'ready', listener: (driver: Driver) => void); + on(event: string, listener: (driver: Driver) => void): events.NodeEventEmitter; + on(event: 'ready', listener: (driver: Driver) => void): events.NodeEventEmitter; } interface DriverEvents extends events.NodeEventEmitter { - once(event: string, listener: (text: string) => void); - once(event: 'console.log', listener: (text: string) => void); - once(event: 'console.warn', listener: (text: string) => void); - once(event: 'console.error', listener: (text: string) => void); - once(event: 'window.onerror', listener: (text: string) => void); + once(event: string, listener: (text: string) => void): events.NodeEventEmitter; + once(event: 'console.log', listener: (text: string) => void): events.NodeEventEmitter; + once(event: 'console.warn', listener: (text: string) => void): events.NodeEventEmitter; + once(event: 'console.error', listener: (text: string) => void): events.NodeEventEmitter; + once(event: 'window.onerror', listener: (text: string) => void): events.NodeEventEmitter; - on(event: string, listener: (text: string) => void); - on(event: 'console.log', listener: (text: string) => void); - on(event: 'console.warn', listener: (text: string) => void); - on(event: 'console.error', listener: (text: string) => void); - on(event: 'window.onerror', listener: (text: string) => void); + on(event: string, listener: (text: string) => void): events.NodeEventEmitter; + on(event: 'console.log', listener: (text: string) => void): events.NodeEventEmitter; + on(event: 'console.warn', listener: (text: string) => void): events.NodeEventEmitter; + on(event: 'console.error', listener: (text: string) => void): events.NodeEventEmitter; + on(event: 'window.onerror', listener: (text: string) => void): events.NodeEventEmitter; } export interface Driver { From be3e8960591ebe1c41b031337370d30eb5f6c348 Mon Sep 17 00:00:00 2001 From: Basarat Syed Date: Wed, 23 Oct 2013 11:33:57 +1100 Subject: [PATCH 079/150] fix(threejs) tests do not compile with --noImplicitAny --- threejs/three-tests.ts.tscparams | 1 + 1 file changed, 1 insertion(+) create mode 100644 threejs/three-tests.ts.tscparams diff --git a/threejs/three-tests.ts.tscparams b/threejs/three-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/threejs/three-tests.ts.tscparams @@ -0,0 +1 @@ +"" From 6603da54e7ebedd72dd894215c433edc78405dd9 Mon Sep 17 00:00:00 2001 From: EisenbergEffect Date: Tue, 22 Oct 2013 23:26:50 -0400 Subject: [PATCH 080/150] Updating the Durandal definition to 2.0.1. This is the official TypeScript definition file for Durandal 2.0.1. --- durandal/durandal.d.ts | 1229 +++++++++++++++++++--------------------- 1 file changed, 585 insertions(+), 644 deletions(-) diff --git a/durandal/durandal.d.ts b/durandal/durandal.d.ts index 89417e3e51..c2567f62c5 100644 --- a/durandal/durandal.d.ts +++ b/durandal/durandal.d.ts @@ -1,5 +1,5 @@ /** - * Durandal 2.0.0 Copyright (c) 2012 Blue Spire Consulting, Inc. All Rights Reserved. + * Durandal 2.0.1 Copyright (c) 2012 Blue Spire Consulting, Inc. All Rights Reserved. * Available via the MIT license. * see: http://durandaljs.com or https://github.com/BlueSpire/Durandal for details. */ @@ -116,7 +116,7 @@ declare module 'durandal/system' { * @param {object} extension* Uses to extend the target object. */ export function extend(obj: any, ...extensions: any[]): any; - + /** * Uses a setTimeout to wait the specified milliseconds. * @param {number} milliseconds The number of milliseconds to wait. @@ -226,7 +226,7 @@ declare module 'durandal/viewEngine' { * @returns {boolean} True if the url is a view url, false otherwise. */ export function isViewUrl(url: string):boolean; - + /** * Converts a view url into a view id. * @param {string} url The url to convert. @@ -285,62 +285,8 @@ declare module 'durandal/viewEngine' { * @requires system */ declare module 'durandal/events' { - import ts = require('durandal/typescript'); - - /** - * Creates an object with eventing capabilities. - * @class Events - */ - class Events { - constructor(); - - /** - * Creates a subscription or registers a callback for the specified event. - * @param {string} events One or more events, separated by white space. - * @returns {Subscription} A subscription is returned. - */ - on(events: string): ts.EventSubscription; - - /** - * Creates a subscription or registers a callback for the specified event. - * @param {string} events One or more events, separated by white space. - * @param {function} [callback] The callback function to invoke when the event is triggered. - * @param {object} [context] An object to use as `this` when invoking the `callback`. - * @returns {Events} The events object is returned for chaining. - */ - on(events: string, callback: Function, context?: any): Events; - - /** - * Removes the callbacks for the specified events. - * @param {string} [events] One or more events, separated by white space to turn off. If no events are specified, then the callbacks will be removed. - * @param {function} [callback] The callback function to remove. If `callback` is not provided, all callbacks for the specified events will be removed. - * @param {object} [context] The object that was used as `this`. Callbacks with this context will be removed. - * @chainable - */ - off(events: string, callback: Function, context?: any): Events; - - /** - * Triggers the specified events. - * @param {string} [events] One or more events, separated by white space to trigger. - * @chainable - */ - trigger(events: string, ...eventArgs: any[]): Events; - - /** - * Creates a function that will trigger the specified events when called. Simplifies proxying jQuery (or other) events through to the events object. - * @param {string} events One or more events, separated by white space to trigger by invoking the returned function. - * @returns {function} Calling the function will invoke the previously specified events on the events object. - */ - proxy(events: string): Function; - - /** - * Adds eventing capabilities to the specified object. - * @param {object} targetObject The object to add eventing capabilities to. - */ - static includeIn(targetObject: any): void; - } - - export = Events; + var theModule: DurandalEventModule; + export = theModule; } /** @@ -389,7 +335,7 @@ declare module 'durandal/binder' { * @param {object} [obj] The data to bind to, causing the creation of a child binding context if present. */ export function bindContext(bindingContext: KnockoutBindingContext, view: HTMLElement, obj?: any): BindingInstruction; - + /** * Binds the view, preserving the existing binding context. Optionally, a new context can be created, parented to the previous context. * @param {object} obj The data to bind to. @@ -407,136 +353,12 @@ declare module 'durandal/binder' { * @requires knockout */ declare module 'durandal/activator' { - interface ActivatorSettings { - /** - * The default value passed to an object's deactivate function as its close parameter. - * @default true - */ - closeOnDeactivate: boolean; - - /** - * Lower-cased words which represent a truthy value. - * @default ['yes', 'ok', 'true'] - */ - affirmations: string[]; - - /** - * Interprets the response of a `canActivate` or `canDeactivate` call using the known affirmative values in the `affirmations` array. - * @param {object} value - * @returns {boolean} - */ - interpretResponse(value: any): boolean; - - /** - * Determines whether or not the current item and the new item are the same. - * @param {object} currentItem - * @param {object} newItem - * @param {object} currentActivationData - * @param {object} newActivationData - * @returns {boolean} - */ - areSameItem(currentItem: any, newItem: any, currentActivationData: any, newActivationData: any): boolean; - - /** - * Called immediately before the new item is activated. - * @param {object} newItem - */ - beforeActivate(newItem: any): any; - - /** - * Called immediately after the old item is deactivated. - * @param {object} oldItem The previous item. - * @param {boolean} close Whether or not the previous item was closed. - * @param {function} setter The activate item setter function. - */ - afterDeactivate(oldItem: any, close: boolean, setter: Function): void; - } - - interface Activator extends KnockoutComputed { - /** - * The settings for this activator. - */ - settings: ActivatorSettings; - - /** - * An observable which indicates whether or not the activator is currently in the process of activating an instance. - * @returns {boolean} - */ - isActivating: KnockoutObservable; - - /** - * Determines whether or not the specified item can be deactivated. - * @param {object} item The item to check. - * @param {boolean} close Whether or not to check if close is possible. - * @returns {promise} - */ - canDeactivateItem(item: T, close: boolean): JQueryPromise; - - /** - * Deactivates the specified item. - * @param {object} item The item to deactivate. - * @param {boolean} close Whether or not to close the item. - * @returns {promise} - */ - deactivateItem(item: T, close: boolean): JQueryPromise; - - /** - * Determines whether or not the specified item can be activated. - * @param {object} item The item to check. - * @param {object} activationData Data associated with the activation. - * @returns {promise} - */ - canActivateItem(newItem: T, activationData?: any): JQueryPromise; - - /** - * Activates the specified item. - * @param {object} newItem The item to activate. - * @param {object} newActivationData Data associated with the activation. - * @returns {promise} - */ - activateItem(newItem: T, activationData?: any): JQueryPromise; - - /** - * Determines whether or not the activator, in its current state, can be activated. - * @returns {promise} - */ - canActivate(): JQueryPromise; - - /** - * Activates the activator, in its current state. - * @returns {promise} - */ - activate(): JQueryPromise; - - /** - * Determines whether or not the activator, in its current state, can be deactivated. - * @returns {promise} - */ - canDeactivate(close: boolean): JQueryPromise; - - /** - * Deactivates the activator, in its current state. - * @returns {promise} - */ - deactivate(close: boolean): JQueryPromise; - - /** - * Adds canActivate, activate, canDeactivate and deactivate functions to the provided model which pass through to the corresponding functions on the activator. - */ - includeIn(includeIn: any): void; - - /** - * Sets up a collection representing a pool of objects which the activator will activate. See below for details. Activators without an item bool always close their values on deactivate. Activators with an items pool only deactivate, but do not close them. - */ - forItems(items): Activator; - } - /** * The default settings used by activators. * @property {ActivatorSettings} defaults */ - export var defaults: ActivatorSettings; - + export var defaults: DurandalActivatorSettings; + /** * Creates a new activator. * @method create @@ -544,7 +366,7 @@ declare module 'durandal/activator' { * @param {ActivatorSettings} [settings] Per activator overrides of the default activator settings. * @returns {Activator} The created activator. */ - export function create(initialActiveItem?: T, settings?: ActivatorSettings): Activator; + export function create(initialActiveItem?: T, settings?: DurandalActivatorSettings): DurandalActivator; /** * Determines whether or not the provided object is an activator or not. @@ -568,7 +390,7 @@ declare module 'durandal/viewLocator' { * @param {string} [areasPath] Partial views are mapped to the "views" folder if not specified. Use this parameter to change their location. */ export function useConvention(modulesPath?: string, viewsPath?: string, areasPath?: string): void; - + /** * Maps an object instance to a view instance. * @param {object} obj The object to locate the view for. @@ -577,7 +399,7 @@ declare module 'durandal/viewLocator' { * @returns {Promise} A promise of the view. */ export function locateViewForObject(obj: any, area:string, elementsToSearch?: HTMLElement[]): JQueryPromise; - + /** * Converts a module id into a view id. By default the ids are the same. * @param {string} moduleId The module id. @@ -599,7 +421,7 @@ declare module 'durandal/viewLocator' { * @returns {string} The translated view id. */ export function translateViewIdToArea(viewId: string, area: string): string; - + /** * Locates the specified view. * @param {string|DOMElement} view A view. It will be immediately returned. @@ -608,7 +430,7 @@ declare module 'durandal/viewLocator' { * @returns {Promise} A promise of the view. */ export function locateView(view: HTMLElement, area?: string, elementsToSearch?: HTMLElement[]): JQueryPromise; - + /** * Locates the specified view. * @param {string|DOMElement} viewUrlOrId A view url or view id to locate. @@ -725,100 +547,8 @@ declare module 'durandal/composition' { * @requires jquery */ declare module 'durandal/app' { - import Events = require('durandal/events'); - import ts = require('durandal/typescript'); - - /** - * The title of your application. - */ - export var title: string; - - /** - * Shows a dialog via the dialog plugin. - * @param {object|string} obj The object (or moduleId) to display as a dialog. - * @param {object} [activationData] The data that should be passed to the object upon activation. - * @param {string} [context] The name of the dialog context to use. Uses the default context if none is specified. - * @returns {Promise} A promise that resolves when the dialog is closed and returns any data passed at the time of closing. - */ - export function showDialog(obj: any, activationData?: any, context?: string):JQueryPromise; - - /** - * Shows a message box via the dialog plugin. - * @param {string} message The message to display in the dialog. - * @param {string} [title] The title message. - * @param {string[]} [options] The options to provide to the user. - * @returns {Promise} A promise that resolves when the message box is closed and returns the selected option. - */ - export function showMessage(message: string, title?: string, options?: string[]): JQueryPromise; - - /** - * Configures one or more plugins to be loaded and installed into the application. - * @method configurePlugins - * @param {object} config Keys are plugin names. Values can be truthy, to simply install the plugin, or a configuration object to pass to the plugin. - * @param {string} [baseUrl] The base url to load the plugins from. - */ - export function configurePlugins(config: Object, baseUrl?: string): void; - - /** - * Starts the application. - * @returns {promise} - */ - export function start(): JQueryPromise; - - /** - * Sets the root module/view for the application. - * @param {string} root The root view or module. - * @param {string} [transition] The transition to use from the previous root (or splash screen) into the new root. - * @param {string} [applicationHost] The application host element id. By default the id 'applicationHost' will be used. - */ - export function setRoot(root: any, transition?: string, applicationHost?: string): void; - - /** - * Sets the root module/view for the application. - * @param {string} root The root view or module. - * @param {string} [transition] The transition to use from the previous root (or splash screen) into the new root. - * @param {string} [applicationHost] The application host element. By default the id 'applicationHost' will be used. - */ - export function setRoot(root: any, transition?: string, applicationHost?: HTMLElement): void; - - /** - * Creates a subscription or registers a callback for the specified event. - * @param {string} events One or more events, separated by white space. - * @returns {Subscription} A subscription is returned. - */ - export function on(events: string): ts.EventSubscription; - - /** - * Creates a subscription or registers a callback for the specified event. - * @param {string} events One or more events, separated by white space. - * @param {function} [callback] The callback function to invoke when the event is triggered. - * @param {object} [context] An object to use as `this` when invoking the `callback`. - * @returns {Events} The events object is returned for chaining. - */ - export function on(events: string, callback: Function, context?: any): Events; - - /** - * Removes the callbacks for the specified events. - * @param {string} [events] One or more events, separated by white space to turn off. If no events are specified, then the callbacks will be removed. - * @param {function} [callback] The callback function to remove. If `callback` is not provided, all callbacks for the specified events will be removed. - * @param {object} [context] The object that was used as `this`. Callbacks with this context will be removed. - * @chainable - */ - export function off(events: string, callback: Function, context?: any): Events; - - /** - * Triggers the specified events. - * @param {string} [events] One or more events, separated by white space to trigger. - * @chainable - */ - export function trigger(events: string, ...eventArgs:any[]): Events; - - /** - * Creates a function that will trigger the specified events when called. Simplifies proxying jQuery (or other) events through to the events object. - * @param {string} events One or more events, separated by white space to trigger by invoking the returned function. - * @returns {function} Calling the function will invoke the previously specified events on the events object. - */ - export function proxy(events: string): Function; + var theModule: DurandalAppModule; + export = theModule; } /** @@ -832,7 +562,6 @@ declare module 'durandal/app' { * @requires knockout */ declare module 'plugins/dialog' { - import activator = require('durandal/activator'); import composition = require('durandal/composition'); /** @@ -907,7 +636,7 @@ declare module 'plugins/dialog' { interface Dialog { owner: any; context: DialogContext; - activator: activator.Activator; + activator: DurandalActivator; close(): JQueryPromise; settings: composition.CompositionContext; } @@ -947,7 +676,7 @@ declare module 'plugins/dialog' { * @param {DialogContext} dialogContext The context to add. */ export function addContext(name: string, modalContext: DialogContext): void; - + /** * Gets the dialog model that is associated with the specified object. * @param {object} obj The object for whom to retrieve the dialog. @@ -958,9 +687,9 @@ declare module 'plugins/dialog' { /** * Closes the dialog associated with the specified object. * @param {object} obj The object whose dialog should be closed. - * @param {object} result* The results to return back to the dialog caller after closing. + * @param {object} results* The results to return back to the dialog caller after closing. */ - export function close(obj: any, ...result: any[]): void; + export function close(obj: any, ...results: any[]): void; /** * Shows a dialog. @@ -993,41 +722,6 @@ declare module 'plugins/dialog' { * @requires jquery */ declare module 'plugins/history' { - interface HistoryOptions { - /** - * The function that will be called back when the fragment changes. - */ - routeHandler: (fragment: string) => void; - - /** - * The url root used to extract the fragment when using push state. - */ - root?: string; - - /** - * Use hash change when present. - * @default true - */ - hashChange?: boolean; - - /** - * Use push state when present. - * @default false - */ - pushState?: boolean; - - /** - * Prevents loading of the current url when activating history. - * @default false - */ - silent?: boolean; - } - - interface NavigationOptions { - trigger: boolean; - replace: boolean; - } - /** * The setTimeout interval used when the browser does not support hash change events. * @default 50 @@ -1059,7 +753,7 @@ declare module 'plugins/history' { * @param {HistoryOptions} options. * @returns {boolean|undefined} Returns true/false from loading the url unless the silent option was selected. */ - export function activate(options: HistoryOptions): boolean; + export function activate(options: DurandalHistoryOptions): boolean; /** * Disable history, perhaps temporarily. Not useful in a real app, but possibly useful for unit testing Routers. @@ -1102,7 +796,7 @@ declare module 'plugins/history' { * @param {object|boolean} options An options object with optional trigger and replace flags. You can also pass a boolean directly to set the trigger option. Trigger is `true` by default. * @return {boolean} Returns true/false from loading the url. */ - export function navigate(fragment: string, options: NavigationOptions): boolean; + export function navigate(fragment: string, options: DurandalNavigationOptions): boolean; /** * Navigates back in the browser history. @@ -1121,7 +815,7 @@ declare module 'plugins/http' { * @default callback */ export var callbackParam: string; - + /** * Makes an HTTP GET request. * @param {string} url The url to send the get request to. @@ -1138,7 +832,7 @@ declare module 'plugins/http' { * @returns {Promise} A promise of the response data. */ export function jsonp(url: string, query?: Object, callbackParam?: string): JQueryPromise; - + /** * Makes an HTTP POST request. * @param {string} url The url to send the post request to. @@ -1395,324 +1089,571 @@ declare module 'plugins/widget' { * @requires jquery */ declare module 'plugins/router' { - import activator = require('durandal/activator'); - import Events = require('durandal/events'); - import ts = require('durandal/typescript'); - - var RootRouter: ts.RootRouter; - - export = RootRouter; + var theModule: DurandalRootRouter; + export = theModule; } -/** - * Interface definitions used by other modules which were not possible to define within those modules due to TypeScript limitations. - */ -declare module 'durandal/typescript' { - import activator = require('durandal/activator'); - import history = require('plugins/history'); +interface DurandalEventSubscription { + /** + * Attaches a callback to the event subscription. + * @param {function} callback The callback function to invoke when the event is triggered. + * @param {object} [context] An object to use as `this` when invoking the `callback`. + * @chainable + */ + then(thenCallback: Function, context?: any): DurandalEventSubscription; /** - * Represents an event subscription. - * @class - */ - export interface EventSubscription { - /** - * Attaches a callback to the event subscription. - * @param {function} callback The callback function to invoke when the event is triggered. - * @param {object} [context] An object to use as `this` when invoking the `callback`. - * @chainable - */ - then(thenCallback: Function, context?: any): EventSubscription; + * Attaches a callback to the event subscription. + * @param {function} [callback] The callback function to invoke when the event is triggered. If `callback` is not provided, the previous callback will be re-activated. + * @param {object} [context] An object to use as `this` when invoking the `callback`. + * @chainable + */ + on(thenCallback: Function, context?: any): DurandalEventSubscription; - /** - * Attaches a callback to the event subscription. - * @param {function} [callback] The callback function to invoke when the event is triggered. If `callback` is not provided, the previous callback will be re-activated. - * @param {object} [context] An object to use as `this` when invoking the `callback`. - * @chainable - */ - on(thenCallback: Function, context?: any): EventSubscription; - - /** - * Cancels the subscription. - * @chainable - */ - off(): EventSubscription; - } - - export interface RouteConfiguration { - title?: string; - moduleId?: string; - hash?: string; - routePattern?: RegExp; - isActive?: KnockoutComputed; - } - - export interface RouteInstruction { - fragment: string; - queryString: string; - config: RouteConfiguration; - params: any[]; - queryParams: Object; - } - - export interface RelativeRouteSettings { - moduleId?: string; - route?: string; - fromParent?: boolean; - } - - export interface Router { - /** - * The route handlers that are registered. Each handler consists of a `routePattern` and a `callback`. - */ - handlers: { routePattern: RegExp; callback: (fragment: string) => void; }[]; - - /** - * The route configs that are registered. - */ - routes: RouteConfiguration[]; - - /** - * The active item/screen based on the current navigation state. - */ - activeItem: activator.Activator; - - /** - * The route configurations that have been designated as displayable in a nav ui (nav:true). - */ - navigationModel: KnockoutObservableArray; - - /** - * Indicates that the router (or a child router) is currently in the process of navigating. - */ - isNavigating: KnockoutComputed; - - /** - * An observable surfacing the active routing instruction that is currently being processed or has recently finished processing. - * The instruction object has `config`, `fragment`, `queryString`, `params` and `queryParams` properties. - */ - activeInstruction: KnockoutObservable; - - /** - * Parses a query string into an object. - * @param {string} queryString The query string to parse. - * @returns {object} An object keyed according to the query string parameters. - */ - parseQueryString(queryString: string): Object; - - /** - * Add a route to be tested when the url fragment changes. - * @param {RegEx} routePattern The route pattern to test against. - * @param {function} callback The callback to execute when the route pattern is matched. - */ - route(routePattern: RegExp, callback: (fragment: string) => void ): void; - - /** - * Attempt to load the specified URL fragment. If a route succeeds with a match, returns `true`. If no defined routes matches the fragment, returns `false`. - * @param {string} fragment The URL fragment to find a match for. - * @returns {boolean} True if a match was found, false otherwise. - */ - loadUrl(fragment: string): boolean; - - /** - * Updates the document title based on the activated module instance, the routing instruction and the app.title. - * @param {object} instance The activated module. - * @param {object} instruction The routing instruction associated with the action. It has a `config` property that references the original route mapping config. - */ - updateDocumentTitle(instance: Object, instruction: RouteInstruction): void; - - /** - * Save a fragment into the hash history, or replace the URL state if the - * 'replace' option is passed. You are responsible for properly URL-encoding - * the fragment in advance. - * The options object can contain `trigger: false` if you wish to not have the - * route callback be fired, or `replace: true`, if - * you wish to modify the current URL without adding an entry to the history. - * @param {string} fragment The url fragment to navigate to. - * @param {object|boolean} options An options object with optional trigger and replace flags. You can also pass a boolean directly to set the trigger option. Trigger is `true` by default. - * @return {boolean} Returns true/false from loading the url. - */ - navigate(fragment: string, trigger?: boolean): boolean; - - /** - * Save a fragment into the hash history, or replace the URL state if the - * 'replace' option is passed. You are responsible for properly URL-encoding - * the fragment in advance. - * The options object can contain `trigger: false` if you wish to not have the - * route callback be fired, or `replace: true`, if - * you wish to modify the current URL without adding an entry to the history. - * @param {string} fragment The url fragment to navigate to. - * @param {object|boolean} options An options object with optional trigger and replace flags. You can also pass a boolean directly to set the trigger option. Trigger is `true` by default. - * @return {boolean} Returns true/false from loading the url. - */ - navigate(fragment: string, options: history.NavigationOptions): boolean; - - /** - * Navigates back in the browser history. - */ - navigateBack(): void; - - /** - * Converts a route to a hash suitable for binding to a link's href. - * @param {string} route - * @returns {string} The hash. - */ - convertRouteToHash(route: string): string; - - /** - * Converts a route to a module id. This is only called if no module id is supplied as part of the route mapping. - * @param {string} route - * @returns {string} The module id. - */ - convertRouteToModuleId(route: string): string; - - /** - * Converts a route to a displayable title. This is only called if no title is specified as part of the route mapping. - * @method convertRouteToTitle - * @param {string} route - * @returns {string} The title. - */ - convertRouteToTitle(route: string): string; - - /** - * Maps route patterns to modules. - * @param {string} route A route. - * @chainable - */ - map(route: string): Router; - - /** - * Maps route patterns to modules. - * @param {string} route A route pattern. - * @param {string} moduleId The module id to map the route to. - * @chainable - */ - map(route: string, moduleId: string): Router; - - /** - * Maps route patterns to modules. - * @param {RegExp} route A route pattern. - * @param {string} moduleId The module id to map the route to. - * @chainable - */ - map(route: RegExp, moduleId: string): Router; - - /** - * Maps route patterns to modules. - * @param {string} route A route pattern. - * @param {RouteConfiguration} config The route's configuration. - * @chainable - */ - map(route: string, config: RouteConfiguration): Router; - - /** - * Maps route patterns to modules. - * @method map - * @param {RegExp} route A route pattern. - * @param {RouteConfiguration} config The route's configuration. - * @chainable - */ - map(route: RegExp, config: RouteConfiguration): Router; - - /** - * Maps route patterns to modules. - * @param {RouteConfiguration} config The route's configuration. - * @chainable - */ - map(config: RouteConfiguration): Router; - - /** - * Maps route patterns to modules. - * @param {RouteConfiguration[]} configs An array of route configurations. - * @chainable - */ - map(configs: RouteConfiguration[]): Router; - - /** - * Builds an observable array designed to bind a navigation UI to. The model will exist in the `navigationModel` property. - * @param {number} defaultOrder The default order to use for navigation visible routes that don't specify an order. The defualt is 100. - * @chainable - */ - buildNavigationModel(defaultOrder?: number): Router; - - /** - * Configures the router to map unknown routes to modules at the same path. - * @chainable - */ - mapUnknownRoutes(): Router; - - /** - * Configures the router use the specified module id for all unknown routes. - * @param {string} notFoundModuleId Represents the module id to route all unknown routes to. - * @param {string} [replaceRoute] Optionally provide a route to replace the url with. - * @chainable - */ - mapUnknownRoutes(notFoundModuleId: string, replaceRoute?: string): Router; - - /** - * Configures how the router will handle unknown routes. - * @param {function} callback Called back with the route instruction containing the route info. The function can then modify the instruction by adding a moduleId and the router will take over from there. - * @chainable - */ - mapUnknownRoutes(callback: (instruction: RouteInstruction) => void ): Router; - - /** - * Configures how the router will handle unknown routes. - * @param {RouteConfiguration} config The route configuration to use for unknown routes. - * @chainable - */ - mapUnknownRoutes(config: RouteConfiguration): Router; - - /** - * Resets the router by removing handlers, routes, event handlers and previously configured options. - * @chainable - */ - reset(): Router; - - /** - * Makes all configured routes and/or module ids relative to a certain base url. - * @param {string} settings The value is used as the base for routes and module ids. - * @chainable - */ - makeRelative(settings: string): Router; - - /** - * Makes all configured routes and/or module ids relative to a certain base url. - * @param {RelativeRouteSettings} settings If an object, you can specify `route` and `moduleId` separately. In place of specifying route, you can set `fromParent:true` to make routes automatically relative to the parent router's active route. - * @chainable - */ - makeRelative(settings: RelativeRouteSettings): Router; - - /** - * Creates a child router. - * @returns {Router} The child router. - */ - createChildRouter(): Router; - - /** - * Inspects routes and modules before activation. Can be used to protect access by cancelling navigation or redirecting. - * @param {object} instance The module instance that is about to be activated by the router. - * @param {object} instruction The route instruction. The instruction object has config, fragment, queryString, params and queryParams properties. - * @returns {Promise|Boolean|String} If a boolean, determines whether or not the route should activate or be cancelled. If a string, causes a redirect to the specified route. Can also be a promise for either of these value types. - */ - guardRoute?:(instance:Object, instruction:RouteInstruction) => any; - } - - export interface RootRouter extends Router { - /** - * Activates the router and the underlying history tracking mechanism. - * @returns {Promise} A promise that resolves when the router is ready. - */ - activate(options?: history.HistoryOptions): JQueryPromise; - - /** - * Disable history, perhaps temporarily. Not useful in a real app, but possibly useful for unit testing Routers. - */ - deactivate(): void; - - /** - * Installs the router's custom ko binding handler. - */ - install(): void; - } + /** + * Cancels the subscription. + * @chainable + */ + off(): DurandalEventSubscription; } + +interface DurandalEventSupport { + /** + * Creates a subscription or registers a callback for the specified event. + * @param {string} events One or more events, separated by white space. + * @returns {Subscription} A subscription is returned. + */ + on(events: string): DurandalEventSubscription; + + /** + * Creates a subscription or registers a callback for the specified event. + * @param {string} events One or more events, separated by white space. + * @param {function} [callback] The callback function to invoke when the event is triggered. + * @param {object} [context] An object to use as `this` when invoking the `callback`. + * @returns {Events} The events object is returned for chaining. + */ + on(events: string, callback: Function, context?: any): T; + + /** + * Removes the callbacks for the specified events. + * @param {string} [events] One or more events, separated by white space to turn off. If no events are specified, then the callbacks will be removed. + * @param {function} [callback] The callback function to remove. If `callback` is not provided, all callbacks for the specified events will be removed. + * @param {object} [context] The object that was used as `this`. Callbacks with this context will be removed. + * @chainable + */ + off(events: string, callback: Function, context?: any): T; + + /** + * Triggers the specified events. + * @param {string} [events] One or more events, separated by white space to trigger. + * @chainable + */ + trigger(events: string, ...eventArgs: any[]): T; + + /** + * Creates a function that will trigger the specified events when called. Simplifies proxying jQuery (or other) events through to the events object. + * @param {string} events One or more events, separated by white space to trigger by invoking the returned function. + * @returns {function} Calling the function will invoke the previously specified events on the events object. + */ + proxy(events: string): Function; +} + +interface DurandalEventModule { + new (): DurandalEventSupport; + includeIn(targetObject: any): void; +} + +interface DurandalAppModule extends DurandalEventSupport { + /** + * The title of your application. + */ + title: string; + + /** + * Shows a dialog via the dialog plugin. + * @param {object|string} obj The object (or moduleId) to display as a dialog. + * @param {object} [activationData] The data that should be passed to the object upon activation. + * @param {string} [context] The name of the dialog context to use. Uses the default context if none is specified. + * @returns {Promise} A promise that resolves when the dialog is closed and returns any data passed at the time of closing. + */ + showDialog(obj: any, activationData?: any, context?: string): JQueryPromise; + + /** + * Shows a message box via the dialog plugin. + * @param {string} message The message to display in the dialog. + * @param {string} [title] The title message. + * @param {string[]} [options] The options to provide to the user. + * @returns {Promise} A promise that resolves when the message box is closed and returns the selected option. + */ + showMessage(message: string, title?: string, options?: string[]): JQueryPromise; + + /** + * Configures one or more plugins to be loaded and installed into the application. + * @method configurePlugins + * @param {object} config Keys are plugin names. Values can be truthy, to simply install the plugin, or a configuration object to pass to the plugin. + * @param {string} [baseUrl] The base url to load the plugins from. + */ + configurePlugins(config: Object, baseUrl?: string): void; + + /** + * Starts the application. + * @returns {promise} + */ + start(): JQueryPromise; + + /** + * Sets the root module/view for the application. + * @param {string} root The root view or module. + * @param {string} [transition] The transition to use from the previous root (or splash screen) into the new root. + * @param {string} [applicationHost] The application host element id. By default the id 'applicationHost' will be used. + */ + setRoot(root: any, transition?: string, applicationHost?: string): void; + + /** + * Sets the root module/view for the application. + * @param {string} root The root view or module. + * @param {string} [transition] The transition to use from the previous root (or splash screen) into the new root. + * @param {string} [applicationHost] The application host element. By default the id 'applicationHost' will be used. + */ + setRoot(root: any, transition?: string, applicationHost?: HTMLElement): void; +} + +interface DurandalActivatorSettings { + /** + * The default value passed to an object's deactivate function as its close parameter. + * @default true + */ + closeOnDeactivate: boolean; + + /** + * Lower-cased words which represent a truthy value. + * @default ['yes', 'ok', 'true'] + */ + affirmations: string[]; + + /** + * Interprets the response of a `canActivate` or `canDeactivate` call using the known affirmative values in the `affirmations` array. + * @param {object} value + * @returns {boolean} + */ + interpretResponse(value: any): boolean; + + /** + * Determines whether or not the current item and the new item are the same. + * @param {object} currentItem + * @param {object} newItem + * @param {object} currentActivationData + * @param {object} newActivationData + * @returns {boolean} + */ + areSameItem(currentItem: any, newItem: any, currentActivationData: any, newActivationData: any): boolean; + + /** + * Called immediately before the new item is activated. + * @param {object} newItem + */ + beforeActivate(newItem: any): any; + + /** + * Called immediately after the old item is deactivated. + * @param {object} oldItem The previous item. + * @param {boolean} close Whether or not the previous item was closed. + * @param {function} setter The activate item setter function. + */ + afterDeactivate(oldItem: any, close: boolean, setter: Function): void; +} + +interface DurandalActivator extends KnockoutComputed { + /** + * The settings for this activator. + */ + settings: DurandalActivatorSettings; + + /** + * An observable which indicates whether or not the activator is currently in the process of activating an instance. + * @returns {boolean} + */ + isActivating: KnockoutObservable; + + /** + * Determines whether or not the specified item can be deactivated. + * @param {object} item The item to check. + * @param {boolean} close Whether or not to check if close is possible. + * @returns {promise} + */ + canDeactivateItem(item: T, close: boolean): JQueryPromise; + + /** + * Deactivates the specified item. + * @param {object} item The item to deactivate. + * @param {boolean} close Whether or not to close the item. + * @returns {promise} + */ + deactivateItem(item: T, close: boolean): JQueryPromise; + + /** + * Determines whether or not the specified item can be activated. + * @param {object} item The item to check. + * @param {object} activationData Data associated with the activation. + * @returns {promise} + */ + canActivateItem(newItem: T, activationData?: any): JQueryPromise; + + /** + * Activates the specified item. + * @param {object} newItem The item to activate. + * @param {object} newActivationData Data associated with the activation. + * @returns {promise} + */ + activateItem(newItem: T, activationData?: any): JQueryPromise; + + /** + * Determines whether or not the activator, in its current state, can be activated. + * @returns {promise} + */ + canActivate(): JQueryPromise; + + /** + * Activates the activator, in its current state. + * @returns {promise} + */ + activate(): JQueryPromise; + + /** + * Determines whether or not the activator, in its current state, can be deactivated. + * @returns {promise} + */ + canDeactivate(close: boolean): JQueryPromise; + + /** + * Deactivates the activator, in its current state. + * @returns {promise} + */ + deactivate(close: boolean): JQueryPromise; + + /** + * Adds canActivate, activate, canDeactivate and deactivate functions to the provided model which pass through to the corresponding functions on the activator. + */ + includeIn(includeIn: any): void; + + /** + * Sets up a collection representing a pool of objects which the activator will activate. See below for details. Activators without an item bool always close their values on deactivate. Activators with an items pool only deactivate, but do not close them. + */ + forItems(items): DurandalActivator; +} + +interface DurandalHistoryOptions { + /** + * The function that will be called back when the fragment changes. + */ + routeHandler: (fragment: string) => void; + + /** + * The url root used to extract the fragment when using push state. + */ + root?: string; + + /** + * Use hash change when present. + * @default true + */ + hashChange?: boolean; + + /** + * Use push state when present. + * @default false + */ + pushState?: boolean; + + /** + * Prevents loading of the current url when activating history. + * @default false + */ + silent?: boolean; +} + +interface DurandalNavigationOptions { + trigger: boolean; + replace: boolean; +} + +interface DurandalRouteConfiguration { + title?: string; + moduleId?: string; + hash?: string; + route?: string; + routePattern?: RegExp; + isActive?: KnockoutComputed; + nav:any; +} + +interface DurandalRouteInstruction { + fragment: string; + queryString: string; + config: DurandalRouteConfiguration; + params: any[]; + queryParams: Object; +} + +interface DurandalRelativeRouteSettings { + moduleId?: string; + route?: string; + fromParent?: boolean; +} + +interface DurandalRouterBase extends DurandalEventSupport { + /** + * The route handlers that are registered. Each handler consists of a `routePattern` and a `callback`. + */ + handlers: { routePattern: RegExp; callback: (fragment: string) => void; }[]; + + /** + * The route configs that are registered. + */ + routes: DurandalRouteConfiguration[]; + + /** + * The active item/screen based on the current navigation state. + */ + activeItem: DurandalActivator; + + /** + * The route configurations that have been designated as displayable in a nav ui (nav:true). + */ + navigationModel: KnockoutObservableArray; + + /** + * Indicates that the router (or a child router) is currently in the process of navigating. + */ + isNavigating: KnockoutComputed; + + /** + * An observable surfacing the active routing instruction that is currently being processed or has recently finished processing. + * The instruction object has `config`, `fragment`, `queryString`, `params` and `queryParams` properties. + */ + activeInstruction: KnockoutObservable; + + /** + * Parses a query string into an object. + * @param {string} queryString The query string to parse. + * @returns {object} An object keyed according to the query string parameters. + */ + parseQueryString(queryString: string): Object; + + /** + * Add a route to be tested when the url fragment changes. + * @param {RegEx} routePattern The route pattern to test against. + * @param {function} callback The callback to execute when the route pattern is matched. + */ + route(routePattern: RegExp, callback: (fragment: string) => void): void; + + /** + * Attempt to load the specified URL fragment. If a route succeeds with a match, returns `true`. If no defined routes matches the fragment, returns `false`. + * @param {string} fragment The URL fragment to find a match for. + * @returns {boolean} True if a match was found, false otherwise. + */ + loadUrl(fragment: string): boolean; + + /** + * Updates the document title based on the activated module instance, the routing instruction and the app.title. + * @param {object} instance The activated module. + * @param {object} instruction The routing instruction associated with the action. It has a `config` property that references the original route mapping config. + */ + updateDocumentTitle(instance: Object, instruction: DurandalRouteInstruction): void; + + /** + * Save a fragment into the hash history, or replace the URL state if the + * 'replace' option is passed. You are responsible for properly URL-encoding + * the fragment in advance. + * The options object can contain `trigger: false` if you wish to not have the + * route callback be fired, or `replace: true`, if + * you wish to modify the current URL without adding an entry to the history. + * @param {string} fragment The url fragment to navigate to. + * @param {object|boolean} options An options object with optional trigger and replace flags. You can also pass a boolean directly to set the trigger option. Trigger is `true` by default. + * @return {boolean} Returns true/false from loading the url. + */ + navigate(fragment: string, trigger?: boolean): boolean; + + /** + * Save a fragment into the hash history, or replace the URL state if the + * 'replace' option is passed. You are responsible for properly URL-encoding + * the fragment in advance. + * The options object can contain `trigger: false` if you wish to not have the + * route callback be fired, or `replace: true`, if + * you wish to modify the current URL without adding an entry to the history. + * @param {string} fragment The url fragment to navigate to. + * @param {object|boolean} options An options object with optional trigger and replace flags. You can also pass a boolean directly to set the trigger option. Trigger is `true` by default. + * @return {boolean} Returns true/false from loading the url. + */ + navigate(fragment: string, options: DurandalNavigationOptions): boolean; + + /** + * Navigates back in the browser history. + */ + navigateBack(): void; + + /** + * Converts a route to a hash suitable for binding to a link's href. + * @param {string} route + * @returns {string} The hash. + */ + convertRouteToHash(route: string): string; + + /** + * Converts a route to a module id. This is only called if no module id is supplied as part of the route mapping. + * @param {string} route + * @returns {string} The module id. + */ + convertRouteToModuleId(route: string): string; + + /** + * Converts a route to a displayable title. This is only called if no title is specified as part of the route mapping. + * @method convertRouteToTitle + * @param {string} route + * @returns {string} The title. + */ + convertRouteToTitle(route: string): string; + + /** + * Maps route patterns to modules. + * @param {string} route A route. + * @chainable + */ + map(route: string): T; + + /** + * Maps route patterns to modules. + * @param {string} route A route pattern. + * @param {string} moduleId The module id to map the route to. + * @chainable + */ + map(route: string, moduleId: string): T; + + /** + * Maps route patterns to modules. + * @param {RegExp} route A route pattern. + * @param {string} moduleId The module id to map the route to. + * @chainable + */ + map(route: RegExp, moduleId: string): T; + + /** + * Maps route patterns to modules. + * @param {string} route A route pattern. + * @param {RouteConfiguration} config The route's configuration. + * @chainable + */ + map(route: string, config: DurandalRouteConfiguration): T; + + /** + * Maps route patterns to modules. + * @method map + * @param {RegExp} route A route pattern. + * @param {RouteConfiguration} config The route's configuration. + * @chainable + */ + map(route: RegExp, config: DurandalRouteConfiguration): T; + + /** + * Maps route patterns to modules. + * @param {RouteConfiguration} config The route's configuration. + * @chainable + */ + map(config: DurandalRouteConfiguration): T; + + /** + * Maps route patterns to modules. + * @param {RouteConfiguration[]} configs An array of route configurations. + * @chainable + */ + map(configs: DurandalRouteConfiguration[]): T; + + /** + * Builds an observable array designed to bind a navigation UI to. The model will exist in the `navigationModel` property. + * @param {number} defaultOrder The default order to use for navigation visible routes that don't specify an order. The defualt is 100. + * @chainable + */ + buildNavigationModel(defaultOrder?: number): T; + + /** + * Configures the router to map unknown routes to modules at the same path. + * @chainable + */ + mapUnknownRoutes(): T; + + /** + * Configures the router use the specified module id for all unknown routes. + * @param {string} notFoundModuleId Represents the module id to route all unknown routes to. + * @param {string} [replaceRoute] Optionally provide a route to replace the url with. + * @chainable + */ + mapUnknownRoutes(notFoundModuleId: string, replaceRoute?: string): T; + + /** + * Configures how the router will handle unknown routes. + * @param {function} callback Called back with the route instruction containing the route info. The function can then modify the instruction by adding a moduleId and the router will take over from there. + * @chainable + */ + mapUnknownRoutes(callback: (instruction: DurandalRouteInstruction) => void): T; + + /** + * Configures how the router will handle unknown routes. + * @param {RouteConfiguration} config The route configuration to use for unknown routes. + * @chainable + */ + mapUnknownRoutes(config: DurandalRouteConfiguration): T; + + /** + * Resets the router by removing handlers, routes, event handlers and previously configured options. + * @chainable + */ + reset(): T; + + /** + * Makes all configured routes and/or module ids relative to a certain base url. + * @param {string} settings The value is used as the base for routes and module ids. + * @chainable + */ + makeRelative(settings: string): T; + + /** + * Makes all configured routes and/or module ids relative to a certain base url. + * @param {RelativeRouteSettings} settings If an object, you can specify `route` and `moduleId` separately. In place of specifying route, you can set `fromParent:true` to make routes automatically relative to the parent router's active route. + * @chainable + */ + makeRelative(settings: DurandalRelativeRouteSettings): T; + + /** + * Creates a child router. + * @returns {Router} The child router. + */ + createChildRouter(): T; + + /** + * Inspects routes and modules before activation. Can be used to protect access by cancelling navigation or redirecting. + * @param {object} instance The module instance that is about to be activated by the router. + * @param {object} instruction The route instruction. The instruction object has config, fragment, queryString, params and queryParams properties. + * @returns {Promise|Boolean|String} If a boolean, determines whether or not the route should activate or be cancelled. If a string, causes a redirect to the specified route. Can also be a promise for either of these value types. + */ + guardRoute?: (instance: Object, instruction: DurandalRouteInstruction) => any; +} + +interface DurandalRouter extends DurandalRouterBase { } + +interface DurandalRootRouter extends DurandalRouterBase { + /** + * Activates the router and the underlying history tracking mechanism. + * @returns {Promise} A promise that resolves when the router is ready. + */ + activate(options?: DurandalHistoryOptions): JQueryPromise; + + /** + * Disable history, perhaps temporarily. Not useful in a real app, but possibly useful for unit testing Routers. + */ + deactivate(): void; + + /** + * Installs the router's custom ko binding handler. + */ + install(): void; +} \ No newline at end of file From 9a3601f93412441ab2d6d7f47f3aeb9e6014a685 Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Tue, 15 Oct 2013 16:49:44 -0700 Subject: [PATCH 081/150] Add mocha members and comment existing used interface --- mocha/mocha-tests.ts | 85 +++++++++++++++++++++++++++++++++++++++++++- mocha/mocha.d.ts | 40 ++++++++++++++++++--- 2 files changed, 120 insertions(+), 5 deletions(-) diff --git a/mocha/mocha-tests.ts b/mocha/mocha-tests.ts index 53c8e5720f..5c8f340999 100644 --- a/mocha/mocha-tests.ts +++ b/mocha/mocha-tests.ts @@ -1,5 +1,7 @@ /// +var mocha: Mocha; + function test_describe() { describe('something', () => { }); @@ -49,4 +51,85 @@ function test_afterEach() { afterEach(() => { }); afterEach((done) => { done(); }); -} \ No newline at end of file +} + +function test_reporter_string(){ + mocha.reporter('html'); +} + +function test_reporter_function(){ + mocha.reporter(function(){}); +} + +function test_setup_slow_option(){ + mocha.setup({slow: 25}); +} + +function test_setup_timeout_option(){ + mocha.setup({timeout: 25}); +} + +function test_setup_globals_option(){ + mocha.setup({globals: ['mocha']}); +} + +function test_setup_ui_option(){ + mocha.setup({ui: 'bdd'}); +} + +function test_setup_reporter_string_option(){ + mocha.setup({reporter: 'html'}); +} + +function test_setup_reporter_function_option(){ + mocha.setup({reporter: function(){}}); +} + +function test_setup_bail_option(){ + mocha.setup({bail: false}); +} + +function test_setup_ignore_leaks_option(){ + mocha.setup({ignoreLeaks: false}); +} + +function test_setup_grep_string_option(){ + mocha.setup({grep: "describe"}); +} + +function test_setup_grep_regex_option(){ + mocha.setup({grep: new RegExp('describe')}); +} + +function test_setup_grep_regex_literal_option(){ + mocha.setup({grep: /(expect|should)/i }); +} + +function test_setup_all_options(){ + mocha.setup({ + slow: 25, + timeout: 25, + ui: 'bdd', + globals: ['mocha'], + reporter: 'html', + bail: true, + ignoreLeaks: true, + grep: 'test' + }); +} + +function test_run(){ + mocha.run(function(){}) +} + +function test_growl(){ + mocha.growl(); +} + +function test_chaining(){ + mocha + .setup({slow:25}) + .growl() + .reporter('html') + .reporter(function(){}); +} diff --git a/mocha/mocha.d.ts b/mocha/mocha.d.ts index 8c1167def1..06970b4fd9 100644 --- a/mocha/mocha.d.ts +++ b/mocha/mocha.d.ts @@ -4,14 +4,46 @@ // DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped interface Mocha { - setup(options: MochaSetupOptions): void; + // Setup mocha with the given setting options. + setup(options: MochaSetupOptions): Mocha; + + //Run tests and invoke `fn()` when complete. run(callback: () => void): void; + + // Set reporter as function + reporter(reporter: () => void): Mocha; + + // Set reporter, defaults to "dot" + reporter(reporter: string): Mocha; + + // Enable growl support. + growl(): Mocha } interface MochaSetupOptions { - slow: number; - timeout: number; - ui: string; + //milliseconds to wait before considering a test slow + slow?: number; + + // timeout in milliseconds + timeout?: number; + + // ui name "bdd", "tdd", "exports" etc + ui?: string; + + //array of accepted globals + globals?: Array; + + // reporter instance (function or string), defaults to `mocha.reporters.Dot` + reporter?: any; + + // bail on the first test failure + bail?: Boolean; + + // ignore global leaks + ignoreLeaks?: Boolean; + + // grep string or regexp to filter tests with + grep?: any; } declare var describe : { From dd19153965531640b83b60a0ea0e6268c88de836 Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Fri, 11 Oct 2013 15:11:36 -0700 Subject: [PATCH 082/150] Add 'use' to chai and include a test --- chai/chai-tests.ts | 6 ++++++ chai/chai.d.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/chai/chai-tests.ts b/chai/chai-tests.ts index 8a09c3f420..b559c515da 100644 --- a/chai/chai-tests.ts +++ b/chai/chai-tests.ts @@ -688,6 +688,12 @@ function _throw() { }, "blah: expected [Function] to throw error including 'hello' but got 'testing'"); } +function use(){ + chai.use(function (_chai, utils) { + _chai.can.use.any(); + }); +} + function respondTo() { function Foo() {}; var bar = {}; diff --git a/chai/chai.d.ts b/chai/chai.d.ts index 9d649a17c5..8e33f8590e 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -8,6 +8,8 @@ declare module chai { function expect(target: any): Expect; + function use(fn: (chai: any, utils: any) => void); + interface ExpectStatic { (target: any): Expect; } From e43a0edd92a800258c12d1d9b06f016a0224833b Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Wed, 23 Oct 2013 09:48:43 -0700 Subject: [PATCH 083/150] Add comment to describe new use function definition --- chai/chai.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/chai/chai.d.ts b/chai/chai.d.ts index 8e33f8590e..9fc93a6670 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -8,6 +8,7 @@ declare module chai { function expect(target: any): Expect; + // Provides a way to extend the internals of Chai function use(fn: (chai: any, utils: any) => void); interface ExpectStatic { From 465dfbaa6e76fad214e69132326121fbd4cf5e41 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 Oct 2013 16:26:43 -0700 Subject: [PATCH 084/150] Angular mocks changes for 1.2.0 --- angularjs/angular-mocks-tests.ts | 20 ++++++++++++++++++++ angularjs/angular-mocks.d.ts | 13 +++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 angularjs/angular-mocks-tests.ts diff --git a/angularjs/angular-mocks-tests.ts b/angularjs/angular-mocks-tests.ts new file mode 100644 index 0000000000..3990809bb5 --- /dev/null +++ b/angularjs/angular-mocks-tests.ts @@ -0,0 +1,20 @@ +/// + +declare var mock: ng.IMockStatic; + +mock.dump({ key: 'value' }); + +mock.inject( + function () { return 1; }, + function () { return 2; } + ); + +mock.module('module1', 'module2'); +mock.module( + function () { return 1; }, + function () { return 2; } + ); +mock.module({ module1: function () { return 1; } }); + +mock.TzDate(-7, '2013-1-1T15:00:00Z'); +mock.TzDate(-8, 12345678); diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 4d8decbf8b..c31b5b8116 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -1,7 +1,6 @@ -// Type definitions for Angular JS 1.0 (ngMock, ngMockE2E module) +// Type definitions for Angular JS 1.2.0 (ngMock, ngMockE2E module) // Project: http://angularjs.org -// Definitions by: Diego Vilar -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/daptiv/DefinitelyTyped /// @@ -26,14 +25,16 @@ declare module ng { } interface IMockStatic { - // see http://docs.angularjs.org/api/angular.mock.debug - debug(obj: any): string; + // see http://docs.angularjs.org/api/angular.mock.dump + dump(obj: any): string; // see http://docs.angularjs.org/api/angular.mock.inject inject(...fns: Function[]): any; // see http://docs.angularjs.org/api/angular.mock.module - module(...modules: any[]): any; + module(...modules: string[]): any; + module(...modules: Function[]): any; + module(modules: Object): any; // see http://docs.angularjs.org/api/angular.mock.TzDate TzDate(offset: number, timestamp: number): Date; From 683e94d8d8335b6fadc18701d8600e7ba6bce8b0 Mon Sep 17 00:00:00 2001 From: Jonathan Park Date: Mon, 14 Oct 2013 16:40:45 -0700 Subject: [PATCH 085/150] Adding angular 1.2 definitions Conflicts: angularjs/angular-mocks.d.ts --- angularjs/angular-1.0-tests.ts | 219 ++++++++ angularjs/angular-1.0.d.ts | 760 ++++++++++++++++++++++++++++ angularjs/angular-cookies-1.0.d.ts | 30 ++ angularjs/angular-cookies.d.ts | 2 +- angularjs/angular-mocks-1.0.d.ts | 150 ++++++ angularjs/angular-mocks.d.ts | 20 +- angularjs/angular-resource-1.0.d.ts | 82 +++ angularjs/angular-resource.d.ts | 4 +- angularjs/angular-route-tests.ts | 14 + angularjs/angular-route.d.ts | 63 +++ angularjs/angular-sanitize-1.0.d.ts | 22 + angularjs/angular-sanitize.d.ts | 2 +- angularjs/angular-scenario-1.0.d.ts | 155 ++++++ angularjs/angular.d.ts | 54 +- 14 files changed, 1513 insertions(+), 64 deletions(-) create mode 100644 angularjs/angular-1.0-tests.ts create mode 100755 angularjs/angular-1.0.d.ts create mode 100644 angularjs/angular-cookies-1.0.d.ts create mode 100644 angularjs/angular-mocks-1.0.d.ts create mode 100644 angularjs/angular-resource-1.0.d.ts create mode 100644 angularjs/angular-route-tests.ts create mode 100644 angularjs/angular-route.d.ts create mode 100644 angularjs/angular-sanitize-1.0.d.ts create mode 100644 angularjs/angular-scenario-1.0.d.ts diff --git a/angularjs/angular-1.0-tests.ts b/angularjs/angular-1.0-tests.ts new file mode 100644 index 0000000000..5c628ced16 --- /dev/null +++ b/angularjs/angular-1.0-tests.ts @@ -0,0 +1,219 @@ +/// + +// issue: https://github.com/borisyankov/DefinitelyTyped/issues/369 +https://github.com/witoldsz/angular-http-auth/blob/master/src/angular-http-auth.js +/** + * @license HTTP Auth Interceptor Module for AngularJS + * (c) 2012 Witold Szczerba + * License: MIT + */ +angular.module('http-auth-interceptor', []) + + .provider('authService', function () { + /** + * Holds all the requests which failed due to 401 response, + * so they can be re-requested in future, once login is completed. + */ + var buffer = []; + + /** + * Required by HTTP interceptor. + * Function is attached to provider to be invisible for regular users of this service. + */ + this.pushToBuffer = function (config: ng.IRequestConfig, deferred: ng.IDeferred) { + buffer.push({ + config: config, + deferred: deferred + }); + } + + this.$get = ['$rootScope', '$injector', function ($rootScope: ng.IScope, $injector: ng.auto.IInjectorService) { + var $http: ng.IHttpService; //initialized later because of circular dependency problem + function retry(config: ng.IRequestConfig, deferred: ng.IDeferred) { + $http = $http || $injector.get('$http'); + $http(config).then(function (response) { + deferred.resolve(response); + }); + } + function retryAll() { + for (var i = 0; i < buffer.length; ++i) { + retry(buffer[i].config, buffer[i].deferred); + } + buffer = []; + } + + return { + loginConfirmed: function () { + $rootScope.$broadcast('event:auth-loginConfirmed'); + retryAll(); + } + } + }] + }) + +/** + * $http interceptor. + * On 401 response - it stores the request and broadcasts 'event:angular-auth-loginRequired'. + */ + .config(['$httpProvider', 'authServiceProvider', function ($httpProvider: ng.IHttpProvider, authServiceProvider) { + + var interceptor = ['$rootScope', '$q', function ($rootScope: ng.IScope, $q: ng.IQService) { + function success(response: ng.IHttpPromiseCallbackArg) { + return response; + } + + function error(response: ng.IHttpPromiseCallbackArg) { + if (response.status === 401) { + var deferred = $q.defer(); + authServiceProvider.pushToBuffer(response.config, deferred); + $rootScope.$broadcast('event:auth-loginRequired'); + return deferred.promise; + } + // otherwise + return $q.reject(response); + } + + return function (promise: ng.IHttpPromise) { + return promise.then(success, error); + } + + }]; + $httpProvider.responseInterceptors.push(interceptor); + }]); + + +module HttpAndRegularPromiseTests { + interface Person { + firstName: string; + lastName: string; + } + + interface ExpectedResponse extends Person { } + + interface SomeControllerScope extends ng.IScope { + person: Person; + theAnswer: number; + letters: string[]; + } + + var someController: Function = ($scope: SomeControllerScope, $http: ng.IHttpService, $q: ng.IQService) => { + $http.get("http://somewhere/some/resource") + .success((data: ExpectedResponse) => { + $scope.person = data; + }); + + $http.get("http://somewhere/some/resource") + .then((response: ng.IHttpPromiseCallbackArg) => { + // typing lost, so something like + // var i: number = response.data + // would type check + $scope.person = response.data; + }); + + $http.get("http://somewhere/some/resource") + .then((response: ng.IHttpPromiseCallbackArg) => { + // typing lost, so something like + // var i: number = response.data + // would NOT type check + $scope.person = response.data; + }); + + var aPromise: ng.IPromise = $q.when({ firstName: "Jack", lastName: "Sparrow" }); + aPromise.then((person: Person) => { + $scope.person = person; + }); + + var bPromise: ng.IPromise = $q.when(42); + bPromise.then((answer: number) => { + $scope.theAnswer = answer; + }); + + var cPromise: ng.IPromise = $q.when(["a", "b", "c"]); + cPromise.then((letters: string[]) => { + $scope.letters = letters; + }); + } + + // Test that we can pass around a type-checked success/error Promise Callback + var anotherController: Function = ($scope: SomeControllerScope, $http: + ng.IHttpService, $q: ng.IQService) => { + + var buildFooData: Function = () => 42; + + var doFoo: Function = (callback: ng.IHttpPromiseCallback) => { + $http.get('/foo', buildFooData()) + .success(callback); + } + + doFoo((data) => console.log(data)); + } +} + +// Test for AngularJS Syntax + +module My.Namespace { + export var x; // need to export something for module to kick in +} + +// IModule Registering Test +var mod = angular.module('tests', []); +mod.controller('name', function ($scope: ng.IScope) { }) +mod.controller('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.controller(My.Namespace); +mod.directive('name', function ($scope: ng.IScope) { }) +mod.directive('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.directive(My.Namespace); +mod.factory('name', function ($scope: ng.IScope) { }) +mod.factory('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.factory(My.Namespace); +mod.filter('name', function ($scope: ng.IScope) { }) +mod.filter('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.filter(My.Namespace); +mod.provider('name', function ($scope: ng.IScope) { }) +mod.provider('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.provider(My.Namespace); +mod.service('name', function ($scope: ng.IScope) { }) +mod.service('name', ['$scope', function ($scope: ng.IScope) { }]) +mod.service(My.Namespace); +mod.constant('name', 23); +mod.constant('name', "23"); +mod.constant(My.Namespace); +mod.value('name', 23); +mod.value('name', "23"); +mod.value(My.Namespace); + +// Promise signature tests +var foo: ng.IPromise; +foo.then((x) => { + // x is inferred to be a number + return "asdf"; +}).then((x) => { + // x is inferred to be string + x.length; + return 123; +}).then((x) => { + // x is infered to be a number + x.toFixed(); + return; +}).then((x) => { + // x is infered to be void + // Typescript will prevent you to actually use x as a local variable + // Try object: + return { a: 123 }; +}).then((x) => { + // Object is inferred here + x.a = 123; + //Try a promise + var y: ng.IPromise; + return y; +}).then((x) => { + // x is infered to be a number, which is the resolved value of a promise + x.toFixed(); +}); + + +// angular.element() tests +var element = angular.element("div.myApp"); +var scope: ng.IScope = element.scope(); + + diff --git a/angularjs/angular-1.0.d.ts b/angularjs/angular-1.0.d.ts new file mode 100755 index 0000000000..ce996c4e7a --- /dev/null +++ b/angularjs/angular-1.0.d.ts @@ -0,0 +1,760 @@ +// Type definitions for Angular JS 1.2 +// Project: http://angularjs.org +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +/// + +declare var angular: ng.IAngularStatic; + +// Support for painless dependency injection +interface Function { + $inject:string[]; +} + +/////////////////////////////////////////////////////////////////////////////// +// ng module (angular.js) +/////////////////////////////////////////////////////////////////////////////// +declare module ng { + + // All service providers extend this interface + interface IServiceProvider { + $get(): any; + } + + /////////////////////////////////////////////////////////////////////////// + // AngularStatic + // see http://docs.angularjs.org/api + /////////////////////////////////////////////////////////////////////////// + interface IAngularStatic { + bind(context: any, fn: Function, ...args: any[]): Function; + bootstrap(element: string, modules?: any[]): auto.IInjectorService; + bootstrap(element: JQuery, modules?: any[]): auto.IInjectorService; + bootstrap(element: Element, modules?: any[]): auto.IInjectorService; + bootstrap(element: Document, modules?: any[]): auto.IInjectorService; + copy(source: any, destination?: any): any; + element: IAugmentedJQueryStatic; + equals(value1: any, value2: any): boolean; + extend(destination: any, ...sources: any[]): any; + forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any; + fromJson(json: string): any; + identity(arg?: any): any; + injector(modules?: any[]): auto.IInjectorService; + isArray(value: any): boolean; + isDate(value: any): boolean; + isDefined(value: any): boolean; + isElement(value: any): boolean; + isFunction(value: any): boolean; + isNumber(value: any): boolean; + isObject(value: any): boolean; + isString(value: any): boolean; + isUndefined(value: any): boolean; + lowercase(str: string): string; + /** construct your angular application + official docs: Interface for configuring angular modules. + see: http://docs.angularjs.org/api/angular.Module + */ + module( + /** name of your module you want to create */ + name: string, + /** name of modules yours depends on */ + requires?: string[], + configFunction?: any): IModule; + noop(...args: any[]): void; + toJson(obj: any, pretty?: boolean): string; + uppercase(str: string): string; + version: { + full: string; + major: number; + minor: number; + dot: number; + codename: string; + }; + } + + /////////////////////////////////////////////////////////////////////////// + // Module + // see http://docs.angularjs.org/api/angular.Module + /////////////////////////////////////////////////////////////////////////// + interface IModule { + animation(name: string, animationFactory: Function): IModule; + animation(name: string, inlineAnnotadedFunction: any[]): IModule; + animation(object: Object): IModule; + /** configure existing services. + Use this method to register work which needs to be performed on module loading + */ + config(configFn: Function): IModule; + /** configure existing services. + Use this method to register work which needs to be performed on module loading + */ + config(inlineAnnotadedFunction: any[]): IModule; + constant(name: string, value: any): IModule; + constant(object: Object): IModule; + controller(name: string, controllerConstructor: Function): IModule; + controller(name: string, inlineAnnotadedConstructor: any[]): IModule; + controller(object : Object): IModule; + directive(name: string, directiveFactory: (...params:any[])=> IDirective): IModule; + directive(name: string, inlineAnnotadedFunction: any[]): IModule; + directive(object: Object): IModule; + factory(name: string, serviceFactoryFunction: Function): IModule; + factory(name: string, inlineAnnotadedFunction: any[]): IModule; + factory(object: Object): IModule; + filter(name: string, filterFactoryFunction: Function): IModule; + filter(name: string, inlineAnnotadedFunction: any[]): IModule; + filter(object: Object): IModule; + provider(name: string, serviceProviderConstructor: Function): IModule; + provider(name: string, inlineAnnotadedConstructor: any[]): IModule; + provider(object: Object): IModule; + run(initializationFunction: Function): IModule; + run(inlineAnnotadedFunction: any[]): IModule; + service(name: string, serviceConstructor: Function): IModule; + service(name: string, inlineAnnotadedConstructor: any[]): IModule; + service(object: Object): IModule; + value(name: string, value: any): IModule; + value(object: Object): IModule; + + // Properties + name: string; + requires: string[]; + } + + /////////////////////////////////////////////////////////////////////////// + // Attributes + // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes + /////////////////////////////////////////////////////////////////////////// + interface IAttributes { + $set(name: string, value: any): void; + $observe(name: string, fn:(value?:any)=>any):void; + $attr: any; + } + + /////////////////////////////////////////////////////////////////////////// + // FormController + // see http://docs.angularjs.org/api/ng.directive:form.FormController + /////////////////////////////////////////////////////////////////////////// + interface IFormController { + $pristine: boolean; + $dirty: boolean; + $valid: boolean; + $invalid: boolean; + $error: any; + $setDirty(): void; + $setPristine(): void; + } + + /////////////////////////////////////////////////////////////////////////// + // NgModelController + // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController + /////////////////////////////////////////////////////////////////////////// + interface INgModelController { + $render(): void; + $setValidity(validationErrorKey: string, isValid: boolean): void; + $setViewValue(value: string): void; + + // XXX Not sure about the types here. Documentation states it's a string, but + // I've seen it receiving other types throughout the code. + // Falling back to any for now. + $viewValue: any; + + // XXX Same as avove + $modelValue: any; + + $parsers: IModelParser[]; + $formatters: IModelFormatter[]; + $error: any; + $pristine: boolean; + $dirty: boolean; + $valid: boolean; + $invalid: boolean; + } + + interface IModelParser { + (value: any): any; + } + + interface IModelFormatter { + (value: any): any; + } + + /////////////////////////////////////////////////////////////////////////// + // Scope + // see http://docs.angularjs.org/api/ng.$rootScope.Scope + /////////////////////////////////////////////////////////////////////////// + interface IScope { + $apply(): any; + $apply(exp: string): any; + $apply(exp: (scope: IScope) => any): any; + + $broadcast(name: string, ...args: any[]): IAngularEvent; + $destroy(): void; + $digest(): void; + $emit(name: string, ...args: any[]): IAngularEvent; + + // Documentation says exp is optional, but actual implementaton counts on it + $eval(expression: string): any; + $eval(expression: (scope: IScope) => any): any; + + // Documentation says exp is optional, but actual implementaton counts on it + $evalAsync(expression: string): void; + $evalAsync(expression: (scope: IScope) => any): void; + + // Defaults to false by the implementation checking strategy + $new(isolate?: boolean): IScope; + + $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function; + + $watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function; + $watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function; + $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function; + $watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: boolean): Function; + + $watchCollection(watchExpression: string, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function; + $watchCollection(watchExpression: (scope: IScope) => any, listener: (newValue: any, oldValue: any, scope: IScope) => any): Function; + + $parent: IScope; + + $id: number; + + // Hidden members + $$isolateBindings: any; + $$phase: any; + } + + interface IAngularEvent { + targetScope: IScope; + currentScope: IScope; + name: string; + preventDefault: Function; + defaultPrevented: boolean; + + // Available only events that were $emit-ted + stopPropagation?: Function; + } + + /////////////////////////////////////////////////////////////////////////// + // WindowService + // see http://docs.angularjs.org/api/ng.$window + /////////////////////////////////////////////////////////////////////////// + interface IWindowService extends Window {} + + /////////////////////////////////////////////////////////////////////////// + // BrowserService + // TODO undocumented, so we need to get it from the source code + /////////////////////////////////////////////////////////////////////////// + interface IBrowserService {} + + /////////////////////////////////////////////////////////////////////////// + // TimeoutService + // see http://docs.angularjs.org/api/ng.$timeout + /////////////////////////////////////////////////////////////////////////// + interface ITimeoutService { + (func: Function, delay?: number, invokeApply?: boolean): IPromise; + cancel(promise: IPromise): boolean; + } + + /////////////////////////////////////////////////////////////////////////// + // FilterService + // see http://docs.angularjs.org/api/ng.$filter + // see http://docs.angularjs.org/api/ng.$filterProvider + /////////////////////////////////////////////////////////////////////////// + interface IFilterService { + (name: string): Function; + } + + interface IFilterProvider extends IServiceProvider { + register(name: string, filterFactory: Function): IServiceProvider; + } + + /////////////////////////////////////////////////////////////////////////// + // LocaleService + // see http://docs.angularjs.org/api/ng.$locale + /////////////////////////////////////////////////////////////////////////// + interface ILocaleService { + id: string; + + // These are not documented + // Check angular's i18n files for exemples + NUMBER_FORMATS: ILocaleNumberFormatDescriptor; + DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor; + pluralCat: (num: any) => string; + } + + interface ILocaleNumberFormatDescriptor { + DECIMAL_SEP: string; + GROUP_SEP: string; + PATTERNS: ILocaleNumberPatternDescriptor[]; + CURRENCY_SYM: string; + } + + interface ILocaleNumberPatternDescriptor { + minInt: number; + minFrac: number; + maxFrac: number; + posPre: string; + posSuf: string; + negPre: string; + negSuf: string; + gSize: number; + lgSize: number; + } + + interface ILocaleDateTimeFormatDescriptor { + MONTH: string[]; + SHORTMONTH: string[]; + DAY: string[]; + SHORTDAY: string[]; + AMPMS: string[]; + medium: string; + short: string; + fullDate: string; + longDate: string; + mediumDate: string; + shortDate: string; + mediumTime: string; + shortTime: string; + } + + /////////////////////////////////////////////////////////////////////////// + // LogService + // see http://docs.angularjs.org/api/ng.$log + /////////////////////////////////////////////////////////////////////////// + interface ILogService { + debug: ILogCall; + error: ILogCall; + info: ILogCall; + log: ILogCall; + warn: ILogCall; + } + + // We define this as separete interface so we can reopen it later for + // the ngMock module. + interface ILogCall { + (...args: any[]): void; + } + + /////////////////////////////////////////////////////////////////////////// + // ParseService + // see http://docs.angularjs.org/api/ng.$parse + /////////////////////////////////////////////////////////////////////////// + interface IParseService { + (expression: string): ICompiledExpression; + } + + interface ICompiledExpression { + (context: any, locals?: any): any; + + // If value is not provided, undefined is gonna be used since the implementation + // does not check the parameter. Let's force a value for consistency. If consumer + // whants to undefine it, pass the undefined value explicitly. + assign(context: any, value: any): any; + } + + /////////////////////////////////////////////////////////////////////////// + // LocationService + // see http://docs.angularjs.org/api/ng.$location + // see http://docs.angularjs.org/api/ng.$locationProvider + // see http://docs.angularjs.org/guide/dev_guide.services.$location + /////////////////////////////////////////////////////////////////////////// + interface ILocationService { + absUrl(): string; + hash(): string; + hash(newHash: string): ILocationService; + host(): string; + path(): string; + path(newPath: string): ILocationService; + port(): number; + protocol(): string; + replace(): ILocationService; + search(): any; + search(parametersMap: any): ILocationService; + search(parameter: string, parameterValue: any): ILocationService; + url(): string; + url(url: string): ILocationService; + } + + interface ILocationProvider extends IServiceProvider { + hashPrefix(): string; + hashPrefix(prefix: string): ILocationProvider; + html5Mode(): boolean; + + // Documentation states that parameter is string, but + // implementation tests it as boolean, which makes more sense + // since this is a toggler + html5Mode(active: boolean): ILocationProvider; + } + + /////////////////////////////////////////////////////////////////////////// + // DocumentService + // see http://docs.angularjs.org/api/ng.$document + /////////////////////////////////////////////////////////////////////////// + interface IDocumentService extends Document {} + + /////////////////////////////////////////////////////////////////////////// + // ExceptionHandlerService + // see http://docs.angularjs.org/api/ng.$exceptionHandler + /////////////////////////////////////////////////////////////////////////// + interface IExceptionHandlerService { + (exception: Error, cause?: string): void; + } + + /////////////////////////////////////////////////////////////////////////// + // RootElementService + // see http://docs.angularjs.org/api/ng.$rootElement + /////////////////////////////////////////////////////////////////////////// + interface IRootElementService extends JQuery {} + + /////////////////////////////////////////////////////////////////////////// + // QService + // see http://docs.angularjs.org/api/ng.$q + /////////////////////////////////////////////////////////////////////////// + interface IQService { + all(promises: IPromise[]): IPromise; + defer(): IDeferred; + reject(reason?: any): IPromise; + when(value: T): IPromise; + } + + interface IPromise { + then(successCallback: (promiseValue: T) => IHttpPromise, errorCallback?: (reason: any) => any): IPromise; + then(successCallback: (promiseValue: T) => IPromise, errorCallback?: (reason: any) => any): IPromise; + then(successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult): IPromise; + } + + interface IDeferred { + resolve(value?: T): void; + reject(reason?: any): void; + promise: IPromise; + } + + /////////////////////////////////////////////////////////////////////////// + // AnchorScrollService + // see http://docs.angularjs.org/api/ng.$anchorScroll + /////////////////////////////////////////////////////////////////////////// + interface IAnchorScrollService { + (): void; + } + + interface IAnchorScrollProvider extends IServiceProvider { + disableAutoScrolling(): void; + } + + /////////////////////////////////////////////////////////////////////////// + // CacheFactoryService + // see http://docs.angularjs.org/api/ng.$cacheFactory + /////////////////////////////////////////////////////////////////////////// + interface ICacheFactoryService { + // Lets not foce the optionsMap to have the capacity member. Even though + // it's the ONLY option considered by the implementation today, a consumer + // might find it useful to associate some other options to the cache object. + //(cacheId: string, optionsMap?: { capacity: number; }): CacheObject; + (cacheId: string, optionsMap?: { capacity: number; }): ICacheObject; + + // Methods bellow are not documented + info(): any; + get (cacheId: string): ICacheObject; + } + + interface ICacheObject { + info(): { + id: string; + size: number; + + // Not garanteed to have, since it's a non-mandatory option + //capacity: number; + }; + put(key: string, value?: any): void; + get (key: string): any; + remove(key: string): void; + removeAll(): void; + destroy(): void; + } + + /////////////////////////////////////////////////////////////////////////// + // CompileService + // see http://docs.angularjs.org/api/ng.$compile + // see http://docs.angularjs.org/api/ng.$compileProvider + /////////////////////////////////////////////////////////////////////////// + interface ICompileService { + (element: string, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction; + (element: Element, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction; + (element: JQuery, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction; + } + + interface ICompileProvider extends IServiceProvider { + directive(name: string, directiveFactory: Function): ICompileProvider; + + // Undocumented, but it is there... + directive(directivesMap: any): ICompileProvider; + } + + interface ITemplateLinkingFunction { + // Let's hint but not force cloneAttachFn's signature + (scope: IScope, cloneAttachFn?: (clonedElement?: JQuery, scope?: IScope) => any): JQuery; + } + + /////////////////////////////////////////////////////////////////////////// + // ControllerService + // see http://docs.angularjs.org/api/ng.$controller + // see http://docs.angularjs.org/api/ng.$controllerProvider + /////////////////////////////////////////////////////////////////////////// + interface IControllerService { + // Although the documentation doesn't state this, locals are optional + (controllerConstructor: Function, locals?: any): any; + (controllerName: string, locals?: any): any; + } + + interface IControllerProvider extends IServiceProvider { + register(name: string, controllerConstructor: Function): void; + register(name: string, dependencyAnnotadedConstructor: any[]): void; + } + + /////////////////////////////////////////////////////////////////////////// + // HttpService + // see http://docs.angularjs.org/api/ng.$http + /////////////////////////////////////////////////////////////////////////// + interface IHttpService { + // At least moethod and url must be provided... + (config: IRequestConfig): IHttpPromise; + get (url: string, RequestConfig?: any): IHttpPromise; + delete (url: string, RequestConfig?: any): IHttpPromise; + head(url: string, RequestConfig?: any): IHttpPromise; + jsonp(url: string, RequestConfig?: any): IHttpPromise; + post(url: string, data: any, RequestConfig?: any): IHttpPromise; + put(url: string, data: any, RequestConfig?: any): IHttpPromise; + defaults: IRequestConfig; + + // For debugging, BUT it is documented as public, so... + pendingRequests: any[]; + } + + // This is just for hinting. + // Some opetions might not be available depending on the request. + // see http://docs.angularjs.org/api/ng.$http#Usage for options explanations + interface IRequestConfig { + method: string; + url: string; + params?: any; + + // XXX it has it's own structure... perhaps we should define it in the future + headers?: any; + + cache?: any; + timeout?: number; + withCredentials?: boolean; + + // These accept multiple types, so let's defile them as any + data?: any; + transformRequest?: any; + transformResponse?: any; + } + + interface IHttpPromiseCallback { + (data: T, status: number, headers: (headerName: string) => string, config: IRequestConfig): void; + } + + interface IHttpPromiseCallbackArg { + data?: T; + status?: number; + headers?: (headerName: string) => string; + config?: IRequestConfig; + } + + interface IHttpPromise extends IPromise { + success(callback: IHttpPromiseCallback): IHttpPromise; + error(callback: IHttpPromiseCallback): IHttpPromise; + then(successCallback: (response: IHttpPromiseCallbackArg) => TResult, errorCallback?: (response: IHttpPromiseCallbackArg) => any): IPromise; + then(successCallback: (response: IHttpPromiseCallbackArg) => IPromise, errorCallback?: (response: IHttpPromiseCallbackArg) => any): IPromise; + } + + interface IHttpProvider extends IServiceProvider { + defaults: IRequestConfig; + interceptors: any[]; + responseInterceptors: any[]; + } + + /////////////////////////////////////////////////////////////////////////// + // HttpBackendService + // see http://docs.angularjs.org/api/ng.$httpBackend + // You should never need to use this service directly. + /////////////////////////////////////////////////////////////////////////// + interface IHttpBackendService { + // XXX Perhaps define callback signature in the future + (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void; + } + + /////////////////////////////////////////////////////////////////////////// + // InterpolateService + // see http://docs.angularjs.org/api/ng.$interpolate + // see http://docs.angularjs.org/api/ng.$interpolateProvider + /////////////////////////////////////////////////////////////////////////// + interface IInterpolateService { + (text: string, mustHaveExpression?: boolean): IInterpolationFunction; + endSymbol(): string; + startSymbol(): string; + } + + interface IInterpolationFunction { + (context: any): string; + } + + interface IInterpolateProvider extends IServiceProvider { + startSymbol(): string; + startSymbol(value: string): IInterpolateProvider; + endSymbol(): string; + endSymbol(value: string): IInterpolateProvider; + } + + /////////////////////////////////////////////////////////////////////////// + // RouteParamsService + // see http://docs.angularjs.org/api/ng.$routeParams + /////////////////////////////////////////////////////////////////////////// + interface IRouteParamsService {} + + /////////////////////////////////////////////////////////////////////////// + // TemplateCacheService + // see http://docs.angularjs.org/api/ng.$templateCache + /////////////////////////////////////////////////////////////////////////// + interface ITemplateCacheService extends ICacheObject {} + + /////////////////////////////////////////////////////////////////////////// + // RootScopeService + // see http://docs.angularjs.org/api/ng.$rootScope + /////////////////////////////////////////////////////////////////////////// + interface IRootScopeService extends IScope {} + + /////////////////////////////////////////////////////////////////////////// + // RouteService + // see http://docs.angularjs.org/api/ng.$route + // see http://docs.angularjs.org/api/ng.$routeProvider + /////////////////////////////////////////////////////////////////////////// + interface IRouteService { + reload(): void; + routes: any; + + // May not always be available. For instance, current will not be available + // to a controller that was not initialized as a result of a route maching. + current?: ICurrentRoute; + } + + // see http://docs.angularjs.org/api/ng.$routeProvider#when for options explanations + interface IRoute { + controller?: any; + name?: string; + template?: string; + templateUrl?: any; + resolve?: any; + redirectTo?: any; + reloadOnSearch?: boolean; + } + + // see http://docs.angularjs.org/api/ng.$route#current + interface ICurrentRoute extends IRoute { + locals: { + $scope: IScope; + $template: string; + }; + + params: any; + } + + interface IRouteProvider extends IServiceProvider { + otherwise(params: any): IRouteProvider; + when(path: string, route: IRoute): IRouteProvider; + } + + /////////////////////////////////////////////////////////////////////////// + // Directive + // see http://docs.angularjs.org/api/ng.$compileProvider#directive + // and http://docs.angularjs.org/guide/directive + /////////////////////////////////////////////////////////////////////////// + + interface IDirective{ + priority?: number; + template?: string; + templateUrl?: string; + replace?: boolean; + transclude?: any; + restrict?: string; + scope?: any; + link?: Function; + compile?: Function; + controller?: Function; + } + + /////////////////////////////////////////////////////////////////////////// + // angular.element + // when calling angular.element, angular returns a jQuery object, + // augmented with additional methods like e.g. scope. + // see: http://docs.angularjs.org/api/angular.element + /////////////////////////////////////////////////////////////////////////// + interface IAugmentedJQueryStatic extends JQueryStatic { + (selector: string, context?: any): IAugmentedJQuery; + (element: Element): IAugmentedJQuery; + (object: {}): IAugmentedJQuery; + (elementArray: Element[]): IAugmentedJQuery; + (object: JQuery): IAugmentedJQuery; + (func: Function): IAugmentedJQuery; + (array: any[]): IAugmentedJQuery; + (): IAugmentedJQuery; + } + + interface IAugmentedJQuery extends JQuery { + // TODO: events, how to define? + //$destroy + + find(selector: string): IAugmentedJQuery; + find(element: any): IAugmentedJQuery; + find(obj: JQuery): IAugmentedJQuery; + + controller(name: string): any; + injector(): any; + scope(): IScope; + + inheritedData(key: string, value: any): JQuery; + inheritedData(obj: { [key: string]: any; }): JQuery; + inheritedData(key?: string): any; + + + } + + + /////////////////////////////////////////////////////////////////////////// + // AUTO module (angular.js) + /////////////////////////////////////////////////////////////////////////// + export module auto { + + /////////////////////////////////////////////////////////////////////// + // InjectorService + // see http://docs.angularjs.org/api/AUTO.$injector + /////////////////////////////////////////////////////////////////////// + interface IInjectorService { + annotate(fn: Function): string[]; + annotate(inlineAnnotadedFunction: any[]): string[]; + get (name: string): any; + instantiate(typeConstructor: Function, locals?: any): any; + invoke(func: Function, context?: any, locals?: any): any; + } + + /////////////////////////////////////////////////////////////////////// + // ProvideService + // see http://docs.angularjs.org/api/AUTO.$provide + /////////////////////////////////////////////////////////////////////// + interface IProvideService { + // Documentation says it returns the registered instance, but actual + // implementation does not return anything. + // constant(name: string, value: any): any; + constant(name: string, value: any): void; + + decorator(name: string, decorator: Function): void; + decorator(name: string, decoratorInline: any[]): void; + factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider; + provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider; + provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider; + service(name: string, constructor: Function): ng.IServiceProvider; + value(name: string, value: any): ng.IServiceProvider; + } + + } + +} diff --git a/angularjs/angular-cookies-1.0.d.ts b/angularjs/angular-cookies-1.0.d.ts new file mode 100644 index 0000000000..4dc2e038e1 --- /dev/null +++ b/angularjs/angular-cookies-1.0.d.ts @@ -0,0 +1,30 @@ +/// Type definitions for Angular JS 1.0 (ngCookies module) +// Project: http://angularjs.org +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +/// + +/////////////////////////////////////////////////////////////////////////////// +// ngCookies module (angular-cookies.js) +/////////////////////////////////////////////////////////////////////////////// +declare module ng.cookies { + + /////////////////////////////////////////////////////////////////////////// + // CookieService + // see http://docs.angularjs.org/api/ngCookies.$cookies + /////////////////////////////////////////////////////////////////////////// + interface ICookiesService {} + + /////////////////////////////////////////////////////////////////////////// + // CookieStoreService + // see http://docs.angularjs.org/api/ngCookies.$cookieStore + /////////////////////////////////////////////////////////////////////////// + interface ICookieStoreService { + get(key: string): any; + put(key: string, value: any): void; + remove(key: string): void; + } + +} diff --git a/angularjs/angular-cookies.d.ts b/angularjs/angular-cookies.d.ts index 4dc2e038e1..60eebbacb0 100644 --- a/angularjs/angular-cookies.d.ts +++ b/angularjs/angular-cookies.d.ts @@ -1,4 +1,4 @@ -/// Type definitions for Angular JS 1.0 (ngCookies module) +/// Type definitions for Angular JS 1.2 (ngCookies module) // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/angularjs/angular-mocks-1.0.d.ts b/angularjs/angular-mocks-1.0.d.ts new file mode 100644 index 0000000000..4d8decbf8b --- /dev/null +++ b/angularjs/angular-mocks-1.0.d.ts @@ -0,0 +1,150 @@ +// Type definitions for Angular JS 1.0 (ngMock, ngMockE2E module) +// Project: http://angularjs.org +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +/// + +/////////////////////////////////////////////////////////////////////////////// +// functions attached to global object (window) +/////////////////////////////////////////////////////////////////////////////// +declare var module: (...modules: any[]) => any; +declare var inject: (...fns: Function[]) => any; + +/////////////////////////////////////////////////////////////////////////////// +// ngMock module (angular-mocks.js) +/////////////////////////////////////////////////////////////////////////////// +declare module ng { + + /////////////////////////////////////////////////////////////////////////// + // AngularStatic + // We reopen it to add the MockStatic definition + /////////////////////////////////////////////////////////////////////////// + interface IAngularStatic { + mock: IMockStatic; + } + + interface IMockStatic { + // see http://docs.angularjs.org/api/angular.mock.debug + debug(obj: any): string; + + // see http://docs.angularjs.org/api/angular.mock.inject + inject(...fns: Function[]): any; + + // see http://docs.angularjs.org/api/angular.mock.module + module(...modules: any[]): any; + + // see http://docs.angularjs.org/api/angular.mock.TzDate + TzDate(offset: number, timestamp: number): Date; + TzDate(offset: number, timestamp: string): Date; + } + + /////////////////////////////////////////////////////////////////////////// + // ExceptionHandlerService + // see http://docs.angularjs.org/api/ngMock.$exceptionHandler + // see http://docs.angularjs.org/api/ngMock.$exceptionHandlerProvider + /////////////////////////////////////////////////////////////////////////// + interface IExceptionHandlerProvider extends IServiceProvider { + mode(mode: string): void; + } + + /////////////////////////////////////////////////////////////////////////// + // TimeoutService + // see http://docs.angularjs.org/api/ngMock.$timeout + // Augments the original service + /////////////////////////////////////////////////////////////////////////// + interface ITimeoutService { + flush(): void; + } + + /////////////////////////////////////////////////////////////////////////// + // LogService + // see http://docs.angularjs.org/api/ngMock.$log + // Augments the original service + /////////////////////////////////////////////////////////////////////////// + interface ILogService { + assertEmpty(): void; + reset(): void; + } + + interface LogCall { + logs: string[]; + } + + /////////////////////////////////////////////////////////////////////////// + // HttpBackendService + // see http://docs.angularjs.org/api/ngMock.$httpBackend + /////////////////////////////////////////////////////////////////////////// + interface IHttpBackendService { + flush(count?: number): void; + resetExpectations(): void; + verifyNoOutstandingExpectation(): void; + verifyNoOutstandingRequest(): void; + + expect(method: string, url: string, data?: any, headers?: any): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + expect(method: RegExp, url: string, data?: any, headers?: any): mock.IRequestHandler; + expect(method: RegExp, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + + when(method: string, url: string, data?: string, headers?: any): mock.IRequestHandler; + when(method: string, url: RegExp, data?: string, headers?: any): mock.IRequestHandler; + when(method: string, url: string, data?: RegExp, headers?: any): mock.IRequestHandler; + when(method: string, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + when(method: RegExp, url: string, data?: string, headers?: any): mock.IRequestHandler; + when(method: RegExp, url: RegExp, data?: string, headers?: any): mock.IRequestHandler; + when(method: RegExp, url: string, data?: RegExp, headers?: any): mock.IRequestHandler; + when(method: RegExp, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + + expectDELETE(url: string, headers?: any): mock.IRequestHandler; + expectDELETE(url: RegExp, headers?: any): mock.IRequestHandler; + expectGET(url: string, headers?: any): mock.IRequestHandler; + expectGET(url: RegExp, headers?: any): mock.IRequestHandler; + expectHEAD(url: string, headers?: any): mock.IRequestHandler; + expectHEAD(url: RegExp, headers?: any): mock.IRequestHandler; + expectJSONP(url: string): mock.IRequestHandler; + expectJSONP(url: RegExp): mock.IRequestHandler; + expectPATCH(url: string, data?: any, headers?: any): mock.IRequestHandler; + expectPATCH(url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + expectPOST(url: string, data?: any, headers?: any): mock.IRequestHandler; + expectPOST(url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + expectPUT(url: string, data?: any, headers?: any): mock.IRequestHandler; + expectPUT(url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + + whenDELETE(url: string, headers?: any): mock.IRequestHandler; + whenDELETE(url: RegExp, headers?: any): mock.IRequestHandler; + whenGET(url: string, headers?: any): mock.IRequestHandler; + whenGET(url: RegExp, headers?: any): mock.IRequestHandler; + whenHEAD(url: string, headers?: any): mock.IRequestHandler; + whenHEAD(url: RegExp, headers?: any): mock.IRequestHandler; + whenJSONP(url: string): mock.IRequestHandler; + whenJSONP(url: RegExp): mock.IRequestHandler; + whenPATCH(url: string, data?: string, headers?: any): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; + whenPATCH(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + whenPOST(url: string, data?: string, headers?: any): mock.IRequestHandler; + whenPOST(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; + whenPOST(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; + whenPOST(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + whenPUT(url: string, data?: string, headers?: any): mock.IRequestHandler; + whenPUT(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; + whenPUT(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; + whenPUT(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + } + + export module mock { + + // returned interface by the the mocked HttpBackendService expect/when methods + interface IRequestHandler { + respond(func: Function): void; + respond(status: number, data?: any, headers?: any): void; + respond(data: any, headers?: any): void; + + // Available wehn ngMockE2E is loaded + passThrough(): void; + } + + } + +} diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index c31b5b8116..16048a976d 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.2.0 (ngMock, ngMockE2E module) +// Type definitions for Angular JS 1.2 (ngMock, ngMockE2E module) // Project: http://angularjs.org // Definitions: https://github.com/daptiv/DefinitelyTyped @@ -30,7 +30,7 @@ declare module ng { // see http://docs.angularjs.org/api/angular.mock.inject inject(...fns: Function[]): any; - + // see http://docs.angularjs.org/api/angular.mock.module module(...modules: string[]): any; module(...modules: Function[]): any; @@ -86,8 +86,8 @@ declare module ng { expect(method: string, url: string, data?: any, headers?: any): mock.IRequestHandler; expect(method: string, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; expect(method: RegExp, url: string, data?: any, headers?: any): mock.IRequestHandler; - expect(method: RegExp, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; - + expect(method: RegExp, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + when(method: string, url: string, data?: string, headers?: any): mock.IRequestHandler; when(method: string, url: RegExp, data?: string, headers?: any): mock.IRequestHandler; when(method: string, url: string, data?: RegExp, headers?: any): mock.IRequestHandler; @@ -95,8 +95,8 @@ declare module ng { when(method: RegExp, url: string, data?: string, headers?: any): mock.IRequestHandler; when(method: RegExp, url: RegExp, data?: string, headers?: any): mock.IRequestHandler; when(method: RegExp, url: string, data?: RegExp, headers?: any): mock.IRequestHandler; - when(method: RegExp, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; - + when(method: RegExp, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + expectDELETE(url: string, headers?: any): mock.IRequestHandler; expectDELETE(url: RegExp, headers?: any): mock.IRequestHandler; expectGET(url: string, headers?: any): mock.IRequestHandler; @@ -132,13 +132,13 @@ declare module ng { whenPUT(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; whenPUT(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; whenPUT(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; - } + } export module mock { - + // returned interface by the the mocked HttpBackendService expect/when methods interface IRequestHandler { - respond(func: Function): void; + respond(func: Function): void; respond(status: number, data?: any, headers?: any): void; respond(data: any, headers?: any): void; @@ -146,6 +146,6 @@ declare module ng { passThrough(): void; } - } + } } diff --git a/angularjs/angular-resource-1.0.d.ts b/angularjs/angular-resource-1.0.d.ts new file mode 100644 index 0000000000..c66bb341d1 --- /dev/null +++ b/angularjs/angular-resource-1.0.d.ts @@ -0,0 +1,82 @@ +// Type definitions for Angular JS 1.0 (ngResource module) +// Project: http://angularjs.org +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + + +/////////////////////////////////////////////////////////////////////////////// +// ngResource module (angular-resource.js) +/////////////////////////////////////////////////////////////////////////////// +declare module ng.resource { + + /////////////////////////////////////////////////////////////////////////// + // ResourceService + // see http://docs.angularjs.org/api/ngResource.$resource + // Most part of the following definitions were achieved by analyzing the + // actual implementation, since the documentation doesn't seem to cover + // that deeply. + /////////////////////////////////////////////////////////////////////////// + interface IResourceService { + (url: string, paramDefaults?: any, + /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } + where deleteDescriptor : IActionDescriptor */ + actionDescriptors?: any): IResourceClass; + } + + // Just a reference to facilitate describing new actions + interface IActionDescriptor { + method: string; + isArray?: boolean; + params?: any; + headers?: any; + } + + // Baseclass for everyresource with default actions. + // If you define your new actions for the resource, you will need + // to extend this interface and typecast the ResourceClass to it. + interface IResourceClass { + get: IActionCall; + save: IActionCall; + query: IActionCall; + remove: IActionCall; + delete: IActionCall; + } + + // In case of passing the first argument as anything but a function, + // it's gonna be considered data if the action method is POST, PUT or + // PATCH (in other words, methods with body). Otherwise, it's going + // to be considered as parameters to the request. + interface IActionCall { + (): IResource; + (dataOrParams: any): IResource; + (dataOrParams: any, success: Function): IResource; + (success: Function, error?: Function): IResource; + (params: any, data: any, success?: Function, error?: Function): IResource; + } + + interface IResource { + $save: IActionCall; + $remove: IActionCall; + $delete: IActionCall; + + // No documented, but they are there, just as any custom action will be + $query: IActionCall; + $get: IActionCall; + } + + /** when creating a resource factory via IModule.factory */ + interface IResourceServiceFactoryFunction { + ($resource: ng.resource.IResourceService): ng.resource.IResourceClass; + } +} + +/** extensions to base ng based on using angular-resource */ +declare module ng { + + interface IModule { + /** creating a resource service factory */ + factory(name: string, resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction): IModule; + } +} diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index c66bb341d1..4589788d1c 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.0 (ngResource module) +// Type definitions for Angular JS 1.2 (ngResource module) // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -20,7 +20,7 @@ declare module ng.resource { /////////////////////////////////////////////////////////////////////////// interface IResourceService { (url: string, paramDefaults?: any, - /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } + /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } where deleteDescriptor : IActionDescriptor */ actionDescriptors?: any): IResourceClass; } diff --git a/angularjs/angular-route-tests.ts b/angularjs/angular-route-tests.ts new file mode 100644 index 0000000000..20ddccbaa6 --- /dev/null +++ b/angularjs/angular-route-tests.ts @@ -0,0 +1,14 @@ +/// + +/** + * @license HTTP Auth Interceptor Module for AngularJS + * (c) 2013 Jonathan Park @ Daptiv Solutions Inc + * License: MIT + */ + +declare var $routProvider: ng.route.IRouteProvider; +$routeProvider + .when('/projects/:projectId/dashboard',{ + controller: '' + }) + .otherwise({redirectTo: '/'}); diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts new file mode 100644 index 0000000000..224adcba75 --- /dev/null +++ b/angularjs/angular-route.d.ts @@ -0,0 +1,63 @@ +// Type definitions for Angular JS 1.2 (ngRoute module) +// Project: http://angularjs.org +// Definitions by: Jonathan Park +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + + +/////////////////////////////////////////////////////////////////////////////// +// ngRoute module (angular-route.js) +/////////////////////////////////////////////////////////////////////////////// +declare module ng.route { + + /////////////////////////////////////////////////////////////////////////// + // RouteParamsService + // see http://docs.angularjs.org/api/ngRoute.$routeParams + /////////////////////////////////////////////////////////////////////////// + interface IRouteParamsService {} + + /////////////////////////////////////////////////////////////////////////// + // RouteService + // see http://docs.angularjs.org/api/ngRoute.$route + // see http://docs.angularjs.org/api/ngRoute.$routeProvider + /////////////////////////////////////////////////////////////////////////// + interface IRouteService { + reload(): void; + routes: any; + + // May not always be available. For instance, current will not be available + // to a controller that was not initialized as a result of a route maching. + current?: ICurrentRoute; + } + + // see http://docs.angularjs.org/api/ngRoute.$routeProvider#when for options explanations + interface IRoute { + controller?: any; + name?: string; + template?: string; + templateUrl?: any; + resolve?: any; + redirectTo?: any; + reloadOnSearch?: boolean; + } + + // see http://docs.angularjs.org/api/ng.$route#current + interface ICurrentRoute extends IRoute { + locals: { + $scope: IScope; + $template: string; + }; + + params: any; + } + + interface IRouteProvider extends IServiceProvider { + otherwise(params: any): IRouteProvider; + /** + * This is a description + * + */ + when(path: string, route: IRoute): IRouteProvider; + } +} diff --git a/angularjs/angular-sanitize-1.0.d.ts b/angularjs/angular-sanitize-1.0.d.ts new file mode 100644 index 0000000000..56a3bc2aea --- /dev/null +++ b/angularjs/angular-sanitize-1.0.d.ts @@ -0,0 +1,22 @@ +// Type definitions for Angular JS 1.0 (ngSanitize module) +// Project: http://angularjs.org +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +/// + +/////////////////////////////////////////////////////////////////////////////// +// ngSanitize module (angular-sanitize.js) +/////////////////////////////////////////////////////////////////////////////// +declare module ng.sanitize { + + /////////////////////////////////////////////////////////////////////////// + // SanitizeService + // see http://docs.angularjs.org/api/ngSanitize.$sanitize + /////////////////////////////////////////////////////////////////////////// + interface ISanitizeService { + (html: string): string; + } + +} diff --git a/angularjs/angular-sanitize.d.ts b/angularjs/angular-sanitize.d.ts index 56a3bc2aea..43576ae3b5 100644 --- a/angularjs/angular-sanitize.d.ts +++ b/angularjs/angular-sanitize.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.0 (ngSanitize module) +// Type definitions for Angular JS 1.2 (ngSanitize module) // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/angularjs/angular-scenario-1.0.d.ts b/angularjs/angular-scenario-1.0.d.ts new file mode 100644 index 0000000000..8dd605f7d8 --- /dev/null +++ b/angularjs/angular-scenario-1.0.d.ts @@ -0,0 +1,155 @@ +// Type definitions for Angular Scenario Testing +// Project: [http://angularjs.org] +// Definitions by: [RomanoLindano] +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module angularScenario { + export interface AngularModel { + scenario: any; + } + + export interface RunFunction { + (functionToRun: any): any; + } + export interface RunFunctionWithDescription { + (description: string, functionToRun: any): any; + } + + export interface PauseFunction { + (): any; + } + + export interface SleepFunction { + (seconds: number): any; + } + + export interface Future { + } + + export interface testWindow { + href(): Future; + path(): Future; + search(): Future; + hash(): Future; + } + + export interface testLocation { + url(): Future; + path(): Future; + search(): Future; + hash(): Future; + } + + export interface Browser { + navigateTo(url: string): void; + navigateTo(urlDescription: string, urlFunction: () => string): void; + reload(): void; + window(): testWindow; + location(): testLocation; + } + + export interface Matchers { + toEqual(value: any): void; + toBe(value: any): void; + toBeDefined(): void; + toBeTruthy(): void; + toBeFalsy(): void; + toMatch(regularExpression: any): void; + toBeNull(): void; + toContain(value: any): void; + toBeLessThan(value: any): void; + toBeGreaterThan(value: any): void; + } + + export interface CustomMatchers extends Matchers{ + } + + export interface Expect extends CustomMatchers { + not(): angularScenario.CustomMatchers; + } + + export interface UsingFunction { + (selector: string, selectorDescription?: string): void; + } + + export interface BindingFunction { + (bracketBindingExpression: string): Future; + } + + export interface Input { + enter(value: any); + check(): any; + select(radioButtonValue: any): any; + val(): Future; + } + + export interface Repeater { + count(): Future; + row(index: number): Future; + column(ngBindingExpression: string): Future; + } + + export interface Select { + option(value: any): any; + option(...listOfValues: any[]): any; + } + + export interface Element { + count(): Future; + click(): any; + query(callback: (selectedDOMElements: any[], callbackWhenDone: (objNull: any, futureValue: any) => any) =>any): any; + val(): Future; + text(): Future; + html(): Future; + height(): Future; + innerHeight(): Future; + outerHeight(): Future; + width(): Future; + innerWidth(): Future; + outerWidth(): Future; + position(): Future; + scrollLeft(): Future; + scrollTop(): Future; + offset(): Future; + + val(value: any): void; + text(value: any): void; + html(value: any): void; + height(value: any): void; + innerHeight(value: any): void; + outerHeight(value: any): void; + width(value: any): void; + innerWidth(value: any): void; + outerWidth(value: any): void; + position(value: any): void; + scrollLeft(value: any): void; + scrollTop(value: any): void; + offset(value: any): void; + + attr(key: any): Future; + prop(key: any): Future; + css(key: any): Future; + + attr(key: any, value: any): void; + prop(key: any, value: any): void; + css(key: any, value: any): void; + } +} + +declare var describe: angularScenario.RunFunctionWithDescription; +declare var xdescribe: angularScenario.RunFunctionWithDescription; +declare var beforeEach: angularScenario.RunFunction; +declare var afterEach: angularScenario.RunFunction; +declare var it: angularScenario.RunFunctionWithDescription; +declare var xit: angularScenario.RunFunctionWithDescription; +declare var pause: angularScenario.PauseFunction; +declare var sleep: angularScenario.SleepFunction; +declare function browser(): angularScenario.Browser; +declare function expect(expectation: angularScenario.Future): angularScenario.Expect; +declare var using: angularScenario.UsingFunction; +declare var binding: angularScenario.BindingFunction; +declare function input(ngModelBinding: string): angularScenario.Input; +declare function repeater(selector: string, repeaterDescription?: string): angularScenario.Repeater; +declare function select(ngModelBinding: string): angularScenario.Select; +declare function element(selector: string, elementDescription?: string): angularScenario.Element; +declare var angular: angularScenario.AngularModel; diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 145696286b..f3f3e2cd2f 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -81,11 +81,11 @@ declare module ng { animation(name: string, animationFactory: Function): IModule; animation(name: string, inlineAnnotadedFunction: any[]): IModule; animation(object: Object): IModule; - /** configure existing services. + /** configure existing services. Use this method to register work which needs to be performed on module loading */ config(configFn: Function): IModule; - /** configure existing services. + /** configure existing services. Use this method to register work which needs to be performed on module loading */ config(inlineAnnotadedFunction: any[]): IModule; @@ -96,7 +96,7 @@ declare module ng { controller(object : Object): IModule; directive(name: string, directiveFactory: (...params:any[])=> IDirective): IModule; directive(name: string, inlineAnnotadedFunction: any[]): IModule; - directive(object: Object): IModule; + directive(object: Object): IModule; factory(name: string, serviceFactoryFunction: Function): IModule; factory(name: string, inlineAnnotadedFunction: any[]): IModule; factory(object: Object): IModule; @@ -212,7 +212,7 @@ declare module ng { $parent: IScope; $id: number; - + // Hidden members $$isolateBindings: any; $$phase: any; @@ -602,12 +602,6 @@ declare module ng { endSymbol(value: string): IInterpolateProvider; } - /////////////////////////////////////////////////////////////////////////// - // RouteParamsService - // see http://docs.angularjs.org/api/ng.$routeParams - /////////////////////////////////////////////////////////////////////////// - interface IRouteParamsService {} - /////////////////////////////////////////////////////////////////////////// // TemplateCacheService // see http://docs.angularjs.org/api/ng.$templateCache @@ -620,46 +614,6 @@ declare module ng { /////////////////////////////////////////////////////////////////////////// interface IRootScopeService extends IScope {} - /////////////////////////////////////////////////////////////////////////// - // RouteService - // see http://docs.angularjs.org/api/ng.$route - // see http://docs.angularjs.org/api/ng.$routeProvider - /////////////////////////////////////////////////////////////////////////// - interface IRouteService { - reload(): void; - routes: any; - - // May not always be available. For instance, current will not be available - // to a controller that was not initialized as a result of a route maching. - current?: ICurrentRoute; - } - - // see http://docs.angularjs.org/api/ng.$routeProvider#when for options explanations - interface IRoute { - controller?: any; - name?: string; - template?: string; - templateUrl?: any; - resolve?: any; - redirectTo?: any; - reloadOnSearch?: boolean; - } - - // see http://docs.angularjs.org/api/ng.$route#current - interface ICurrentRoute extends IRoute { - locals: { - $scope: IScope; - $template: string; - }; - - params: any; - } - - interface IRouteProvider extends IServiceProvider { - otherwise(params: any): IRouteProvider; - when(path: string, route: IRoute): IRouteProvider; - } - /////////////////////////////////////////////////////////////////////////// // Directive // see http://docs.angularjs.org/api/ng.$compileProvider#directive From e06a344578feb8b9adeb3b965c0bafe612cd70c3 Mon Sep 17 00:00:00 2001 From: John Emau Date: Mon, 14 Oct 2013 16:49:45 -0700 Subject: [PATCH 086/150] Merge branch 'update-angularjs' into removing-extraneous-for-daptiv-type-definitions Conflicts: angularjs/angular-mocks.d.ts --- angularjs/angular-mocks.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 16048a976d..edecc5bb9a 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -2,7 +2,6 @@ // Project: http://angularjs.org // Definitions: https://github.com/daptiv/DefinitelyTyped - /// /////////////////////////////////////////////////////////////////////////////// @@ -27,7 +26,7 @@ declare module ng { interface IMockStatic { // see http://docs.angularjs.org/api/angular.mock.dump dump(obj: any): string; - + // see http://docs.angularjs.org/api/angular.mock.inject inject(...fns: Function[]): any; From 1928fb24b332fe5dafda3a693ec651bdd3815725 Mon Sep 17 00:00:00 2001 From: John Emau Date: Mon, 14 Oct 2013 16:57:55 -0700 Subject: [PATCH 087/150] fixing angular-route-tests --- angularjs/angular-route-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular-route-tests.ts b/angularjs/angular-route-tests.ts index 20ddccbaa6..2ebe16a21e 100644 --- a/angularjs/angular-route-tests.ts +++ b/angularjs/angular-route-tests.ts @@ -6,7 +6,7 @@ * License: MIT */ -declare var $routProvider: ng.route.IRouteProvider; +declare var $routeProvider: ng.route.IRouteProvider; $routeProvider .when('/projects/:projectId/dashboard',{ controller: '' From bf2ed03d80b9260ef94d34f6c6210dd23cc2c09c Mon Sep 17 00:00:00 2001 From: Jared Reynolds Date: Tue, 15 Oct 2013 16:03:23 -0700 Subject: [PATCH 088/150] Added remainder of angular mocks 1.2 definitions --- angularjs/angular-mocks-tests.ts | 274 ++++++++++++++++++++++++++++++- angularjs/angular-mocks.d.ts | 157 +++++++++++++----- 2 files changed, 383 insertions(+), 48 deletions(-) diff --git a/angularjs/angular-mocks-tests.ts b/angularjs/angular-mocks-tests.ts index 3990809bb5..b43580f36c 100644 --- a/angularjs/angular-mocks-tests.ts +++ b/angularjs/angular-mocks-tests.ts @@ -1,6 +1,18 @@ /// -declare var mock: ng.IMockStatic; +/////////////////////////////////////// +// IAngularStatic +/////////////////////////////////////// +var angular: ng.IAngularStatic; +var mock: ng.IMockStatic; + +mock = angular.mock; + + +/////////////////////////////////////// +// IMockStatic +/////////////////////////////////////// +var date: Date; mock.dump({ key: 'value' }); @@ -16,5 +28,261 @@ mock.module( ); mock.module({ module1: function () { return 1; } }); -mock.TzDate(-7, '2013-1-1T15:00:00Z'); -mock.TzDate(-8, 12345678); +date = mock.TzDate(-7, '2013-1-1T15:00:00Z'); +date = mock.TzDate(-8, 12345678); + + +/////////////////////////////////////// +// IExceptionHandlerProvider +/////////////////////////////////////// +var exceptionHandlerProvider: ng.IExceptionHandlerProvider; + +exceptionHandlerProvider.mode('log'); + + +/////////////////////////////////////// +// IExceptionHandlerProvider +/////////////////////////////////////// +var timeoutService: ng.ITimeoutService; + +timeoutService.flush(); +timeoutService.flush(1234); +timeoutService.flushNext(); +timeoutService.flushNext(1234); +timeoutService.verifyNoPendingTasks(); + + +/////////////////////////////////////// +// ILogService, ILogCall +/////////////////////////////////////// +var logService: ng.ILogService; +var logCall: ng.ILogCall; +var logs: string[]; + +logService.assertEmpty(); +logService.reset(); + +logCall = logService.debug; +logCall = logService.error; +logCall = logService.info; +logCall = logService.log; +logCall = logService.warn; + +logs = logCall.logs; + + +/////////////////////////////////////// +// IHttpBackendService +/////////////////////////////////////// +var httpBackendService: ng.IHttpBackendService; +var requestHandler: ng.mock.IRequestHandler; + +httpBackendService.flush(); +httpBackendService.flush(1234); +httpBackendService.resetExpectations(); +httpBackendService.verifyNoOutstandingExpectation(); +httpBackendService.verifyNoOutstandingRequest(); + +requestHandler = httpBackendService.expect('GET', 'http://test.local'); +requestHandler = httpBackendService.expect('GET', 'http://test.local', 'response data'); +requestHandler = httpBackendService.expect('GET', 'http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', 'response data', function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', /response data/); +requestHandler = httpBackendService.expect('GET', 'http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', /response data/, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', function (data: string): boolean { return true; }, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', { key: 'value' }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.expect('GET', 'http://test.local', { key: 'value' }, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', /test.local/); +requestHandler = httpBackendService.expect('GET', /test.local/, 'response data'); +requestHandler = httpBackendService.expect('GET', /test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.expect('GET', /test.local/, 'response data', function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', /test.local/, /response data/); +requestHandler = httpBackendService.expect('GET', /test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.expect('GET', /test.local/, /response data/, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', /test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', /test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expect('GET', /test.local/, function (data: string): boolean { return true; }, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.expect('GET', /test.local/, { key: 'value' }); +requestHandler = httpBackendService.expect('GET', /test.local/, { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.expect('GET', /test.local/, { key: 'value' }, function (headers: Object): boolean { return true; }); + +requestHandler = httpBackendService.expectDELETE('http://test.local'); +requestHandler = httpBackendService.expectDELETE('http://test.local', { header: 'value' }); +requestHandler = httpBackendService.expectDELETE(/test.local/, { header: 'value' }); +requestHandler = httpBackendService.expectGET('http://test.local'); +requestHandler = httpBackendService.expectGET('http://test.local', { header: 'value' }); +requestHandler = httpBackendService.expectGET(/test.local/, { header: 'value' }); +requestHandler = httpBackendService.expectHEAD('http://test.local'); +requestHandler = httpBackendService.expectHEAD('http://test.local', { header: 'value' }); +requestHandler = httpBackendService.expectHEAD(/test.local/, { header: 'value' }); +requestHandler = httpBackendService.expectJSONP('http://test.local'); +requestHandler = httpBackendService.expectJSONP(/test.local/); + +requestHandler = httpBackendService.expectPATCH('http://test.local'); +requestHandler = httpBackendService.expectPATCH('http://test.local', 'response data'); +requestHandler = httpBackendService.expectPATCH('http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.expectPATCH('http://test.local', /response data/); +requestHandler = httpBackendService.expectPATCH('http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.expectPATCH('http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expectPATCH('http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expectPATCH('http://test.local', { key: 'value' }); +requestHandler = httpBackendService.expectPATCH('http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.expectPATCH(/test.local/); +requestHandler = httpBackendService.expectPATCH(/test.local/, 'response data'); +requestHandler = httpBackendService.expectPATCH(/test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.expectPATCH(/test.local/, /response data/); +requestHandler = httpBackendService.expectPATCH(/test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.expectPATCH(/test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expectPATCH(/test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expectPATCH(/test.local/, { key: 'value' }); +requestHandler = httpBackendService.expectPATCH(/test.local/, { key: 'value' }, { header: 'value' }); + +requestHandler = httpBackendService.expectPOST('http://test.local'); +requestHandler = httpBackendService.expectPOST('http://test.local', 'response data'); +requestHandler = httpBackendService.expectPOST('http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.expectPOST('http://test.local', /response data/); +requestHandler = httpBackendService.expectPOST('http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.expectPOST('http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expectPOST('http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expectPOST('http://test.local', { key: 'value' }); +requestHandler = httpBackendService.expectPOST('http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.expectPOST(/test.local/); +requestHandler = httpBackendService.expectPOST(/test.local/, 'response data'); +requestHandler = httpBackendService.expectPOST(/test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.expectPOST(/test.local/, /response data/); +requestHandler = httpBackendService.expectPOST(/test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.expectPOST(/test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expectPOST(/test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expectPOST(/test.local/, { key: 'value' }); +requestHandler = httpBackendService.expectPOST(/test.local/, { key: 'value' }, { header: 'value' }); + +requestHandler = httpBackendService.expectPUT('http://test.local'); +requestHandler = httpBackendService.expectPUT('http://test.local', 'response data'); +requestHandler = httpBackendService.expectPUT('http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.expectPUT('http://test.local', /response data/); +requestHandler = httpBackendService.expectPUT('http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.expectPUT('http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expectPUT('http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expectPUT('http://test.local', { key: 'value' }); +requestHandler = httpBackendService.expectPUT('http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.expectPUT(/test.local/); +requestHandler = httpBackendService.expectPUT(/test.local/, 'response data'); +requestHandler = httpBackendService.expectPUT(/test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.expectPUT(/test.local/, /response data/); +requestHandler = httpBackendService.expectPUT(/test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.expectPUT(/test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.expectPUT(/test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.expectPUT(/test.local/, { key: 'value' }); +requestHandler = httpBackendService.expectPUT(/test.local/, { key: 'value' }, { header: 'value' }); + +requestHandler = httpBackendService.when('GET', 'http://test.local'); +requestHandler = httpBackendService.when('GET', 'http://test.local', 'response data'); +requestHandler = httpBackendService.when('GET', 'http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.when('GET', 'http://test.local', 'response data', function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', 'http://test.local', /response data/); +requestHandler = httpBackendService.when('GET', 'http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.when('GET', 'http://test.local', /response data/, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', 'http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.when('GET', 'http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.when('GET', 'http://test.local', function (data: string): boolean { return true; }, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', 'http://test.local', { key: 'value' }); +requestHandler = httpBackendService.when('GET', 'http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.when('GET', 'http://test.local', { key: 'value' }, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', /test.local/); +requestHandler = httpBackendService.when('GET', /test.local/, 'response data'); +requestHandler = httpBackendService.when('GET', /test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.when('GET', /test.local/, 'response data', function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', /test.local/, /response data/); +requestHandler = httpBackendService.when('GET', /test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.when('GET', /test.local/, /response data/, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', /test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.when('GET', /test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.when('GET', /test.local/, function (data: string): boolean { return true; }, function (headers: Object): boolean { return true; }); +requestHandler = httpBackendService.when('GET', /test.local/, { key: 'value' }); +requestHandler = httpBackendService.when('GET', /test.local/, { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.when('GET', /test.local/, { key: 'value' }, function (headers: Object): boolean { return true; }); + +requestHandler = httpBackendService.whenDELETE('http://test.local'); +requestHandler = httpBackendService.whenDELETE('http://test.local', { header: 'value' }); +requestHandler = httpBackendService.whenDELETE(/test.local/, { header: 'value' }); +requestHandler = httpBackendService.whenGET('http://test.local'); +requestHandler = httpBackendService.whenGET('http://test.local', { header: 'value' }); +requestHandler = httpBackendService.whenGET(/test.local/, { header: 'value' }); +requestHandler = httpBackendService.whenHEAD('http://test.local'); +requestHandler = httpBackendService.whenHEAD('http://test.local', { header: 'value' }); +requestHandler = httpBackendService.whenHEAD(/test.local/, { header: 'value' }); +requestHandler = httpBackendService.whenJSONP('http://test.local'); +requestHandler = httpBackendService.whenJSONP(/test.local/); + +requestHandler = httpBackendService.whenPATCH('http://test.local'); +requestHandler = httpBackendService.whenPATCH('http://test.local', 'response data'); +requestHandler = httpBackendService.whenPATCH('http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.whenPATCH('http://test.local', /response data/); +requestHandler = httpBackendService.whenPATCH('http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.whenPATCH('http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.whenPATCH('http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.whenPATCH('http://test.local', { key: 'value' }); +requestHandler = httpBackendService.whenPATCH('http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.whenPATCH(/test.local/); +requestHandler = httpBackendService.whenPATCH(/test.local/, 'response data'); +requestHandler = httpBackendService.whenPATCH(/test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.whenPATCH(/test.local/, /response data/); +requestHandler = httpBackendService.whenPATCH(/test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.whenPATCH(/test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.whenPATCH(/test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.whenPATCH(/test.local/, { key: 'value' }); +requestHandler = httpBackendService.whenPATCH(/test.local/, { key: 'value' }, { header: 'value' }); + +requestHandler = httpBackendService.whenPOST('http://test.local'); +requestHandler = httpBackendService.whenPOST('http://test.local', 'response data'); +requestHandler = httpBackendService.whenPOST('http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.whenPOST('http://test.local', /response data/); +requestHandler = httpBackendService.whenPOST('http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.whenPOST('http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.whenPOST('http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.whenPOST('http://test.local', { key: 'value' }); +requestHandler = httpBackendService.whenPOST('http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.whenPOST(/test.local/); +requestHandler = httpBackendService.whenPOST(/test.local/, 'response data'); +requestHandler = httpBackendService.whenPOST(/test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.whenPOST(/test.local/, /response data/); +requestHandler = httpBackendService.whenPOST(/test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.whenPOST(/test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.whenPOST(/test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.whenPOST(/test.local/, { key: 'value' }); +requestHandler = httpBackendService.whenPOST(/test.local/, { key: 'value' }, { header: 'value' }); + +requestHandler = httpBackendService.whenPUT('http://test.local'); +requestHandler = httpBackendService.whenPUT('http://test.local', 'response data'); +requestHandler = httpBackendService.whenPUT('http://test.local', 'response data', { header: 'value' }); +requestHandler = httpBackendService.whenPUT('http://test.local', /response data/); +requestHandler = httpBackendService.whenPUT('http://test.local', /response data/, { header: 'value' }); +requestHandler = httpBackendService.whenPUT('http://test.local', function (data: string): boolean { return true; }); +requestHandler = httpBackendService.whenPUT('http://test.local', function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.whenPUT('http://test.local', { key: 'value' }); +requestHandler = httpBackendService.whenPUT('http://test.local', { key: 'value' }, { header: 'value' }); +requestHandler = httpBackendService.whenPUT(/test.local/); +requestHandler = httpBackendService.whenPUT(/test.local/, 'response data'); +requestHandler = httpBackendService.whenPUT(/test.local/, 'response data', { header: 'value' }); +requestHandler = httpBackendService.whenPUT(/test.local/, /response data/); +requestHandler = httpBackendService.whenPUT(/test.local/, /response data/, { header: 'value' }); +requestHandler = httpBackendService.whenPUT(/test.local/, function (data: string): boolean { return true; }); +requestHandler = httpBackendService.whenPUT(/test.local/, function (data: string): boolean { return true; }, { header: 'value' }); +requestHandler = httpBackendService.whenPUT(/test.local/, { key: 'value' }); +requestHandler = httpBackendService.whenPUT(/test.local/, { key: 'value' }, { header: 'value' }); + + +/////////////////////////////////////// +// IRequestHandler +/////////////////////////////////////// +requestHandler.passThrough(); +requestHandler.respond(function () { }); +requestHandler.respond({ key: 'value' }); +requestHandler.respond({ key: 'value' }, { header: 'value' }); +requestHandler.respond(404); +requestHandler.respond(404, { key: 'value' }); +requestHandler.respond(404, { key: 'value' }, { header: 'value' }); diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index edecc5bb9a..6c7c0c7f37 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -55,7 +55,9 @@ declare module ng { // Augments the original service /////////////////////////////////////////////////////////////////////////// interface ITimeoutService { - flush(): void; + flush(delay?: number): void; + flushNext(expectedDelay?: number): void; + verifyNoPendingTasks(): void; } /////////////////////////////////////////////////////////////////////////// @@ -68,7 +70,7 @@ declare module ng { reset(): void; } - interface LogCall { + interface ILogCall { logs: string[]; } @@ -82,55 +84,120 @@ declare module ng { verifyNoOutstandingExpectation(): void; verifyNoOutstandingRequest(): void; - expect(method: string, url: string, data?: any, headers?: any): mock.IRequestHandler; - expect(method: string, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; - expect(method: RegExp, url: string, data?: any, headers?: any): mock.IRequestHandler; - expect(method: RegExp, url: RegExp, data?: any, headers?: any): mock.IRequestHandler; + expect(method: string, url: string, data?: string, headers?: Object): mock.IRequestHandler; + expect(method: string, url: string, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + expect(method: string, url: string, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expect(method: string, url: string, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: Object, headers?: Object): mock.IRequestHandler; + expect(method: string, url: string, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; - when(method: string, url: string, data?: string, headers?: any): mock.IRequestHandler; - when(method: string, url: RegExp, data?: string, headers?: any): mock.IRequestHandler; - when(method: string, url: string, data?: RegExp, headers?: any): mock.IRequestHandler; - when(method: string, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; - when(method: RegExp, url: string, data?: string, headers?: any): mock.IRequestHandler; - when(method: RegExp, url: RegExp, data?: string, headers?: any): mock.IRequestHandler; - when(method: RegExp, url: string, data?: RegExp, headers?: any): mock.IRequestHandler; - when(method: RegExp, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; - - expectDELETE(url: string, headers?: any): mock.IRequestHandler; - expectDELETE(url: RegExp, headers?: any): mock.IRequestHandler; - expectGET(url: string, headers?: any): mock.IRequestHandler; - expectGET(url: RegExp, headers?: any): mock.IRequestHandler; - expectHEAD(url: string, headers?: any): mock.IRequestHandler; - expectHEAD(url: RegExp, headers?: any): mock.IRequestHandler; + expectDELETE(url: string, headers?: Object): mock.IRequestHandler; + expectDELETE(url: RegExp, headers?: Object): mock.IRequestHandler; + expectGET(url: string, headers?: Object): mock.IRequestHandler; + expectGET(url: RegExp, headers?: Object): mock.IRequestHandler; + expectHEAD(url: string, headers?: Object): mock.IRequestHandler; + expectHEAD(url: RegExp, headers?: Object): mock.IRequestHandler; expectJSONP(url: string): mock.IRequestHandler; expectJSONP(url: RegExp): mock.IRequestHandler; - expectPATCH(url: string, data?: any, headers?: any): mock.IRequestHandler; - expectPATCH(url: RegExp, data?: any, headers?: any): mock.IRequestHandler; - expectPOST(url: string, data?: any, headers?: any): mock.IRequestHandler; - expectPOST(url: RegExp, data?: any, headers?: any): mock.IRequestHandler; - expectPUT(url: string, data?: any, headers?: any): mock.IRequestHandler; - expectPUT(url: RegExp, data?: any, headers?: any): mock.IRequestHandler; - whenDELETE(url: string, headers?: any): mock.IRequestHandler; - whenDELETE(url: RegExp, headers?: any): mock.IRequestHandler; - whenGET(url: string, headers?: any): mock.IRequestHandler; - whenGET(url: RegExp, headers?: any): mock.IRequestHandler; - whenHEAD(url: string, headers?: any): mock.IRequestHandler; - whenHEAD(url: RegExp, headers?: any): mock.IRequestHandler; + expectPATCH(url: string, data?: string, headers?: Object): mock.IRequestHandler; + expectPATCH(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + expectPATCH(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPATCH(url: string, data?: Object, headers?: Object): mock.IRequestHandler; + expectPATCH(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + expectPATCH(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + expectPATCH(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPATCH(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + + expectPOST(url: string, data?: string, headers?: Object): mock.IRequestHandler; + expectPOST(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + expectPOST(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPOST(url: string, data?: Object, headers?: Object): mock.IRequestHandler; + expectPOST(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + expectPOST(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + expectPOST(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPOST(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + + expectPUT(url: string, data?: string, headers?: Object): mock.IRequestHandler; + expectPUT(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + expectPUT(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPUT(url: string, data?: Object, headers?: Object): mock.IRequestHandler; + expectPUT(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + expectPUT(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + expectPUT(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPUT(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + + when(method: string, url: string, data?: string, headers?: Object): mock.IRequestHandler; + when(method: string, url: string, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + when(method: string, url: string, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + when(method: string, url: string, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: Object, headers?: Object): mock.IRequestHandler; + when(method: string, url: string, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + when(method: string, url: RegExp, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + when(method: string, url: RegExp, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + when(method: string, url: RegExp, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + when(method: string, url: RegExp, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + + whenDELETE(url: string, headers?: Object): mock.IRequestHandler; + whenDELETE(url: string, headers?: (Object) => boolean): mock.IRequestHandler; + whenDELETE(url: RegExp, headers?: Object): mock.IRequestHandler; + whenDELETE(url: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + + whenGET(url: string, headers?: Object): mock.IRequestHandler; + whenGET(url: string, headers?: (Object) => boolean): mock.IRequestHandler; + whenGET(url: RegExp, headers?: Object): mock.IRequestHandler; + whenGET(url: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + + whenHEAD(url: string, headers?: Object): mock.IRequestHandler; + whenHEAD(url: string, headers?: (Object) => boolean): mock.IRequestHandler; + whenHEAD(url: RegExp, headers?: Object): mock.IRequestHandler; + whenHEAD(url: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + whenJSONP(url: string): mock.IRequestHandler; whenJSONP(url: RegExp): mock.IRequestHandler; - whenPATCH(url: string, data?: string, headers?: any): mock.IRequestHandler; - whenPATCH(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; - whenPATCH(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; - whenPATCH(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; - whenPOST(url: string, data?: string, headers?: any): mock.IRequestHandler; - whenPOST(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; - whenPOST(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; - whenPOST(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; - whenPUT(url: string, data?: string, headers?: any): mock.IRequestHandler; - whenPUT(url: RegExp, data?: string, headers?: any): mock.IRequestHandler; - whenPUT(url: string, data?: RegExp, headers?: any): mock.IRequestHandler; - whenPUT(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler; + + whenPATCH(url: string, data?: string, headers?: Object): mock.IRequestHandler; + whenPATCH(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + whenPATCH(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPATCH(url: string, data?: Object, headers?: Object): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + + whenPOST(url: string, data?: string, headers?: Object): mock.IRequestHandler; + whenPOST(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + whenPOST(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPOST(url: string, data?: Object, headers?: Object): mock.IRequestHandler; + whenPOST(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + whenPOST(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + whenPOST(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPOST(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; + + whenPUT(url: string, data?: string, headers?: Object): mock.IRequestHandler; + whenPUT(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; + whenPUT(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPUT(url: string, data?: Object, headers?: Object): mock.IRequestHandler; + whenPUT(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; + whenPUT(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; + whenPUT(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPUT(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; } export module mock { From 027c81a0b026301bdc5dad6b04d2f7cb9f410966 Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Tue, 15 Oct 2013 23:15:08 -0700 Subject: [PATCH 089/150] Add IAttributes members and comments --- angularjs/angular.d.ts | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index f3f3e2cd2f..c6279bdeea 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -124,9 +124,28 @@ declare module ng { // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes /////////////////////////////////////////////////////////////////////////// interface IAttributes { - $set(name: string, value: any): void; - $observe(name: string, fn:(value?:any)=>any):void; - $attr: any; + // Adds the CSS class value specified by the classVal parameter to the + // element. If animations are enabled then an animation will be triggered + // for the class addition. + $addClass(classVal: string): void; + + // Removes the CSS class value specified by the classVal parameter from the + // element. If animations are enabled then an animation will be triggered for + // the class removal. + $removeClass(classVal: string): void; + + // Set DOM element attribute value. + $set(key: string, value: any): void; + + // Observes an interpolated attribute. + // The observer function will be invoked once during the next $digest + // following compilation. The observer is then invoked whenever the + // interpolated value changes. + $observe(name: string, fn:(value?:any)=>any): Function; + + // A map of DOM element attribute names to the normalized name. This is needed + // to do reverse lookup from normalized name back to actual name. + $attr: Object; } /////////////////////////////////////////////////////////////////////////// From c8881ff07ba78220974673bace0c40b15d254176 Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Wed, 16 Oct 2013 09:33:51 -0700 Subject: [PATCH 090/150] Add IAttributes tests --- angularjs/angular-tests.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts index 6a6892f57e..bcfe31d167 100644 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -182,6 +182,7 @@ mod.value('name', 23); mod.value('name', "23"); mod.value(My.Namespace); + // Promise signature tests var foo: ng.IPromise; foo.then((x) => { @@ -217,3 +218,17 @@ var element = angular.element("div.myApp"); var scope: ng.IScope = element.scope(); + +function test_IAttributes(attributes: ng.IAttributes){ + return attributes; +} + +test_IAttributes({ + $addClass: function (classVal){}, + $removeClass: function(classVal){}, + $set: function(key, value){}, + $observe: function(name, fn){ + return fn; + }, + $attr: {} +}); From 604c5b5d6f5d99bc66894e41658fd9f374e4ddf0 Mon Sep 17 00:00:00 2001 From: Jared Reynolds Date: Wed, 16 Oct 2013 10:55:39 -0700 Subject: [PATCH 091/150] Added tests for angular resource type definitions --- angularjs/angular-resource-tests.ts | 74 +++++++++++++++++++++++++++++ angularjs/angular-resource.d.ts | 13 +++-- 2 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 angularjs/angular-resource-tests.ts diff --git a/angularjs/angular-resource-tests.ts b/angularjs/angular-resource-tests.ts new file mode 100644 index 0000000000..c2378350d1 --- /dev/null +++ b/angularjs/angular-resource-tests.ts @@ -0,0 +1,74 @@ +/// + +/////////////////////////////////////// +// IActionDescriptor +/////////////////////////////////////// +var actionDescriptor: ng.resource.IActionDescriptor; + +actionDescriptor.headers = { header: 'value' }; +actionDescriptor.isArray = true; +actionDescriptor.method = 'method action'; +actionDescriptor.params = { key: 'value' }; + + +/////////////////////////////////////// +// IResourceClass +/////////////////////////////////////// +var resourceClass: ng.resource.IResourceClass; +var resource: ng.resource.IResource; + +resource = resourceClass.delete(); +resource = resourceClass.delete({ key: 'value' }); +resource = resourceClass.delete({ key: 'value' }, function () { }); +resource = resourceClass.delete(function () { }); +resource = resourceClass.delete(function () { }, function () { }); +resource = resourceClass.delete({ key: 'value' }, { key: 'value' }); +resource = resourceClass.delete({ key: 'value' }, { key: 'value' }, function () { }); +resource = resourceClass.delete({ key: 'value' }, { key: 'value' }, function () { }, function () { }); + +resource = resourceClass.get(); +resource = resourceClass.get({ key: 'value' }); +resource = resourceClass.get({ key: 'value' }, function () { }); +resource = resourceClass.get(function () { }); +resource = resourceClass.get(function () { }, function () { }); +resource = resourceClass.get({ key: 'value' }, { key: 'value' }); +resource = resourceClass.get({ key: 'value' }, { key: 'value' }, function () { }); +resource = resourceClass.get({ key: 'value' }, { key: 'value' }, function () { }, function () { }); + +resource = resourceClass.query(); +resource = resourceClass.query({ key: 'value' }); +resource = resourceClass.query({ key: 'value' }, function () { }); +resource = resourceClass.query(function () { }); +resource = resourceClass.query(function () { }, function () { }); +resource = resourceClass.query({ key: 'value' }, { key: 'value' }); +resource = resourceClass.query({ key: 'value' }, { key: 'value' }, function () { }); +resource = resourceClass.query({ key: 'value' }, { key: 'value' }, function () { }, function () { }); + +resource = resourceClass.remove(); +resource = resourceClass.remove({ key: 'value' }); +resource = resourceClass.remove({ key: 'value' }, function () { }); +resource = resourceClass.remove(function () { }); +resource = resourceClass.remove(function () { }, function () { }); +resource = resourceClass.remove({ key: 'value' }, { key: 'value' }); +resource = resourceClass.remove({ key: 'value' }, { key: 'value' }, function () { }); +resource = resourceClass.remove({ key: 'value' }, { key: 'value' }, function () { }, function () { }); + +resource = resourceClass.save(); +resource = resourceClass.save({ key: 'value' }); +resource = resourceClass.save({ key: 'value' }, function () { }); +resource = resourceClass.save(function () { }); +resource = resourceClass.save(function () { }, function () { }); +resource = resourceClass.save({ key: 'value' }, { key: 'value' }); +resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function () { }); +resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function () { }, function () { }); + + +/////////////////////////////////////// +// IModule +/////////////////////////////////////// +var mod: ng.IModule; +var resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction; +var resourceService: ng.resource.IResourceService; + +resourceServiceFactoryFunction = function (resourceService) { return resourceClass }; +mod = mod.factory('factory name', resourceServiceFactoryFunction); diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 4589788d1c..a845cb3d6d 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -1,7 +1,6 @@ -// Type definitions for Angular JS 1.2 (ngResource module) +// Type definitions for Angular JS 1.2.0 (ngResource module) // Project: http://angularjs.org -// Definitions by: Diego Vilar -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/daptiv/DefinitelyTyped /// @@ -19,10 +18,10 @@ declare module ng.resource { // that deeply. /////////////////////////////////////////////////////////////////////////// interface IResourceService { - (url: string, paramDefaults?: any, - /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } - where deleteDescriptor : IActionDescriptor */ - actionDescriptors?: any): IResourceClass; + (url: string, paramDefaults?: any, + /** example: {update: { method: 'PUT' }, delete: deleteDescriptor } + where deleteDescriptor : IActionDescriptor */ + actionDescriptors?: any): IResourceClass; } // Just a reference to facilitate describing new actions From 9ba67fffd651f8d707f67e8a8aaf144f7e6f6069 Mon Sep 17 00:00:00 2001 From: Jared Reynolds Date: Wed, 16 Oct 2013 14:29:00 -0700 Subject: [PATCH 092/150] Updated angular IDirective for 1.2.0 Conflicts: angularjs/angular.d.ts --- angularjs/angular-1.0.d.ts | 6 +++--- angularjs/angular.d.ts | 25 +++++++++++++++++++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/angularjs/angular-1.0.d.ts b/angularjs/angular-1.0.d.ts index ce996c4e7a..52735c9bdf 100755 --- a/angularjs/angular-1.0.d.ts +++ b/angularjs/angular-1.0.d.ts @@ -671,15 +671,15 @@ declare module ng { interface IDirective{ priority?: number; - template?: string; - templateUrl?: string; + template?: any; + templateUrl?: any; replace?: boolean; transclude?: any; restrict?: string; scope?: any; link?: Function; compile?: Function; - controller?: Function; + controller?: any; } /////////////////////////////////////////////////////////////////////////// diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index c6279bdeea..fe3e986faf 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -640,16 +640,29 @@ declare module ng { /////////////////////////////////////////////////////////////////////////// interface IDirective{ + compile?: + (templateElement: any, + templateAttributes: IAttributes, + transclude: (scope: IScope, cloneLinkingFn: Function) => void + ) => any; + controller?: (...injectables: any[]) => void; + controllerAs?: string; + link?: + (scope: IScope, + instanceElement: any, + instanceAttributes: IAttributes, + controller: any + ) => void; + name?: string; priority?: number; - template?: any; - templateUrl?: any; replace?: boolean; - transclude?: any; + require?: string[]; restrict?: string; scope?: any; - link?: Function; - compile?: Function; - controller?: any; + template?: any; + templateUrl?: any; + terminal?: boolean; + transclude?: any; } /////////////////////////////////////////////////////////////////////////// From 5078772afbe786ae311d96c90514bcf93e6e4f0a Mon Sep 17 00:00:00 2001 From: John Emau Date: Wed, 23 Oct 2013 14:03:45 -0700 Subject: [PATCH 093/150] fixing error in angular-1.0 tests --- angularjs/angular-1.0-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular-1.0-tests.ts b/angularjs/angular-1.0-tests.ts index 5c628ced16..ff3c87f77f 100644 --- a/angularjs/angular-1.0-tests.ts +++ b/angularjs/angular-1.0-tests.ts @@ -20,7 +20,7 @@ angular.module('http-auth-interceptor', []) * Required by HTTP interceptor. * Function is attached to provider to be invisible for regular users of this service. */ - this.pushToBuffer = function (config: ng.IRequestConfig, deferred: ng.IDeferred) { + this.pushToBuffer = function (config: ng.IRequestConfig, deferred: ng.IDeferred) { buffer.push({ config: config, deferred: deferred From 912097ef1648f44fd2376c13da8bc6cdd10b7879 Mon Sep 17 00:00:00 2001 From: John Emau Date: Wed, 23 Oct 2013 14:50:30 -0700 Subject: [PATCH 094/150] adding missing tscparam files for needed angular files --- angularjs/angular-1.0-tests.ts.tscparams | 1 + angularjs/angular-mocks-tests.ts.tscparams | 1 + angularjs/angular-mocks.d.ts.tscparams | 1 + angularjs/angular-scenario-1.0.d.ts.tscparams | 1 + 4 files changed, 4 insertions(+) create mode 100644 angularjs/angular-1.0-tests.ts.tscparams create mode 100644 angularjs/angular-mocks-tests.ts.tscparams create mode 100644 angularjs/angular-mocks.d.ts.tscparams create mode 100644 angularjs/angular-scenario-1.0.d.ts.tscparams diff --git a/angularjs/angular-1.0-tests.ts.tscparams b/angularjs/angular-1.0-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/angularjs/angular-1.0-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/angularjs/angular-mocks-tests.ts.tscparams b/angularjs/angular-mocks-tests.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/angularjs/angular-mocks-tests.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/angularjs/angular-mocks.d.ts.tscparams b/angularjs/angular-mocks.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/angularjs/angular-mocks.d.ts.tscparams @@ -0,0 +1 @@ +"" diff --git a/angularjs/angular-scenario-1.0.d.ts.tscparams b/angularjs/angular-scenario-1.0.d.ts.tscparams new file mode 100644 index 0000000000..e16c76dff8 --- /dev/null +++ b/angularjs/angular-scenario-1.0.d.ts.tscparams @@ -0,0 +1 @@ +"" From d5d2fe59d62c5d7b98b2066bef1b5e2b6096588d Mon Sep 17 00:00:00 2001 From: John Emau Date: Wed, 23 Oct 2013 15:03:09 -0700 Subject: [PATCH 095/150] fixed angular version labels in comments --- angularjs/angular-1.0.d.ts | 2 +- angularjs/angular-resource.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs/angular-1.0.d.ts b/angularjs/angular-1.0.d.ts index 52735c9bdf..ecb7bd2c9b 100755 --- a/angularjs/angular-1.0.d.ts +++ b/angularjs/angular-1.0.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.2 +// Type definitions for Angular JS 1.0 // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index a845cb3d6d..b64335a0c2 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.2.0 (ngResource module) +// Type definitions for Angular JS 1.2 (ngResource module) // Project: http://angularjs.org // Definitions: https://github.com/daptiv/DefinitelyTyped From 68df744fd62082a72f7f21649600f58436e286b8 Mon Sep 17 00:00:00 2001 From: akalman Date: Wed, 23 Oct 2013 15:19:01 -0700 Subject: [PATCH 096/150] add done type. --- mocha/mocha.d.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/mocha/mocha.d.ts b/mocha/mocha.d.ts index 06970b4fd9..2438971d79 100644 --- a/mocha/mocha.d.ts +++ b/mocha/mocha.d.ts @@ -46,6 +46,10 @@ interface MochaSetupOptions { grep?: any; } +interface Done { + (error?: Error): void; +} + declare var describe : { (description: string, spec: () => void): void; only(description: string, spec: () => void): void; @@ -55,27 +59,27 @@ declare var describe : { declare var it: { (expectation: string, assertion?: () => void): void; - (expectation: string, assertion?: (done: (error?: Error) => void) => void): void; + (expectation: string, assertion?: (done: Done) => void): void; only(expectation: string, assertion?: () => void): void; - only(expectation: string, assertion?: (done: (error?: Error) => void) => void): void; + only(expectation: string, assertion?: (done: Done) => void): void; skip(expectation: string, assertion?: () => void): void; - skip(expectation: string, assertion?: (done: (error?: Error) => void) => void): void; + skip(expectation: string, assertion?: (done: Done) => void): void; timeout(ms: number): void; }; declare function before(action: () => void): void; -declare function before(action: (done: (error?: Error) => void) => void): void; +declare function before(action: (done: Done) => void): void; declare function after(action: () => void): void; -declare function after(action: (done: (error?: Error) => void) => void): void; +declare function after(action: (done: Done) => void): void; declare function beforeEach(action: () => void): void; -declare function beforeEach(action: (done: (error?: Error) => void) => void): void; +declare function beforeEach(action: (done: Done) => void): void; declare function afterEach(action: () => void): void; -declare function afterEach(action: (done: (error?: Error) => void) => void): void; +declare function afterEach(action: (done: Done) => void): void; From aed0b9670ee106f5620d36d2f295539e75e135b0 Mon Sep 17 00:00:00 2001 From: John Emau Date: Wed, 23 Oct 2013 16:28:25 -0700 Subject: [PATCH 097/150] updated angular readme to mention new ng.route module --- angularjs/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/angularjs/README.md b/angularjs/README.md index 1692d947c9..806a605d52 100644 --- a/angularjs/README.md +++ b/angularjs/README.md @@ -35,6 +35,7 @@ To avoid cluttering the list of suggestions as you type in your IDE, all interfa * `ng.cookies` for **ngCookies** * `ng.mock` for **ngMock** * `ng.resource` for **ngResource** +* `ng.route` for **ngRoute** * `ng.sanitize` for **ngSanitize** **ngMockE2E** does not define a new namespace, but rather modifies some of **ng**'s interfaces. From 67d306f4e99df3be949f39e1e569c10ff4f793d1 Mon Sep 17 00:00:00 2001 From: John Emau Date: Thu, 24 Oct 2013 07:04:15 -0700 Subject: [PATCH 098/150] reverted accidental removal of author comment --- angularjs/angular-resource.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index b64335a0c2..c15a933f8a 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -1,6 +1,7 @@ // Type definitions for Angular JS 1.2 (ngResource module) // Project: http://angularjs.org -// Definitions: https://github.com/daptiv/DefinitelyTyped +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 4d3715ca67ebbe5dd5a88aa2e921c012baca1e44 Mon Sep 17 00:00:00 2001 From: John Emau Date: Thu, 24 Oct 2013 07:14:18 -0700 Subject: [PATCH 099/150] reverted accidental removal of author comment from angular-mocks.d.ts --- angularjs/angular-mocks.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 6c7c0c7f37..2740dfdcba 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -1,6 +1,7 @@ // Type definitions for Angular JS 1.2 (ngMock, ngMockE2E module) // Project: http://angularjs.org -// Definitions: https://github.com/daptiv/DefinitelyTyped +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 4dafacebea8b328e8ae9cc696bcf7f29cd6b1986 Mon Sep 17 00:00:00 2001 From: akalman Date: Thu, 24 Oct 2013 10:21:17 -0700 Subject: [PATCH 100/150] put done interface into a module. --- mocha/mocha.d.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mocha/mocha.d.ts b/mocha/mocha.d.ts index 2438971d79..cd4a06e464 100644 --- a/mocha/mocha.d.ts +++ b/mocha/mocha.d.ts @@ -46,8 +46,10 @@ interface MochaSetupOptions { grep?: any; } -interface Done { - (error?: Error): void; +declare module mocha { + interface Done { + (error?: Error): void; + } } declare var describe : { @@ -59,27 +61,27 @@ declare var describe : { declare var it: { (expectation: string, assertion?: () => void): void; - (expectation: string, assertion?: (done: Done) => void): void; + (expectation: string, assertion?: (done: mocha.Done) => void): void; only(expectation: string, assertion?: () => void): void; - only(expectation: string, assertion?: (done: Done) => void): void; + only(expectation: string, assertion?: (done: mocha.Done) => void): void; skip(expectation: string, assertion?: () => void): void; - skip(expectation: string, assertion?: (done: Done) => void): void; + skip(expectation: string, assertion?: (done: mocha.Done) => void): void; timeout(ms: number): void; }; declare function before(action: () => void): void; -declare function before(action: (done: Done) => void): void; +declare function before(action: (done: mocha.Done) => void): void; declare function after(action: () => void): void; -declare function after(action: (done: Done) => void): void; +declare function after(action: (done: mocha.Done) => void): void; declare function beforeEach(action: () => void): void; -declare function beforeEach(action: (done: Done) => void): void; +declare function beforeEach(action: (done: mocha.Done) => void): void; declare function afterEach(action: () => void): void; -declare function afterEach(action: (done: Done) => void): void; +declare function afterEach(action: (done: mocha.Done) => void): void; From bacdd2e984abcfaf17a2b6c4d9e46daa580eaa89 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Thu, 24 Oct 2013 14:40:40 -0400 Subject: [PATCH 101/150] Fix future bugs in backbone.d.ts Callbacks need to use Function if the arguments to it aren't known ahead of time - see discussion here: https://typescript.codeplex.com/discussions/462819 --- backbone/backbone.d.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index e2579c407f..3902d8ffd0 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -67,16 +67,16 @@ declare module Backbone { } class Events { - on(eventName: any, callback?: (...args: any[]) => void , context?: any): any; - off(eventName?: string, callback?: (...args: any[]) => void , context?: any): any; + on(eventName: any, callback?: Function, context?: any): any; + off(eventName?: string, callback?: Function, context?: any): any; trigger(eventName: string, ...args: any[]): any; - bind(eventName: string, callback: (...args: any[]) => void , context?: any): any; - unbind(eventName?: string, callback?: (...args: any[]) => void , context?: any): any; + bind(eventName: string, callback: Function, context?: any): any; + unbind(eventName?: string, callback?: Function, context?: any): any; - once(events: string, callback: (...args: any[]) => void , context?: any): any; - listenTo(object: any, events: string, callback: (...args: any[]) => void ): any; - listenToOnce(object: any, events: string, callback: (...args: any[]) => void ): any; - stopListening(object?: any, events?: string, callback?: (...args: any[]) => void ): any; + once(events: string, callback: Function, context?: any): any; + listenTo(object: any, events: string, callback: Function): any; + listenToOnce(object: any, events: string, callback: Function): any; + stopListening(object?: any, events?: string, callback?: Function): any; } class ModelBase extends Events { @@ -248,7 +248,7 @@ declare module Backbone { constructor(options?: RouterOptions); initialize(options?: RouterOptions); - route(route: string, name: string, callback?: (...parameter: any[]) => void ); + route(route: string, name: string, callback?: Function); navigate(fragment: string, options?: NavigateOptions); navigate(fragment: string, trigger?: boolean); @@ -269,7 +269,7 @@ declare module Backbone { getHash(window?: Window): string; getFragment(fragment?: string, forcePushState?: boolean): string; stop(): void; - route(route: string, callback: (...args: any[]) => void ); + route(route: string, callback: Function); checkUrl(e?: any): void; loadUrl(fragmentOverride: string): boolean; navigate(fragment: string, options?: any); @@ -339,4 +339,3 @@ declare module Backbone { function setDomLibrary(jQueryNew); } - From f1f15ffd03ab5a072dc6ee198726f0710cd1c5d2 Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Thu, 24 Oct 2013 12:49:28 -0700 Subject: [PATCH 102/150] Fix parameter types which were actually variable names implicitly defined as any --- angularjs/angular-mocks.d.ts | 81 ++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 2740dfdcba..60315df868 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -1,7 +1,6 @@ -// Type definitions for Angular JS 1.2 (ngMock, ngMockE2E module) +// Type definitions for Angular JS 1.2.0 (ngMock, ngMockE2E module) // Project: http://angularjs.org -// Definitions by: Diego Vilar -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/daptiv/DefinitelyTyped /// @@ -86,21 +85,21 @@ declare module ng { verifyNoOutstandingRequest(): void; expect(method: string, url: string, data?: string, headers?: Object): mock.IRequestHandler; - expect(method: string, url: string, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: string, headers?: (object: Object) => boolean): mock.IRequestHandler; expect(method: string, url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - expect(method: string, url: string, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; - expect(method: string, url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; - expect(method: string, url: string, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; + expect(method: string, url: string, data?: (data: string) => boolean, headers?: (object: Object) => boolean): mock.IRequestHandler; expect(method: string, url: string, data?: Object, headers?: Object): mock.IRequestHandler; - expect(method: string, url: string, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: string, data?: Object, headers?: (object: Object) => boolean): mock.IRequestHandler; expect(method: string, url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; - expect(method: string, url: RegExp, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: string, headers?: (object: Object) => boolean): mock.IRequestHandler; expect(method: string, url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - expect(method: string, url: RegExp, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; - expect(method: string, url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; - expect(method: string, url: RegExp, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: (data: string) => boolean, headers?: (object: Object) => boolean): mock.IRequestHandler; expect(method: string, url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; - expect(method: string, url: RegExp, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + expect(method: string, url: RegExp, data?: Object, headers?: (object: Object) => boolean): mock.IRequestHandler; expectDELETE(url: string, headers?: Object): mock.IRequestHandler; expectDELETE(url: RegExp, headers?: Object): mock.IRequestHandler; @@ -113,91 +112,91 @@ declare module ng { expectPATCH(url: string, data?: string, headers?: Object): mock.IRequestHandler; expectPATCH(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - expectPATCH(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPATCH(url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; expectPATCH(url: string, data?: Object, headers?: Object): mock.IRequestHandler; expectPATCH(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; expectPATCH(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - expectPATCH(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPATCH(url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; expectPATCH(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; expectPOST(url: string, data?: string, headers?: Object): mock.IRequestHandler; expectPOST(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - expectPOST(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPOST(url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; expectPOST(url: string, data?: Object, headers?: Object): mock.IRequestHandler; expectPOST(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; expectPOST(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - expectPOST(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPOST(url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; expectPOST(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; expectPUT(url: string, data?: string, headers?: Object): mock.IRequestHandler; expectPUT(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - expectPUT(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPUT(url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; expectPUT(url: string, data?: Object, headers?: Object): mock.IRequestHandler; expectPUT(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; expectPUT(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - expectPUT(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + expectPUT(url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; expectPUT(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; when(method: string, url: string, data?: string, headers?: Object): mock.IRequestHandler; - when(method: string, url: string, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: string, headers?: (object: Object) => boolean): mock.IRequestHandler; when(method: string, url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - when(method: string, url: string, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; - when(method: string, url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; - when(method: string, url: string, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; + when(method: string, url: string, data?: (data: string) => boolean, headers?: (object: Object) => boolean): mock.IRequestHandler; when(method: string, url: string, data?: Object, headers?: Object): mock.IRequestHandler; - when(method: string, url: string, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: string, data?: Object, headers?: (object: Object) => boolean): mock.IRequestHandler; when(method: string, url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; - when(method: string, url: RegExp, data?: string, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: string, headers?: (object: Object) => boolean): mock.IRequestHandler; when(method: string, url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - when(method: string, url: RegExp, data?: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; - when(method: string, url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; - when(method: string, url: RegExp, data?: (string) => boolean, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; + when(method: string, url: RegExp, data?: (data: string) => boolean, headers?: (object: Object) => boolean): mock.IRequestHandler; when(method: string, url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; - when(method: string, url: RegExp, data?: Object, headers?: (Object) => boolean): mock.IRequestHandler; + when(method: string, url: RegExp, data?: Object, headers?: (object: Object) => boolean): mock.IRequestHandler; whenDELETE(url: string, headers?: Object): mock.IRequestHandler; - whenDELETE(url: string, headers?: (Object) => boolean): mock.IRequestHandler; + whenDELETE(url: string, headers?: (object: Object) => boolean): mock.IRequestHandler; whenDELETE(url: RegExp, headers?: Object): mock.IRequestHandler; - whenDELETE(url: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + whenDELETE(url: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; whenGET(url: string, headers?: Object): mock.IRequestHandler; - whenGET(url: string, headers?: (Object) => boolean): mock.IRequestHandler; + whenGET(url: string, headers?: (object: Object) => boolean): mock.IRequestHandler; whenGET(url: RegExp, headers?: Object): mock.IRequestHandler; - whenGET(url: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + whenGET(url: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; whenHEAD(url: string, headers?: Object): mock.IRequestHandler; - whenHEAD(url: string, headers?: (Object) => boolean): mock.IRequestHandler; + whenHEAD(url: string, headers?: (object: Object) => boolean): mock.IRequestHandler; whenHEAD(url: RegExp, headers?: Object): mock.IRequestHandler; - whenHEAD(url: RegExp, headers?: (Object) => boolean): mock.IRequestHandler; + whenHEAD(url: RegExp, headers?: (object: Object) => boolean): mock.IRequestHandler; whenJSONP(url: string): mock.IRequestHandler; whenJSONP(url: RegExp): mock.IRequestHandler; whenPATCH(url: string, data?: string, headers?: Object): mock.IRequestHandler; whenPATCH(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - whenPATCH(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPATCH(url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; whenPATCH(url: string, data?: Object, headers?: Object): mock.IRequestHandler; whenPATCH(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; whenPATCH(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - whenPATCH(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPATCH(url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; whenPATCH(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; whenPOST(url: string, data?: string, headers?: Object): mock.IRequestHandler; whenPOST(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - whenPOST(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPOST(url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; whenPOST(url: string, data?: Object, headers?: Object): mock.IRequestHandler; whenPOST(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; whenPOST(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - whenPOST(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPOST(url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; whenPOST(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; whenPUT(url: string, data?: string, headers?: Object): mock.IRequestHandler; whenPUT(url: string, data?: RegExp, headers?: Object): mock.IRequestHandler; - whenPUT(url: string, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPUT(url: string, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; whenPUT(url: string, data?: Object, headers?: Object): mock.IRequestHandler; whenPUT(url: RegExp, data?: string, headers?: Object): mock.IRequestHandler; whenPUT(url: RegExp, data?: RegExp, headers?: Object): mock.IRequestHandler; - whenPUT(url: RegExp, data?: (string) => boolean, headers?: Object): mock.IRequestHandler; + whenPUT(url: RegExp, data?: (data: string) => boolean, headers?: Object): mock.IRequestHandler; whenPUT(url: RegExp, data?: Object, headers?: Object): mock.IRequestHandler; } From 603d36d40ca22e63f262632ac5fdf85b3cebc41b Mon Sep 17 00:00:00 2001 From: Jacob Boland Date: Thu, 24 Oct 2013 12:55:02 -0700 Subject: [PATCH 103/150] Reimplement earlier changes to header --- angularjs/angular-mocks.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/angularjs/angular-mocks.d.ts b/angularjs/angular-mocks.d.ts index 60315df868..a607422dd4 100644 --- a/angularjs/angular-mocks.d.ts +++ b/angularjs/angular-mocks.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Angular JS 1.2.0 (ngMock, ngMockE2E module) +// Type definitions for Angular JS 1.2 (ngMock, ngMockE2E module) // Project: http://angularjs.org -// Definitions: https://github.com/daptiv/DefinitelyTyped +// Definitions by: Diego Vilar +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// From 008fa3ae3505062ed465b4da8175c0329b7d272f Mon Sep 17 00:00:00 2001 From: Nicholas Head Date: Thu, 24 Oct 2013 14:52:52 -0700 Subject: [PATCH 104/150] =?UTF-8?q?Update=20jquery.timeago.d.ts=20to=20rem?= =?UTF-8?q?ove=20=C3=A7=20character=20from=20name,=20causes=20compile=20er?= =?UTF-8?q?rors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jquery.timeago/jquery.timeago.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.timeago/jquery.timeago.d.ts b/jquery.timeago/jquery.timeago.d.ts index b1a1eab3f0..c71f096b41 100644 --- a/jquery.timeago/jquery.timeago.d.ts +++ b/jquery.timeago/jquery.timeago.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery.timeago.js 1.0.2 // Project: http://timeago.yarp.com/ -// Definitions by: François Guillot +// Definitions by: Francois Guillot // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -59,4 +59,4 @@ interface JQueryStatic { interface JQuery { timeago: Timeago; -} \ No newline at end of file +} From e6edd7b15f1cfb36ef542c96410fcc279d9b11e4 Mon Sep 17 00:00:00 2001 From: nicholashead Date: Thu, 24 Oct 2013 15:42:24 -0700 Subject: [PATCH 105/150] Updates jquery.timeago.d.ts to be UTF-8 --- jquery.timeago/jquery.timeago.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.timeago/jquery.timeago.d.ts b/jquery.timeago/jquery.timeago.d.ts index c71f096b41..109a7b0a81 100644 --- a/jquery.timeago/jquery.timeago.d.ts +++ b/jquery.timeago/jquery.timeago.d.ts @@ -1,6 +1,6 @@ -// Type definitions for jQuery.timeago.js 1.0.2 +// Type definitions for jQuery.timeago.js 1.0.2 // Project: http://timeago.yarp.com/ -// Definitions by: Francois Guillot +// Definitions by: François Guillot // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -59,4 +59,4 @@ interface JQueryStatic { interface JQuery { timeago: Timeago; -} +} \ No newline at end of file From fe4b190435139e5aea154f8321250170d3702d8e Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Thu, 24 Oct 2013 19:10:25 -0400 Subject: [PATCH 106/150] Fix future bug in require.d.ts Callbacks need to use 'Function' if the arguments to it aren't known ahead of time - see discussion here: https://typescript.codeplex.com/discussions/462819 --- requirejs/require.d.ts | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 2c7a1ca043..89c6f97f63 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -1,26 +1,26 @@ -/* +/* require-2.1.8.d.ts may be freely distributed under the MIT license. Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ @@ -70,7 +70,7 @@ interface RequireConfig { // The root path to use for all module lookups. baseUrl?: string; - // Path mappings for module names not found directly under + // Path mappings for module names not found directly under // baseUrl. paths?: { [key: string]: any; }; @@ -222,7 +222,7 @@ interface Require { * Configure require.js **/ config(config: RequireConfig): Require; - + /** * CommonJS require call * @param module Module to load @@ -242,7 +242,7 @@ interface Require { * @see Require() * @param ready Called when required modules are ready. **/ - (modules: string[], ready: (...modules: any[]) => void ): void; + (modules: string[], ready: Function): void; /** * Generate URLs from require module From 1bf0e657ee832dd6b75a4b225db6bdc20813e475 Mon Sep 17 00:00:00 2001 From: Kenneth Kolstad Date: Fri, 25 Oct 2013 02:39:36 -0400 Subject: [PATCH 107/150] Add $addControl and $removeControl to IFormController --- angularjs/angular.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index fe3e986faf..918f82ce4a 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -158,6 +158,8 @@ declare module ng { $valid: boolean; $invalid: boolean; $error: any; + $addControl(control: ng.INgModelController): void; + $removeControl(control: ng.INgModelController): void; $setDirty(): void; $setPristine(): void; } From 4f1786355cc5480b184e06d5da3f6da0c257b39c Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Fri, 25 Oct 2013 13:55:57 +0400 Subject: [PATCH 108/150] Added type definitions for IxJS (only for l2o.js) Added type definitions for IxJS project v1.0.6 (https://github.com/Reactive-Extensions/IxJS) only for core Linq to Objects (l2o.js). --- ix.js/l2o.d.ts | 241 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 ix.js/l2o.d.ts diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts new file mode 100644 index 0000000000..be5f43c2f5 --- /dev/null +++ b/ix.js/l2o.d.ts @@ -0,0 +1,241 @@ +// Type definitions for IxJS 1.0.6 +// Project: https://github.com/Reactive-Extensions/IxJS +// Definitions by: Igor Oleinikov + +declare module Ix { + export interface Enumerator { + moveNext(): boolean; + getCurrent(): T; + dispose(); + } + + export interface EnumeratorStatic { + new(moveNext: () => boolean, getCurrent: () => T, dispose: () => void): Enumerator; + create(moveNext: () => boolean, getCurrent: () => T, dispose?: () => void): Enumerator; + } + + var Enumerator: EnumerableStatic; + + export interface EnumerableFunc { + (item: T, index: number, self: Enumerable): TResult; + } + export interface EnumerablePredicate extends EnumerableFunc { } + export interface Predicate { + (item: T): boolean; + } + export interface EqualityComparer { + (item1: T1, item2: T2): boolean; + } + + export interface Enumerable { + // base functions + getEnumerator(): Enumerator; + + // "extension" functions + + aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate, resultSelector: (accumulate: TAccumulate) => TResult): TResult; + aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate): TAccumulate; + aggregate(func: (accumulate: T, current: T, index: number, self: Enumerable) => T): T; + + reduce(func: (accumulate: T, current: T, index: number, self: Enumerable) => T): T; + reduce(func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate, seed: TAccumulate): TAccumulate; + + all(predicate: EnumerablePredicate, thisArg?: any): boolean; + every(predicate: EnumerablePredicate, thisArg?: any): boolean; // alias + + any(predicate?: EnumerablePredicate, thisArg?: any): boolean; + some(predicate?: EnumerablePredicate, thisArg?: any): boolean; // alias + + average(selector?: EnumerableFunc): number; + max(selector?: EnumerableFunc): number; + min(selector?: EnumerableFunc): number; + sum(selector?: EnumerableFunc): number; + + concat(...sources: Enumerable[]): Enumerable; + + contains(value: TValue, comparer: EqualityComparer): boolean; + contains(value: any): boolean; + + count(predicate?: EnumerablePredicate, thisArg?: any): number; + + defaultIfEmpty(defaultValue: T): Enumerable; + + distinct(comparer?: EqualityComparer): Enumerable; + + elementAt(index: number): T; + elementAtOrDefault(index: number): T; + + except(second: Enumerable, comparer?: EqualityComparer): Enumerable; + + first(predicate?: Predicate): T; + firstOrDefault(predicate?: Predicate): T; + last(predicate?: Predicate): T; + lastOrDefault(predicate?: Predicate): T; + single(predicate?: Predicate): T; + singleOrDefault(predicate?: Predicate): T; + + forEach(action: EnumerableFunc, thisArg?: any): void; + + groupBy( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TElement, + resultSelector: (key: TKey, values: Enumerable) => TResult, + comparer?: EqualityComparer): Enumerable; + groupBy( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TElement): Grouping; + groupBy( + keySelector: (item: T) => TKey): Grouping; + + // if need to set comparer without resultSelector + groupBy( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TElement, + _: boolean, + comparer: EqualityComparer): Grouping; + // if need to set resultSelector without elementSelector + groupBy( + keySelector: (item: T) => TKey, + _: boolean, + resultSelector: (key: TKey, values: Enumerable) => TResult, + comparer?: EqualityComparer): Enumerable; + // if need to set comparer without elementSelector and resultSelector + groupBy( + keySelector: (item: T) => TKey, + _: boolean, + __: boolean, + comparer: EqualityComparer): Grouping; + + groupJoin( + inner: Enumerable, + outerKeySelector: (item: T) => TOuterKey, + innerKeySelector: (item: TInner) => TInnerKey, + resultSelector: (outer: T, innerSequence: Enumerable) => TResult, + comparer: EqualityComparer): Enumerable; + groupJoin( + inner: Enumerable, + outerKeySelector: (item: T) => TKey, + innerKeySelector: (item: TInner) => TKey, + resultSelector: (outer: T, innerSequence: Enumerable) => TResult): Enumerable; + + join( + inner: Enumerable, + outerKeySelector: (item: T) => TOuterKey, + innerKeySelector: (item: TInner) => TInnerKey, + resultSelector: (outer: T, inner: TInner) => TResult, + comparer: EqualityComparer): Enumerable; + join( + inner: Enumerable, + outerKeySelector: (item: T) => TKey, + innerKeySelector: (item: TInner) => TKey, + resultSelector: (outer: T, inner: TInner) => TResult): Enumerable; + + intersect(second: Enumerable, comparer: EqualityComparer): Enumerable; + intersect(second: Enumerable): Enumerable; + union(second: Enumerable, comparer?: EqualityComparer): Enumerable; + + orderBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + orderByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + + reverse(): Enumerable; + + select(selector: EnumerableFunc, thisArg?: any): Enumerable; + map(selector: EnumerableFunc, thisArg?: any): Enumerable; + + selectMany(collectionSelector: (item: T, index: number) => Enumerable, + resultSelector: (outer: T, inner: TCollection) => TResult): Enumerable; + selectMany(collectionSelector: (item: T, index: number) => Enumerable): Enumerable; + + sequenceEqual(second: Enumerable, comparer: EqualityComparer): boolean; + sequenceEqual(second: Enumerable): boolean; + + skip(count: number): Enumerable; + skipWhile(selector: EnumerablePredicate, thisArg?: any): Enumerable; + take(count: number): Enumerable; + takeWhile(selector: EnumerablePredicate, thisArg?: any): Enumerable; + + toArray(): T[]; + + toDictionary( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TValue, + comparer?: EqualityComparer): Dictionary; + toDictionary( + keySelector: (item: T) => TKey): Dictionary; + // if need to set comparer without elementSelector + toDictionary( + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Dictionary; + + toLookup( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TValue, + comparer?: EqualityComparer): Lookup; + toLookup( + keySelector: (item: T) => TKey): Lookup; + // if need to set comparer without elementSelector + toLookup( + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Lookup; + + where(selector: EnumerablePredicate, thisArg?: any): Enumerable; + filter(selector: EnumerablePredicate, thisArg?: any): Enumerable; + + zip(right: Enumerable, selector: (left: T, right: TRight) => TResult): Enumerable; + } + + export interface Grouping extends Enumerable { + key: TKey; + } + + export interface OrderedEnumerable extends Enumerable { + thenBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + thenByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + } + + class Dictionary { + constructor(capacity, comparer?: EqualityComparer); + + toEnumerable(): Enumerable>; + add(key: TKey, value: TValue): void; + remove(key: TKey): boolean; + clear(): void; + length(): number; + tryGetValue(key: TKey): TValue; + get(key: TKey): TValue; + set(key: TKey, value: TValue): void; + getValues(): TValue[]; + has(key: TKey): boolean; + } + + export interface KeyValuePair { + key: TKey; + value: TValue; + } + + export interface Lookup { + toEnumerable(): Enumerable>; + has(key: TKey): boolean; + length(): number; + get(key: TKey): Enumerable; + } + + export interface EnumerableStatic { + new (getEnumerator: () => Enumerator): Enumerable; + create(getEnumerator: () => Enumerator): Enumerable; + + concat(...sources: Enumerable[]): Enumerable; + empty(): Enumerable; + fromArray(array: T[]): Enumerable; + returnValue(value: T): Enumerable; + range(start: number, count: number): Enumerable; + repeat(value: T, repeatCount?: number): Enumerable; + + sequenceEqual(first: Enumerable, second: Enumerable, comparer: EqualityComparer): boolean; + sequenceEqual(first: Enumerable, second: Enumerable): boolean; + } + + var Enumerable: EnumerableStatic; +} \ No newline at end of file From 32adbb82c900b7bf8ffae22d32c16ecddb38e99c Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Fri, 25 Oct 2013 16:50:17 +0400 Subject: [PATCH 109/150] Created Disposable (for ix.js); Removed generative type recursion Via TS spec #3.5.2 generative recursive are disallowed (restriction will be removed in the future), so added workaround. Disposable interface extracted from Enumerator --- ix.js/l2o.d.ts | 59 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index be5f43c2f5..8177376e13 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -3,10 +3,13 @@ // Definitions by: Igor Oleinikov declare module Ix { - export interface Enumerator { + export interface Disposable { + dispose(); + } + + export interface Enumerator extends Disposable { moveNext(): boolean; getCurrent(): T; - dispose(); } export interface EnumeratorStatic { @@ -84,8 +87,11 @@ declare module Ix { groupBy( keySelector: (item: T) => TKey, elementSelector: (item: T) => TElement): Grouping; - groupBy( - keySelector: (item: T) => TKey): Grouping; + // spec 3.5.2, waiting for restriction on generative recursion removal + /*groupBy( + keySelector: (item: T) => TKey): Grouping;*/ + groupBy( + keySelector: (item: T) => TKey): Grouping; // if need to set comparer without resultSelector groupBy( @@ -100,11 +106,17 @@ declare module Ix { resultSelector: (key: TKey, values: Enumerable) => TResult, comparer?: EqualityComparer): Enumerable; // if need to set comparer without elementSelector and resultSelector - groupBy( + // spec 3.5.2, waiting for restriction on generative recursion removal + /*groupBy( keySelector: (item: T) => TKey, _: boolean, __: boolean, - comparer: EqualityComparer): Grouping; + comparer: EqualityComparer): Grouping;*/ + groupBy( + keySelector: (item: T) => TKey, + _: boolean, + __: boolean, + comparer: EqualityComparer): Grouping; groupJoin( inner: Enumerable, @@ -160,25 +172,41 @@ declare module Ix { keySelector: (item: T) => TKey, elementSelector: (item: T) => TValue, comparer?: EqualityComparer): Dictionary; - toDictionary( - keySelector: (item: T) => TKey): Dictionary; + // spec 3.5.2, waiting for restriction on generative recursion removal + /*toDictionary( + keySelector: (item: T) => TKey): Dictionary;*/ + toDictionary( + keySelector: (item: T) => TKey): Dictionary; // if need to set comparer without elementSelector - toDictionary( + // spec 3.5.2, waiting for restriction on generative recursion removal + /*toDictionary( keySelector: (item: T) => TKey, _: boolean, - comparer: EqualityComparer): Dictionary; + comparer: EqualityComparer): Dictionary;*/ + toDictionary( + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Dictionary; toLookup( keySelector: (item: T) => TKey, elementSelector: (item: T) => TValue, comparer?: EqualityComparer): Lookup; - toLookup( - keySelector: (item: T) => TKey): Lookup; + // spec 3.5.2, waiting for restriction on generative recursion removal + /*toLookup( + keySelector: (item: T) => TKey): Lookup;*/ + toLookup( + keySelector: (item: T) => TKey): Lookup; // if need to set comparer without elementSelector - toLookup( + // spec 3.5.2, waiting for restriction on generative recursion removal + /*toLookup( keySelector: (item: T) => TKey, _: boolean, - comparer: EqualityComparer): Lookup; + comparer: EqualityComparer): Lookup;*/ + toLookup( + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Lookup; where(selector: EnumerablePredicate, thisArg?: any): Enumerable; filter(selector: EnumerablePredicate, thisArg?: any): Enumerable; @@ -199,6 +227,7 @@ declare module Ix { constructor(capacity, comparer?: EqualityComparer); toEnumerable(): Enumerable>; + add(key: TKey, value: TValue): void; remove(key: TKey): boolean; clear(): void; @@ -216,7 +245,7 @@ declare module Ix { } export interface Lookup { - toEnumerable(): Enumerable>; + toEnumerable(): Enumerable>; has(key: TKey): boolean; length(): number; get(key: TKey): Enumerable; From dd5b76560ba4356a5ad8ddc1c84d568054cfe26a Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Fri, 25 Oct 2013 17:13:23 +0400 Subject: [PATCH 110/150] Added type definitions for IxJs/ix.js. --- ix.js/ix.d.ts | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 ix.js/ix.d.ts diff --git a/ix.js/ix.d.ts b/ix.js/ix.d.ts new file mode 100644 index 0000000000..5de2361ddb --- /dev/null +++ b/ix.js/ix.d.ts @@ -0,0 +1,114 @@ +/// + +declare module Ix { + + export interface Comparer { + (item1: T1, item2: T2): number; + } + + export interface Observer { + onNext? (value: T): void; + onError? (error: Error): void; + onCompleted? (): void; + } + + export interface Enumerable { + isEmpty(): boolean; + + minBy(keySelector: (item: T) => TKey, comparer: Comparer): Enumerable; + minBy(keySelector: (item: T) => number): Enumerable; + maxBy(keySelector: (item: T) => TKey, comparer: Comparer): Enumerable; + maxBy(keySelector: (item: T) => number): Enumerable; + + share(selector: (source: Enumerable) => Enumerable): Enumerable; + share(): Enumerable; + + publish(selector: (source: Enumerable) => Enumerable): Enumerable; + publish(): Enumerable; + + memoize(): Enumerable; + + do(onNext: (value: T) => void, onError?: (error: Error) => void, onCompleted?: () => void): Enumerable; + doAction(onNext: (value: T) => void, onError?: (error: Error) => void, onCompleted?: () => void): Enumerable; + do(onbserver: Observer): Enumerable; + doAction(onbserver: Observer): Enumerable; + + bufferWithCount(count: number, skip?: number): Enumerable; + + ignoreElements(): Enumerable; + + distinctBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): Enumerable; + + distinctUntilChanged(keySelector: (item: T) => TKey, comparer?: EqualityComparer): Enumerable; + distinctUntilChanged(): Enumerable; + // if need to set comparer without keySelector + distinctUntilChanged(_: boolean, comparer: EqualityComparer): Enumerable; + + expand(selector: (item: T) => Enumerable): Enumerable; + + startWith(...values: T[]): Enumerable; + + scan(seed: TSeed, accumulate: (acc: TAccumulator, item: T) => TAccumulator): Enumerable; + scan(accumulate: (acc: T, item: T) => T): Enumerable; + + takeLast(count: number): Enumerable; + skipLast(count: number): Enumerable; + + repeat(count?: number): Enumerable; + + catch(handler: (error: Error) => Enumerable): Enumerable; + catchException(handler: (error: Error) => Enumerable): Enumerable; + catch(second: Enumerable, ...other: Enumerable[]): Enumerable; + catchException(second: Enumerable, ...other: Enumerable[]): Enumerable; + + // todo: Enumerable>.catch(): Enumerable + //catch>(): Enumerable; + + finally(finallyAction: () => void): Enumerable; + finallyDo(finallyAction: () => void): Enumerable; + + onErrorResumeNext(second: Enumerable): Enumerable; + + retry(retryCount?: number): Enumerable; + + + } + + export interface EnumerableStatic { + throw(error: Error): Enumerable; + throwException(error: Error): Enumerable; + + defer(enumerableFactory: () => Enumerable): Enumerable; + + generate( + initialState: TState, + condition: Predicate, + iterate: (state: TState) => TState, + resultSelector: (state: TState) => TResult): Enumerable; + + using( + resourceFactory: () => TResource, + enumerableFactory: (resource: TResource) => Enumerable): Enumerable; + + catch(...sources: Enumerable[]): Enumerable; + catchException(...sources: Enumerable[]): Enumerable; + + onErrorResumeNext(...sources: Enumerable[]): Enumerable; + + while(condition: EnumerablePredicate>, source: Enumerable): Enumerable; + whileDo(condition: EnumerablePredicate>, source: Enumerable): Enumerable; + + if(condition: () => boolean, thenSource: Enumerable, elseSource?: Enumerable): Enumerable; + ifThen(condition: () => boolean, thenSource: Enumerable, elseSource?: Enumerable): Enumerable; + + doWhile(source: Enumerable, condition: EnumerablePredicate>): Enumerable; + + case(selector: () => number, sources: { [key: number]: Enumerable; }, defaultSource?: Enumerable): Enumerable; + case(selector: () => string, sources: { [key: string]: Enumerable; }, defaultSource?: Enumerable): Enumerable; + switchCase(selector: () => number, sources: { [key: number]: Enumerable; }, defaultSource?: Enumerable): Enumerable; + switchCase(selector: () => string, sources: { [key: string]: Enumerable; }, defaultSource?: Enumerable): Enumerable; + + for(source: Enumerable, resultSelector: EnumerableFunc): Enumerable; + forIn(source: Enumerable, resultSelector: EnumerableFunc): Enumerable; + } +} \ No newline at end of file From 338e04943c3fc9434827b7b632116cb2e5f7a3c1 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Fri, 25 Oct 2013 17:23:09 +0400 Subject: [PATCH 111/150] Added file descriptions --- ix.js/ix.d.ts | 4 ++++ ix.js/l2o.d.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ix.js/ix.d.ts b/ix.js/ix.d.ts index 5de2361ddb..9ea0ae0c91 100644 --- a/ix.js/ix.d.ts +++ b/ix.js/ix.d.ts @@ -1,3 +1,7 @@ +// Type definitions for IxJS 1.0.6 / ix.js +// Project: https://github.com/Reactive-Extensions/IxJS +// Definitions by: Igor Oleinikov + /// declare module Ix { diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 8177376e13..841116c46b 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -1,4 +1,4 @@ -// Type definitions for IxJS 1.0.6 +// Type definitions for IxJS 1.0.6 / l2o.js // Project: https://github.com/Reactive-Extensions/IxJS // Definitions by: Igor Oleinikov From ffee8db898ae959478f523fe79653cfe859ba9cf Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Fri, 25 Oct 2013 17:30:07 +0400 Subject: [PATCH 112/150] Added missed return type for Ix.Disposable.dispose --- ix.js/l2o.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 841116c46b..035d59234a 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -4,7 +4,7 @@ declare module Ix { export interface Disposable { - dispose(); + dispose(): void; } export interface Enumerator extends Disposable { From 0efbf156721aa4e8c8c77a55b603d13f2b15f62e Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Fri, 25 Oct 2013 19:21:41 +0400 Subject: [PATCH 113/150] Fixed formatting --- ix.js/ix.d.ts | 2 - ix.js/l2o.d.ts | 414 ++++++++++++++++++++++++------------------------- 2 files changed, 207 insertions(+), 209 deletions(-) diff --git a/ix.js/ix.d.ts b/ix.js/ix.d.ts index 9ea0ae0c91..2a598dde70 100644 --- a/ix.js/ix.d.ts +++ b/ix.js/ix.d.ts @@ -74,8 +74,6 @@ declare module Ix { onErrorResumeNext(second: Enumerable): Enumerable; retry(retryCount?: number): Enumerable; - - } export interface EnumerableStatic { diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 035d59234a..5a74c6259b 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -8,263 +8,263 @@ declare module Ix { } export interface Enumerator extends Disposable { - moveNext(): boolean; - getCurrent(): T; - } + moveNext(): boolean; + getCurrent(): T; + } - export interface EnumeratorStatic { - new(moveNext: () => boolean, getCurrent: () => T, dispose: () => void): Enumerator; - create(moveNext: () => boolean, getCurrent: () => T, dispose?: () => void): Enumerator; - } + export interface EnumeratorStatic { + new (moveNext: () => boolean, getCurrent: () => T, dispose: () => void): Enumerator; + create(moveNext: () => boolean, getCurrent: () => T, dispose?: () => void): Enumerator; + } - var Enumerator: EnumerableStatic; + var Enumerator: EnumerableStatic; - export interface EnumerableFunc { - (item: T, index: number, self: Enumerable): TResult; - } - export interface EnumerablePredicate extends EnumerableFunc { } - export interface Predicate { - (item: T): boolean; - } - export interface EqualityComparer { - (item1: T1, item2: T2): boolean; - } + export interface EnumerableFunc { + (item: T, index: number, self: Enumerable): TResult; + } + export interface EnumerablePredicate extends EnumerableFunc { } + export interface Predicate { + (item: T): boolean; + } + export interface EqualityComparer { + (item1: T1, item2: T2): boolean; + } - export interface Enumerable { - // base functions - getEnumerator(): Enumerator; + export interface Enumerable { + // base functions + getEnumerator(): Enumerator; - // "extension" functions + // "extension" functions - aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate, resultSelector: (accumulate: TAccumulate) => TResult): TResult; - aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate): TAccumulate; - aggregate(func: (accumulate: T, current: T, index: number, self: Enumerable) => T): T; + aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate, resultSelector: (accumulate: TAccumulate) => TResult): TResult; + aggregate(seed: TAccumulate, func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate): TAccumulate; + aggregate(func: (accumulate: T, current: T, index: number, self: Enumerable) => T): T; - reduce(func: (accumulate: T, current: T, index: number, self: Enumerable) => T): T; - reduce(func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate, seed: TAccumulate): TAccumulate; + reduce(func: (accumulate: T, current: T, index: number, self: Enumerable) => T): T; + reduce(func: (accumulate: TAccumulate, current: T, index: number, self: Enumerable) => TAccumulate, seed: TAccumulate): TAccumulate; - all(predicate: EnumerablePredicate, thisArg?: any): boolean; - every(predicate: EnumerablePredicate, thisArg?: any): boolean; // alias + all(predicate: EnumerablePredicate, thisArg?: any): boolean; + every(predicate: EnumerablePredicate, thisArg?: any): boolean; // alias - any(predicate?: EnumerablePredicate, thisArg?: any): boolean; - some(predicate?: EnumerablePredicate, thisArg?: any): boolean; // alias + any(predicate?: EnumerablePredicate, thisArg?: any): boolean; + some(predicate?: EnumerablePredicate, thisArg?: any): boolean; // alias - average(selector?: EnumerableFunc): number; - max(selector?: EnumerableFunc): number; - min(selector?: EnumerableFunc): number; - sum(selector?: EnumerableFunc): number; + average(selector?: EnumerableFunc): number; + max(selector?: EnumerableFunc): number; + min(selector?: EnumerableFunc): number; + sum(selector?: EnumerableFunc): number; - concat(...sources: Enumerable[]): Enumerable; + concat(...sources: Enumerable[]): Enumerable; - contains(value: TValue, comparer: EqualityComparer): boolean; - contains(value: any): boolean; + contains(value: TValue, comparer: EqualityComparer): boolean; + contains(value: any): boolean; - count(predicate?: EnumerablePredicate, thisArg?: any): number; + count(predicate?: EnumerablePredicate, thisArg?: any): number; - defaultIfEmpty(defaultValue: T): Enumerable; + defaultIfEmpty(defaultValue: T): Enumerable; - distinct(comparer?: EqualityComparer): Enumerable; + distinct(comparer?: EqualityComparer): Enumerable; - elementAt(index: number): T; - elementAtOrDefault(index: number): T; + elementAt(index: number): T; + elementAtOrDefault(index: number): T; - except(second: Enumerable, comparer?: EqualityComparer): Enumerable; + except(second: Enumerable, comparer?: EqualityComparer): Enumerable; - first(predicate?: Predicate): T; - firstOrDefault(predicate?: Predicate): T; - last(predicate?: Predicate): T; - lastOrDefault(predicate?: Predicate): T; - single(predicate?: Predicate): T; - singleOrDefault(predicate?: Predicate): T; + first(predicate?: Predicate): T; + firstOrDefault(predicate?: Predicate): T; + last(predicate?: Predicate): T; + lastOrDefault(predicate?: Predicate): T; + single(predicate?: Predicate): T; + singleOrDefault(predicate?: Predicate): T; - forEach(action: EnumerableFunc, thisArg?: any): void; + forEach(action: EnumerableFunc, thisArg?: any): void; - groupBy( - keySelector: (item: T) => TKey, - elementSelector: (item: T) => TElement, - resultSelector: (key: TKey, values: Enumerable) => TResult, - comparer?: EqualityComparer): Enumerable; - groupBy( - keySelector: (item: T) => TKey, - elementSelector: (item: T) => TElement): Grouping; - // spec 3.5.2, waiting for restriction on generative recursion removal + groupBy( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TElement, + resultSelector: (key: TKey, values: Enumerable) => TResult, + comparer?: EqualityComparer): Enumerable; + groupBy( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TElement): Grouping; + // spec 3.5.2, waiting for restriction on generative recursion removal /*groupBy( - keySelector: (item: T) => TKey): Grouping;*/ - groupBy( - keySelector: (item: T) => TKey): Grouping; + keySelector: (item: T) => TKey): Grouping;*/ + groupBy( + keySelector: (item: T) => TKey): Grouping; - // if need to set comparer without resultSelector - groupBy( - keySelector: (item: T) => TKey, - elementSelector: (item: T) => TElement, - _: boolean, - comparer: EqualityComparer): Grouping; - // if need to set resultSelector without elementSelector - groupBy( - keySelector: (item: T) => TKey, - _: boolean, - resultSelector: (key: TKey, values: Enumerable) => TResult, - comparer?: EqualityComparer): Enumerable; - // if need to set comparer without elementSelector and resultSelector - // spec 3.5.2, waiting for restriction on generative recursion removal + // if need to set comparer without resultSelector + groupBy( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TElement, + _: boolean, + comparer: EqualityComparer): Grouping; + // if need to set resultSelector without elementSelector + groupBy( + keySelector: (item: T) => TKey, + _: boolean, + resultSelector: (key: TKey, values: Enumerable) => TResult, + comparer?: EqualityComparer): Enumerable; + // if need to set comparer without elementSelector and resultSelector + // spec 3.5.2, waiting for restriction on generative recursion removal /*groupBy( - keySelector: (item: T) => TKey, - _: boolean, - __: boolean, - comparer: EqualityComparer): Grouping;*/ - groupBy( - keySelector: (item: T) => TKey, - _: boolean, - __: boolean, - comparer: EqualityComparer): Grouping; + keySelector: (item: T) => TKey, + _: boolean, + __: boolean, + comparer: EqualityComparer): Grouping;*/ + groupBy( + keySelector: (item: T) => TKey, + _: boolean, + __: boolean, + comparer: EqualityComparer): Grouping; - groupJoin( - inner: Enumerable, - outerKeySelector: (item: T) => TOuterKey, - innerKeySelector: (item: TInner) => TInnerKey, - resultSelector: (outer: T, innerSequence: Enumerable) => TResult, - comparer: EqualityComparer): Enumerable; - groupJoin( - inner: Enumerable, - outerKeySelector: (item: T) => TKey, - innerKeySelector: (item: TInner) => TKey, - resultSelector: (outer: T, innerSequence: Enumerable) => TResult): Enumerable; + groupJoin( + inner: Enumerable, + outerKeySelector: (item: T) => TOuterKey, + innerKeySelector: (item: TInner) => TInnerKey, + resultSelector: (outer: T, innerSequence: Enumerable) => TResult, + comparer: EqualityComparer): Enumerable; + groupJoin( + inner: Enumerable, + outerKeySelector: (item: T) => TKey, + innerKeySelector: (item: TInner) => TKey, + resultSelector: (outer: T, innerSequence: Enumerable) => TResult): Enumerable; - join( - inner: Enumerable, - outerKeySelector: (item: T) => TOuterKey, - innerKeySelector: (item: TInner) => TInnerKey, - resultSelector: (outer: T, inner: TInner) => TResult, - comparer: EqualityComparer): Enumerable; - join( - inner: Enumerable, - outerKeySelector: (item: T) => TKey, - innerKeySelector: (item: TInner) => TKey, - resultSelector: (outer: T, inner: TInner) => TResult): Enumerable; + join( + inner: Enumerable, + outerKeySelector: (item: T) => TOuterKey, + innerKeySelector: (item: TInner) => TInnerKey, + resultSelector: (outer: T, inner: TInner) => TResult, + comparer: EqualityComparer): Enumerable; + join( + inner: Enumerable, + outerKeySelector: (item: T) => TKey, + innerKeySelector: (item: TInner) => TKey, + resultSelector: (outer: T, inner: TInner) => TResult): Enumerable; - intersect(second: Enumerable, comparer: EqualityComparer): Enumerable; - intersect(second: Enumerable): Enumerable; - union(second: Enumerable, comparer?: EqualityComparer): Enumerable; + intersect(second: Enumerable, comparer: EqualityComparer): Enumerable; + intersect(second: Enumerable): Enumerable; + union(second: Enumerable, comparer?: EqualityComparer): Enumerable; - orderBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; - orderByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + orderBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + orderByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; - reverse(): Enumerable; + reverse(): Enumerable; - select(selector: EnumerableFunc, thisArg?: any): Enumerable; - map(selector: EnumerableFunc, thisArg?: any): Enumerable; + select(selector: EnumerableFunc, thisArg?: any): Enumerable; + map(selector: EnumerableFunc, thisArg?: any): Enumerable; - selectMany(collectionSelector: (item: T, index: number) => Enumerable, - resultSelector: (outer: T, inner: TCollection) => TResult): Enumerable; - selectMany(collectionSelector: (item: T, index: number) => Enumerable): Enumerable; + selectMany(collectionSelector: (item: T, index: number) => Enumerable, + resultSelector: (outer: T, inner: TCollection) => TResult): Enumerable; + selectMany(collectionSelector: (item: T, index: number) => Enumerable): Enumerable; - sequenceEqual(second: Enumerable, comparer: EqualityComparer): boolean; - sequenceEqual(second: Enumerable): boolean; + sequenceEqual(second: Enumerable, comparer: EqualityComparer): boolean; + sequenceEqual(second: Enumerable): boolean; - skip(count: number): Enumerable; - skipWhile(selector: EnumerablePredicate, thisArg?: any): Enumerable; - take(count: number): Enumerable; - takeWhile(selector: EnumerablePredicate, thisArg?: any): Enumerable; + skip(count: number): Enumerable; + skipWhile(selector: EnumerablePredicate, thisArg?: any): Enumerable; + take(count: number): Enumerable; + takeWhile(selector: EnumerablePredicate, thisArg?: any): Enumerable; - toArray(): T[]; + toArray(): T[]; - toDictionary( - keySelector: (item: T) => TKey, - elementSelector: (item: T) => TValue, - comparer?: EqualityComparer): Dictionary; - // spec 3.5.2, waiting for restriction on generative recursion removal + toDictionary( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TValue, + comparer?: EqualityComparer): Dictionary; + // spec 3.5.2, waiting for restriction on generative recursion removal /*toDictionary( - keySelector: (item: T) => TKey): Dictionary;*/ - toDictionary( - keySelector: (item: T) => TKey): Dictionary; - // if need to set comparer without elementSelector - // spec 3.5.2, waiting for restriction on generative recursion removal + keySelector: (item: T) => TKey): Dictionary;*/ + toDictionary( + keySelector: (item: T) => TKey): Dictionary; + // if need to set comparer without elementSelector + // spec 3.5.2, waiting for restriction on generative recursion removal /*toDictionary( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Dictionary;*/ - toDictionary( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Dictionary; + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Dictionary;*/ + toDictionary( + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Dictionary; - toLookup( - keySelector: (item: T) => TKey, - elementSelector: (item: T) => TValue, - comparer?: EqualityComparer): Lookup; - // spec 3.5.2, waiting for restriction on generative recursion removal + toLookup( + keySelector: (item: T) => TKey, + elementSelector: (item: T) => TValue, + comparer?: EqualityComparer): Lookup; + // spec 3.5.2, waiting for restriction on generative recursion removal /*toLookup( - keySelector: (item: T) => TKey): Lookup;*/ - toLookup( - keySelector: (item: T) => TKey): Lookup; - // if need to set comparer without elementSelector - // spec 3.5.2, waiting for restriction on generative recursion removal + keySelector: (item: T) => TKey): Lookup;*/ + toLookup( + keySelector: (item: T) => TKey): Lookup; + // if need to set comparer without elementSelector + // spec 3.5.2, waiting for restriction on generative recursion removal /*toLookup( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Lookup;*/ - toLookup( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Lookup; + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Lookup;*/ + toLookup( + keySelector: (item: T) => TKey, + _: boolean, + comparer: EqualityComparer): Lookup; - where(selector: EnumerablePredicate, thisArg?: any): Enumerable; - filter(selector: EnumerablePredicate, thisArg?: any): Enumerable; + where(selector: EnumerablePredicate, thisArg?: any): Enumerable; + filter(selector: EnumerablePredicate, thisArg?: any): Enumerable; - zip(right: Enumerable, selector: (left: T, right: TRight) => TResult): Enumerable; - } + zip(right: Enumerable, selector: (left: T, right: TRight) => TResult): Enumerable; + } - export interface Grouping extends Enumerable { - key: TKey; - } + export interface Grouping extends Enumerable { + key: TKey; + } - export interface OrderedEnumerable extends Enumerable { - thenBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; - thenByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; - } + export interface OrderedEnumerable extends Enumerable { + thenBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + thenByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + } - class Dictionary { - constructor(capacity, comparer?: EqualityComparer); + class Dictionary { + constructor(capacity, comparer?: EqualityComparer); - toEnumerable(): Enumerable>; + toEnumerable(): Enumerable>; - add(key: TKey, value: TValue): void; - remove(key: TKey): boolean; - clear(): void; - length(): number; - tryGetValue(key: TKey): TValue; - get(key: TKey): TValue; - set(key: TKey, value: TValue): void; - getValues(): TValue[]; - has(key: TKey): boolean; - } + add(key: TKey, value: TValue): void; + remove(key: TKey): boolean; + clear(): void; + length(): number; + tryGetValue(key: TKey): TValue; + get(key: TKey): TValue; + set(key: TKey, value: TValue): void; + getValues(): TValue[]; + has(key: TKey): boolean; + } - export interface KeyValuePair { - key: TKey; - value: TValue; - } + export interface KeyValuePair { + key: TKey; + value: TValue; + } - export interface Lookup { - toEnumerable(): Enumerable>; - has(key: TKey): boolean; - length(): number; - get(key: TKey): Enumerable; - } + export interface Lookup { + toEnumerable(): Enumerable>; + has(key: TKey): boolean; + length(): number; + get(key: TKey): Enumerable; + } - export interface EnumerableStatic { - new (getEnumerator: () => Enumerator): Enumerable; - create(getEnumerator: () => Enumerator): Enumerable; + export interface EnumerableStatic { + new (getEnumerator: () => Enumerator): Enumerable; + create(getEnumerator: () => Enumerator): Enumerable; - concat(...sources: Enumerable[]): Enumerable; - empty(): Enumerable; - fromArray(array: T[]): Enumerable; - returnValue(value: T): Enumerable; - range(start: number, count: number): Enumerable; - repeat(value: T, repeatCount?: number): Enumerable; + concat(...sources: Enumerable[]): Enumerable; + empty(): Enumerable; + fromArray(array: T[]): Enumerable; + returnValue(value: T): Enumerable; + range(start: number, count: number): Enumerable; + repeat(value: T, repeatCount?: number): Enumerable; - sequenceEqual(first: Enumerable, second: Enumerable, comparer: EqualityComparer): boolean; - sequenceEqual(first: Enumerable, second: Enumerable): boolean; - } + sequenceEqual(first: Enumerable, second: Enumerable, comparer: EqualityComparer): boolean; + sequenceEqual(first: Enumerable, second: Enumerable): boolean; + } - var Enumerable: EnumerableStatic; + var Enumerable: EnumerableStatic; } \ No newline at end of file From 1e83c5da21c2a82313447f78fea5fb10b2b12b2b Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Fri, 25 Oct 2013 17:39:28 -0400 Subject: [PATCH 114/150] Fix future bug in slickgrid.d.ts Really subtle bug: the function should be using the class generic parameter - not a new one just for the method. --- slickgrid/SlickGrid.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index bc45c4dff8..682463f78f 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -87,7 +87,7 @@ declare module Slick { * @method subscribe * @param fn {Function} Event handler. */ - public subscribe(fn: (eventData: EventData, data: T) => any ): void; + public subscribe(fn: (eventData: EventData, data: T) => any ): void; /*** * Removes an event handler added with subscribe(fn). From 0963cde2eec119b8d48f87ad37af294eca0f1eb8 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sat, 26 Oct 2013 14:39:04 +0400 Subject: [PATCH 115/150] Fixed several bugs in l2o.d.ts - fixed Enumerator variable type - added Comparer interface - added return alias for returnValue - minor fixes --- ix.js/l2o.d.ts | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 5a74c6259b..44a5efda43 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -17,7 +17,7 @@ declare module Ix { create(moveNext: () => boolean, getCurrent: () => T, dispose?: () => void): Enumerator; } - var Enumerator: EnumerableStatic; + var Enumerator: EnumeratorStatic; export interface EnumerableFunc { (item: T, index: number, self: Enumerable): TResult; @@ -26,8 +26,11 @@ declare module Ix { export interface Predicate { (item: T): boolean; } - export interface EqualityComparer { - (item1: T1, item2: T2): boolean; + export interface EqualityComparer { + (item1: TFirst, item2: TSecond): boolean; + } + export interface Comparer { + (item1: TFirst, item2: TSecond): number; } export interface Enumerable { @@ -57,18 +60,19 @@ declare module Ix { concat(...sources: Enumerable[]): Enumerable; contains(value: TValue, comparer: EqualityComparer): boolean; - contains(value: any): boolean; + contains(value: T): boolean; count(predicate?: EnumerablePredicate, thisArg?: any): number; - defaultIfEmpty(defaultValue: T): Enumerable; + defaultIfEmpty(defaultValue?: T): Enumerable; distinct(comparer?: EqualityComparer): Enumerable; elementAt(index: number): T; elementAtOrDefault(index: number): T; - except(second: Enumerable, comparer?: EqualityComparer): Enumerable; + except(second: Enumerable, comparer: EqualityComparer): Enumerable; + except(second: Enumerable): Enumerable; first(predicate?: Predicate): T; firstOrDefault(predicate?: Predicate): T; @@ -146,8 +150,8 @@ declare module Ix { intersect(second: Enumerable): Enumerable; union(second: Enumerable, comparer?: EqualityComparer): Enumerable; - orderBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; - orderByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + orderBy(keySelector: (item: T) => TKey, comparer?: Comparer): OrderedEnumerable; + orderByDescending(keySelector: (item: T) => TKey, comparer?: Comparer): OrderedEnumerable; reverse(): Enumerable; @@ -219,12 +223,12 @@ declare module Ix { } export interface OrderedEnumerable extends Enumerable { - thenBy(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; - thenByDescending(keySelector: (item: T) => TKey, comparer?: EqualityComparer): OrderedEnumerable; + thenBy(keySelector: (item: T) => TKey, comparer?: Comparer): OrderedEnumerable; + thenByDescending(keySelector: (item: T) => TKey, comparer?: Comparer): OrderedEnumerable; } class Dictionary { - constructor(capacity, comparer?: EqualityComparer); + constructor(capacity?: number, comparer?: EqualityComparer); toEnumerable(): Enumerable>; @@ -258,7 +262,8 @@ declare module Ix { concat(...sources: Enumerable[]): Enumerable; empty(): Enumerable; fromArray(array: T[]): Enumerable; - returnValue(value: T): Enumerable; + return(value: T): Enumerable; + returnValue(value: T): Enumerable; // alias for ; repeat(value: T, repeatCount?: number): Enumerable; From 6dd6462da3c71ec409a48e5ae33813b2fb3de4c0 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sat, 26 Oct 2013 14:39:55 +0400 Subject: [PATCH 116/150] Added tests for l2o.d.ts Tests for all functions defined in Enumerable and EnumerableStatic --- ix.js/l2o-tests.ts | 160 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 ix.js/l2o-tests.ts diff --git a/ix.js/l2o-tests.ts b/ix.js/l2o-tests.ts new file mode 100644 index 0000000000..4be2974b3e --- /dev/null +++ b/ix.js/l2o-tests.ts @@ -0,0 +1,160 @@ +/// + +var ec_ns = (a: number, b: string) => a.toString() == b; //equality comparer on number,string +var ec_nn = (a: number, b: number) => a === b; //equality comparer on number,number +var c_nn = (a: number, b: number) => a - b; //comparer on number,number + +// static + +var ax = Ix.Enumerable.fromArray([0, 2, 7, 3, 4, 5]); + +var bx = Ix.Enumerable.create(() => { + var current = "."; + return Ix.Enumerator.create( + () => { current += "."; return true; }, + () => current, + () => { }); +}); + +Ix.Enumerator.create(() => true, () => 1); // without dispose method + +var cx = Ix.Enumerable.empty(); + +var dx = Ix.Enumerable.concat(ax, cx); + +var ex = Ix.Enumerable.return(42); +var fx = Ix.Enumerable.returnValue("42"); + +var gx = Ix.Enumerable.range(-100, 200); + +Ix.Enumerable.repeat(42, 42); +Ix.Enumerable.repeat(42); // infinite + +Ix.Enumerable.sequenceEqual(ax, fx, ec_ns); +Ix.Enumerable.sequenceEqual(ax, ex); // default comparer on same type + +// instance + +ax.getEnumerator(); + +ax.aggregate("", (acc, i) => acc + i, acc=> acc.length); +ax.aggregate("", (acc, i) => acc + i); +ax.aggregate((acc, i) => acc + i); + +ax.reduce((acc, i) => acc + i, 100); +ax.reduce((acc, i) => acc + i); + +ax.all(item => true); +ax.all(item => true, bx); +ax.every(item => true); +ax.every(item => true, bx); + +ax.any(); +ax.any(item => true); +ax.any(item => true, bx); +ax.some(); +ax.some(item => true); +ax.some(item => true, bx); + +ax.average(); +bx.average(item => item.length); +ax.min(); +bx.min(item => item.length); +ax.max(); +bx.max(item => item.length); +ax.sum(); +bx.sum(item => item.length); + +ax.concat(ax, cx, dx, ex, gx); + +ax.contains(10); +ax.contains("10", ec_ns); + +ax.count(); +ax.count(item=>false); +ax.count(item=> false, {}); + +cx.defaultIfEmpty(); +cx.defaultIfEmpty(10); + +dx.distinct(); +dx.distinct((d1, d2) => d1 === d2); + +ax.elementAt(2); +ax.elementAtOrDefault(2); + +//ax.except(bx, ec_ns); // bug https://typescript.codeplex.com/workitem/1841 +bx.except(fx); + +ax.first(); +ax.firstOrDefault(); +ax.last(); +ax.lastOrDefault(); +ax.single(); +ax.singleOrDefault(); + +ax.forEach(a => console.log(a)); +ax.forEach(a => console.log(a), cx); + +bx.groupBy(b => b.length); +bx.groupBy(b => b.length, b => "[" + b + "]"); +bx.groupBy(b => b.length, b => "[" + b + "]", (l, values) => l + values.count()); +bx.groupBy(b => b.length, false, (l, values) => l + values.count()); +bx.groupBy(b => b.length, b => "[" + b + "]", (l, values) => l + values.count(), ec_nn); +bx.groupBy(b => b.length, b => "[" + b + "]", false, (x, y) => x == y); +bx.groupBy(b => b.length, false, (l, values) => l + values.count(), ec_nn); +bx.groupBy(b => b.length, false, false, ec_nn); + +ax.groupJoin(bx, a => a, b => b, (a, b) => [a, b], ec_ns); +ax.groupJoin(bx, a => a, b => b.length, (a, b) => [a, b]); + +ax.join(bx, a => a, b => b, (a, b) => [a, b], ec_ns); +ax.join(bx, a => a, b => b.length, (a, b) => [a, b]); + +//ax.intersect(bx, ec_ns); // bug https://typescript.codeplex.com/workitem/1841 +ax.intersect(cx); +ax.union(cx); + +ax.orderBy(a=> -a).thenBy(a => a); +ax.orderBy(a=> -a, c_nn).thenBy(a => a, c_nn); +ax.orderByDescending(a=> -a).thenByDescending(a => a); +ax.orderByDescending(a=> -a, c_nn).thenByDescending(a => a, c_nn); + +ax.reverse(); + +ax.select(a=> a.toString()); +ax.select(a=> a.toString(), {}); +ax.map(a=> a.toString()); +ax.map(a=> a.toString(), {}); + +ax.selectMany(a=> bx); +ax.selectMany(a=> bx, (a, b) => [a, b]); + +ax.sequenceEqual(fx, ec_ns); +ax.sequenceEqual(ax, ec_nn); +ax.sequenceEqual(cx); + +ax.skip(10); +ax.skipWhile(a => a > 10); +ax.take(10); +ax.takeWhile(a => a > 10); + +ax.toArray(); + +bx.toDictionary(b => b.length, b => 10, ec_nn); +bx.toDictionary(b => b.length, false, ec_nn); +bx.toDictionary(b => b.length, b => 10); +bx.toDictionary(b => b.length); + +bx.toLookup(b => b.length, b => 10, ec_nn); +bx.toLookup(b => b.length, false, ec_nn); +bx.toLookup(b => b.length, b => 10); +bx.toLookup(b => b.length); + +ax.where(a=> a > 10, {}); +ax.where(a=> a > 10); +ax.filter(a=> a > 10, {}); +ax.filter(a=> a > 10); + +ax.zip(bx, (a: number, b: string) => [a, b]); +ax.zip(bx, (a, b) => [a, b]); From 019e4dd6670790793f2ca721f61ba4923e61bf2d Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sat, 26 Oct 2013 14:56:18 +0400 Subject: [PATCH 117/150] Removed Comparer from ix.d.ts (alreadu defined in l2o.d.ts) --- ix.js/ix.d.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ix.js/ix.d.ts b/ix.js/ix.d.ts index 2a598dde70..d138b007d5 100644 --- a/ix.js/ix.d.ts +++ b/ix.js/ix.d.ts @@ -6,10 +6,6 @@ declare module Ix { - export interface Comparer { - (item1: T1, item2: T2): number; - } - export interface Observer { onNext? (value: T): void; onError? (error: Error): void; @@ -113,4 +109,4 @@ declare module Ix { for(source: Enumerable, resultSelector: EnumerableFunc): Enumerable; forIn(source: Enumerable, resultSelector: EnumerableFunc): Enumerable; } -} \ No newline at end of file +} From af0f9c4bf5af0178be1b881b97f81351c3545560 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sat, 26 Oct 2013 14:58:43 +0400 Subject: [PATCH 118/150] Added tests for ix.d.ts Tested all functions defined in ix.d.ts in EnumerableStatic --- ix.js/ix-tests.ts | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ix.js/ix-tests.ts diff --git a/ix.js/ix-tests.ts b/ix.js/ix-tests.ts new file mode 100644 index 0000000000..dc44f1589b --- /dev/null +++ b/ix.js/ix-tests.ts @@ -0,0 +1,46 @@ +/// + +var ec_ns = (a: number, b: string) => a.toString() == b; //equality comparer on number,string +var ec_nn = (a: number, b: number) => a === b; //equality comparer on number,number +var c_nn = (a: number, b: number) => a - b; //comparer on number,number + +// static + +Ix.Enumerable.throw(new Error("error")); +Ix.Enumerable.throwException(new Error("error")); + +var ax = Ix.Enumerable.generate(-100, a => a < 100, a=> a + 10, a=> a * 2); + +Ix.Enumerable.defer(() => ax); + +Ix.Enumerable.using(() => ax.getEnumerator(), e => Ix.Enumerable.return(e.getCurrent())); + +Ix.Enumerable.catch(ax, ax, ax); +Ix.Enumerable.catchException(ax, ax, ax); +Ix.Enumerable.catch(); +Ix.Enumerable.catchException(); + +Ix.Enumerable.onErrorResumeNext(ax, ax, ax); +Ix.Enumerable.onErrorResumeNext(); + +Ix.Enumerable.while(x => x.count() > 0, ax); +Ix.Enumerable.whileDo(x => x.count() > 0, ax); + +Ix.Enumerable.if(() => true, ax, ax); +Ix.Enumerable.ifThen(() => true, ax, ax); +Ix.Enumerable.if(() => true, ax); +Ix.Enumerable.ifThen(() => true, ax); + +Ix.Enumerable.doWhile(ax, x => x.count() > 0); + +Ix.Enumerable.case(() => 42, { 42: ax }, ax); +Ix.Enumerable.switchCase(() => 42, { 42: ax }, ax); +Ix.Enumerable.case(() => 42, { 42: ax }); +Ix.Enumerable.switchCase(() => 42, { 42: ax }); +Ix.Enumerable.case(() => "42", { "42": ax }, ax); +Ix.Enumerable.switchCase(() => "42", { "42": ax }, ax); +Ix.Enumerable.case(() => "42", { "42": ax }); +Ix.Enumerable.switchCase(() => "42", { "42": ax }); + +Ix.Enumerable.for(ax, a => ax); +Ix.Enumerable.forIn(ax, a => ax); From 2b99487a28219716fd7fa8a20b04fe664d5a4be7 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sat, 26 Oct 2013 16:24:49 +0400 Subject: [PATCH 119/150] Added tests for ix.d.ts - added tests of all functions defined in ix.d.ts Enumerable - minor fix in ix.d.ts --- ix.js/ix-tests.ts | 70 +++++++++++++++++++++++++++++++++++++++++++++++ ix.js/ix.d.ts | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/ix.js/ix-tests.ts b/ix.js/ix-tests.ts index dc44f1589b..6953621ca3 100644 --- a/ix.js/ix-tests.ts +++ b/ix.js/ix-tests.ts @@ -1,6 +1,7 @@ /// var ec_ns = (a: number, b: string) => a.toString() == b; //equality comparer on number,string +var ec_ss = (a: string, b: string) => a == b; //equality comparer on string,string var ec_nn = (a: number, b: number) => a === b; //equality comparer on number,number var c_nn = (a: number, b: number) => a - b; //comparer on number,number @@ -44,3 +45,72 @@ Ix.Enumerable.switchCase(() => "42", { "42": ax }); Ix.Enumerable.for(ax, a => ax); Ix.Enumerable.forIn(ax, a => ax); + +// instance + +var bx: Ix.Enumerable; + +ax.isEmpty(); + +bx.minBy(b => b.length, c_nn); +bx.minBy(b => b.length); +bx.maxBy(b => b.length, c_nn); +bx.maxBy(b => b.length); + +ax.share(ax => bx); +ax.share(); + +ax.publish(ax => bx); +ax.publish(); + +ax.memoize(); + +ax.do({ onNext: (a: number) => console.log(a), onError: err => console.log(err), onCompleted: () => console.log("completed") }); +ax.do(a => console.log(a), err => console.log(err), () => console.log("completed")); +ax.do(a => console.log(a), err => console.log(err)); +ax.do((a: number) => console.log(a)); +ax.doAction({ onNext: (a: number) => console.log(a), onError: err => console.log(err), onCompleted: () => console.log("completed") }); +ax.doAction(a => console.log(a), err => console.log(err), () => console.log("completed")); +ax.doAction(a => console.log(a), err => console.log(err)); +ax.doAction((a: number) => console.log(a)); + +ax.bufferWithCount(10, 20); +ax.bufferWithCount(10); + +ax.ignoreElements(); + +bx.distinctBy(b => b.length, ec_nn); +bx.distinctBy(b => b.length); + +bx.distinctUntilChanged(b => b.length, ec_nn); +bx.distinctUntilChanged(b => b.length); +bx.distinctUntilChanged(); +bx.distinctUntilChanged(false, ec_ss); + +ax.expand(a => ax); + +ax.startWith(10, 20); + +ax.scan(0, (acc, a) => acc + a); +ax.scan((acc, a) => acc + a); + +ax.takeLast(10); +ax.skipLast(10); + +ax.repeat(10); +ax.repeat(); + +ax.catch(ax, ax, ax); +ax.catchException(ax, ax, ax); +ax.catch(ax); +ax.catchException(ax); +ax.catch(err => ax); +ax.catchException(err => ax); + +ax.finally(() => { }); +ax.finallyDo(() => { }); + +ax.onErrorResumeNext(ax); + +ax.retry(10); +ax.retry(); diff --git a/ix.js/ix.d.ts b/ix.js/ix.d.ts index d138b007d5..614a950fbe 100644 --- a/ix.js/ix.d.ts +++ b/ix.js/ix.d.ts @@ -67,7 +67,7 @@ declare module Ix { finally(finallyAction: () => void): Enumerable; finallyDo(finallyAction: () => void): Enumerable; - onErrorResumeNext(second: Enumerable): Enumerable; + onErrorResumeNext(second: Enumerable): Enumerable; retry(retryCount?: number): Enumerable; } From 68427a3c830d6197c8c526745021031e902265c1 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sat, 26 Oct 2013 17:10:50 +0400 Subject: [PATCH 120/150] Added tests for Disposable, Enumerator, Dictionary, Lookup - added tests for all functions defined in l2o.d.ts in Disposable, Enumerator, Dictionary, Lookup - removed workaround definitions for spec#3.5.2 (it produced more problems) - fixed Lookup.toEnumerable --- ix.js/l2o-tests.ts | 73 ++++++++++++++++++++++++++++++++++++++++++---- ix.js/l2o.d.ts | 21 +------------ 2 files changed, 68 insertions(+), 26 deletions(-) diff --git a/ix.js/l2o-tests.ts b/ix.js/l2o-tests.ts index 4be2974b3e..2399d4e9fc 100644 --- a/ix.js/l2o-tests.ts +++ b/ix.js/l2o-tests.ts @@ -96,14 +96,14 @@ ax.singleOrDefault(); ax.forEach(a => console.log(a)); ax.forEach(a => console.log(a), cx); -bx.groupBy(b => b.length); +//bx.groupBy(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal bx.groupBy(b => b.length, b => "[" + b + "]"); bx.groupBy(b => b.length, b => "[" + b + "]", (l, values) => l + values.count()); bx.groupBy(b => b.length, false, (l, values) => l + values.count()); bx.groupBy(b => b.length, b => "[" + b + "]", (l, values) => l + values.count(), ec_nn); bx.groupBy(b => b.length, b => "[" + b + "]", false, (x, y) => x == y); bx.groupBy(b => b.length, false, (l, values) => l + values.count(), ec_nn); -bx.groupBy(b => b.length, false, false, ec_nn); +//bx.groupBy(b => b.length, false, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal ax.groupJoin(bx, a => a, b => b, (a, b) => [a, b], ec_ns); ax.groupJoin(bx, a => a, b => b.length, (a, b) => [a, b]); @@ -142,14 +142,14 @@ ax.takeWhile(a => a > 10); ax.toArray(); bx.toDictionary(b => b.length, b => 10, ec_nn); -bx.toDictionary(b => b.length, false, ec_nn); +//bx.toDictionary(b => b.length, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal bx.toDictionary(b => b.length, b => 10); -bx.toDictionary(b => b.length); +//bx.toDictionary(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal bx.toLookup(b => b.length, b => 10, ec_nn); -bx.toLookup(b => b.length, false, ec_nn); +//bx.toLookup(b => b.length, false, ec_nn); // spec 3.5.2, waiting for restriction on generative recursion removal bx.toLookup(b => b.length, b => 10); -bx.toLookup(b => b.length); +//bx.toLookup(b => b.length); // spec 3.5.2, waiting for restriction on generative recursion removal ax.where(a=> a > 10, {}); ax.where(a=> a > 10); @@ -158,3 +158,64 @@ ax.filter(a=> a > 10); ax.zip(bx, (a: number, b: string) => [a, b]); ax.zip(bx, (a, b) => [a, b]); + +// Disposable + +{ + var d: Ix.Disposable; + + d.dispose(); +} + +// Enumerator + +{ + var e: Ix.Enumerator; + + try { + while (e.moveNext()) { var c = e.getCurrent(); } + } + finally { + e.dispose(); + } +} + +// Dictionary + +{ + var dic = new Ix.Dictionary(0, ec_nn); + + var key = dic.toEnumerable().first().key; + var value = dic.toEnumerable().first().value; + + dic.add(1, "1"); + dic.remove(1); + dic.clear(); + dic.length(); + dic.tryGetValue(1); + dic.get(1); + dic.set(1, "1"); + dic.getValues(); + dic.has(1); +} + +// KeyValuePair + +{ + var kv: Ix.KeyValuePair; + var key = kv.key; + var value = kv.value; +} + +// Lookup + +{ + var lookup: Ix.Lookup; + + var key = lookup.toEnumerable().first().key; + lookup.toEnumerable().first().first(); + + lookup.has(1); + lookup.length(); + lookup.get(1).first(); +} \ No newline at end of file diff --git a/ix.js/l2o.d.ts b/ix.js/l2o.d.ts index 44a5efda43..c3f3c415e8 100644 --- a/ix.js/l2o.d.ts +++ b/ix.js/l2o.d.ts @@ -94,8 +94,6 @@ declare module Ix { // spec 3.5.2, waiting for restriction on generative recursion removal /*groupBy( keySelector: (item: T) => TKey): Grouping;*/ - groupBy( - keySelector: (item: T) => TKey): Grouping; // if need to set comparer without resultSelector groupBy( @@ -116,11 +114,6 @@ declare module Ix { _: boolean, __: boolean, comparer: EqualityComparer): Grouping;*/ - groupBy( - keySelector: (item: T) => TKey, - _: boolean, - __: boolean, - comparer: EqualityComparer): Grouping; groupJoin( inner: Enumerable, @@ -179,18 +172,12 @@ declare module Ix { // spec 3.5.2, waiting for restriction on generative recursion removal /*toDictionary( keySelector: (item: T) => TKey): Dictionary;*/ - toDictionary( - keySelector: (item: T) => TKey): Dictionary; // if need to set comparer without elementSelector // spec 3.5.2, waiting for restriction on generative recursion removal /*toDictionary( keySelector: (item: T) => TKey, _: boolean, comparer: EqualityComparer): Dictionary;*/ - toDictionary( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Dictionary; toLookup( keySelector: (item: T) => TKey, @@ -199,18 +186,12 @@ declare module Ix { // spec 3.5.2, waiting for restriction on generative recursion removal /*toLookup( keySelector: (item: T) => TKey): Lookup;*/ - toLookup( - keySelector: (item: T) => TKey): Lookup; // if need to set comparer without elementSelector // spec 3.5.2, waiting for restriction on generative recursion removal /*toLookup( keySelector: (item: T) => TKey, _: boolean, comparer: EqualityComparer): Lookup;*/ - toLookup( - keySelector: (item: T) => TKey, - _: boolean, - comparer: EqualityComparer): Lookup; where(selector: EnumerablePredicate, thisArg?: any): Enumerable; filter(selector: EnumerablePredicate, thisArg?: any): Enumerable; @@ -249,7 +230,7 @@ declare module Ix { } export interface Lookup { - toEnumerable(): Enumerable>; + toEnumerable(): Enumerable>; has(key: TKey): boolean; length(): number; get(key: TKey): Enumerable; From 030c0485dc2b619cfae8476e9624c0a3913a0494 Mon Sep 17 00:00:00 2001 From: kotas Date: Sat, 26 Oct 2013 23:50:02 +0900 Subject: [PATCH 121/150] Add definitions for Greasemonkey user script This commit adds greasemonkey.d.ts which defines global functions and global variables provided to user scripts running on Greasemonkey. --- README.md | 1 + greasemonkey/greasemonkey-tests.ts | 220 +++++++++++++++++++++++++++ greasemonkey/greasemonkey.d.ts | 235 +++++++++++++++++++++++++++++ 3 files changed, 456 insertions(+) create mode 100644 greasemonkey/greasemonkey-tests.ts create mode 100644 greasemonkey/greasemonkey.d.ts diff --git a/README.md b/README.md index 3484db60dc..143754d982 100755 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ List of Definitions * [Giraffe](https://github.com/barc/backbone.giraffe) (by [Matt McCray](https://github.com/darthapo)) * [glDatePicker](http://glad.github.com/glDatePicker/) (by [Dániel Tar](https://github.com/qcz)) * [GoJS](http://gojs.net/) (by [Barbara Duckworth](https://github.com/barbara42)) +* [Greasemonkey](http://www.greasespot.net/) (by [Kota Saito](https://github.com/kotas)) * [GreenSock Animation Platform (GSAP)](http://www.greensock.com/get-started-js/) (by [Robert S.](https://github.com/codeBelt)) * [Grunt JS](http://gruntjs.com/) (by [Basarat Ali Syed](https://github.com/basarat)) * [Google API Client](https://code.google.com/p/google-api-javascript-client/) (by [Frank M](https://github.com/sgtfrankieboy)) diff --git a/greasemonkey/greasemonkey-tests.ts b/greasemonkey/greasemonkey-tests.ts new file mode 100644 index 0000000000..914c8f4e3d --- /dev/null +++ b/greasemonkey/greasemonkey-tests.ts @@ -0,0 +1,220 @@ +/// + +//////////////// +// Global variable +//////////////// + +var title: string = unsafeWindow.document.title; + +var scriptDescription: string = GM_info.script.description; +var scriptExcludes: string[] = GM_info.script.excludes; +var scriptIncludes: string[] = GM_info.script.includes; +var scriptMatches: string[] = GM_info.script.matches; +var scriptName: string = GM_info.script.name; +var scriptNamespace: string = GM_info.script.namespace; +var scriptResouces: Object = GM_info.script.resources; +var scriptRunAt: string = GM_info.script['run-at']; +var scriptUnwrap: boolean = GM_info.script.unwrap; +var scriptVersion: string = GM_info.script.version; +var scriptMetsStr: string = GM_info.scriptMetaStr; +var scriptWillUpdate: boolean = GM_info.scriptWillUpdate; +var gmVersion: string = GM_info.version; + +//////////////// +// Values +//////////////// + +GM_setValue('a', 'foobar'); +GM_setValue('b', 123); +GM_setValue('c', true); +GM_setValue('d', null); +// NG: GM_setValue('x', new Date()); + +var a: string = GM_getValue('a', 'foobar'); +var b: number = GM_getValue('b', 123); +var c: boolean = GM_getValue('c', true); +var d: any = GM_getValue('d', null); +var e: string = GM_getValue('e'); +var f: number = GM_getValue('f'); +var g: boolean = GM_getValue('g'); +// NG: var x: string = GM_getValue('x', 123); + +GM_deleteValue('d'); + +GM_listValues().forEach((name: string) => { + console.log(name + ":", GM_getValue(name)); +}); + +//////////////// +// Resources +//////////////// + +var prototypeSource: string = GM_getResourceText('prototype'); +var prototypeURL: string = GM_getResourceURL('prototype'); + +//////////////// +// Utilities +//////////////// + +GM_addStyle("body { color: white; background-color: black; } img { border: 0; }"); + +GM_log("Hello, World!"); + +GM_openInTab("http://www.example.com/"); + +GM_registerMenuCommand("Hello, world (simple)", helloSimple); +GM_registerMenuCommand("Hello, world!", hello, "h"); +// NG (Old Style): GM_registerMenuCommand("Hello, world! (again)", hello2, "e", "shift alt", "w"); +function helloSimple() {} +function hello() {} + +GM_setClipboard('http://www.example.com/short-url-code'); + +//////////////// +// XMLHttpRequest +//////////////// + +//// Examples from Greasemonkey Wiki + +// Bare Minimum + +GM_xmlhttpRequest({ + method: "GET", + url: "http://www.example.com/", + onload: function(response) { + alert(response.responseText); + } +}); + +// GET request + +GM_xmlhttpRequest({ + method: "GET", + url: "http://www.example.net/", + headers: { + "User-Agent": "Mozilla/5.0", // If not specified, navigator.userAgent will be used. + "Accept": "text/xml" // If not specified, browser defaults will be used. + }, + onload: function(response) { + var responseXML = response.responseXML; + // Inject responseXML into existing Object (only appropriate for XML content). + if (!response.responseXML) { + responseXML = new DOMParser() + .parseFromString(response.responseText, "text/xml"); + } + + GM_log([ + response.status, + response.statusText, + response.readyState, + response.responseHeaders, + response.responseText, + response.finalUrl, + responseXML + ].join("\n")); + } +}); + +// POST request + +GM_xmlhttpRequest({ + method: "POST", + url: "http://www.example.net/login", + data: "username=johndoe&password=xyz123", + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + onload: function(response) { + if (response.responseText.indexOf("Logged in as") > -1) { + location.href = "http://www.example.net/dashboard"; + } + } +}); + +// HEAD request + +GM_xmlhttpRequest({ + url: "http://www.example.com", + method: "HEAD", + onload: function(response) { + GM_log(response.responseHeaders); + } +}); + +//// Checkk all options + +var result = GM_xmlhttpRequest({ + binary: false, + context: {}, + data: 'foo=1&bar=2', + headers: { 'User-Agent': 'greasemonkey' }, + method: 'POST', + onabort: (response: GMXMLHttpRequestResponse) => { }, + onerror: (response: GMXMLHttpRequestResponse) => { }, + onload: (response: GMXMLHttpRequestResponse) => { }, + onprogress: (response: GMXMLHttpRequestProgressResponse) => { }, + onreadystatechange: (response: GMXMLHttpRequestResponse) => { }, + ontimeout: (response: GMXMLHttpRequestResponse) => { }, + overrideMimeType: 'text/plain', + password: 'abc123', + synchronous: false, + timeout: 10, + upload: { + onabort: (response: GMXMLHttpRequestResponse) => { }, + onerror: (response: GMXMLHttpRequestResponse) => { }, + onload: (response: GMXMLHttpRequestResponse) => { }, + onprogress: (response: GMXMLHttpRequestProgressResponse) => { } + }, + url: 'http://example.com/', + user: 'guest' +}); + +//// Check responses + +GM_xmlhttpRequest({ + method: 'GET', + url: 'http://example.com/', + onload: (response: GMXMLHttpRequestResponse) => { + var readyState: number = response.readyState; + var responseHeaders: string = response.responseHeaders; + var responseText: string = response.responseText; + var status: number = response.status; + var statusText: string = response.statusText; + var context: any = response.context; + var finalUrl: string = response.finalUrl; + // NG: var loaded: number = response.loaded; + }, + onprogress: (response: GMXMLHttpRequestProgressResponse) => { + var status: number = response.status; + var lengthComputable: boolean = response.lengthComputable; + var loaded: number = response.loaded; + var total: number = response.total; + } +}); + +//// Synchronous + +var syncResult: GMXMLHttpRequestSyncResult = GM_xmlhttpRequest({ + method: 'GET', + url: 'http://example.com/', + synchronous: true +}); + +syncResult.abort(); +var finalUrl: string = syncResult.finalUrl; +var readyState: number = syncResult.readyState; +var responseHeaders: string = syncResult.responseHeaders; +var responseText: string = syncResult.responseText; +var status: number = syncResult.status; +var statusText: string = syncResult.statusText; + +//// Asynchronous + +var asyncResult: GMXMLHttpRequestAsyncResult = GM_xmlhttpRequest({ + method: 'GET', + url: 'http://example.com/', + synchronous: false +}); + +asyncResult.abort(); +// NG: var status: number = asyncResult.status; diff --git a/greasemonkey/greasemonkey.d.ts b/greasemonkey/greasemonkey.d.ts new file mode 100644 index 0000000000..27abcfa7f6 --- /dev/null +++ b/greasemonkey/greasemonkey.d.ts @@ -0,0 +1,235 @@ +// Type definitions for Greasemonkey +// Project: http://www.greasespot.net/ +// Definitions by: Kota Saito +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// This definition is based on the API reference of Greasemonkey. +// http://wiki.greasespot.net/Greasemonkey_Manual:API + +//////////////// +// Global variable +//////////////// + +/** + * Window object of the content page where the user script is running on. + * @see {@link http://wiki.greasespot.net/UnsafeWindow} + */ +declare var unsafeWindow: Window; + +/** + * Meta data about the running user script. + * @see {@link http://wiki.greasespot.net/GM_info} + */ +declare var GM_info: { + script: { + description: string; + excludes: string[]; + includes: string[]; + matches: string[]; + name: string; + namespace: string; + resources: Object; + "run-at": string; + unwrap: boolean; + version: string; + }; + scriptMetaStr: string; + scriptWillUpdate: boolean; + version: string; +}; + +//////////////// +// Values +//////////////// + +/** + * Deletes an existing name / value pair from the script storage. + * @param name a name of the pair to delete. + * @see {@link http://wiki.greasespot.net/GM_deleteValue} + */ +declare function GM_deleteValue(name: string): void; + +/** + * Retrieves a value from the script storage. + * @param name a name to retrieve. + * @param defaultValue a value to be returned when the name does not exist. + * @returns a retrieved value, or passed default value, or undefined. + * @see {@link http://wiki.greasespot.net/GM_getValue} + */ +declare function GM_getValue(name: string, defaultValue?: any): any; +declare function GM_getValue(name: string, defaultValue?: string): string; +declare function GM_getValue(name: string, defaultValue?: number): number; +declare function GM_getValue(name: string, defaultValue?: boolean): boolean; + +/** + * Retrieves an array of names stored in the script storage. + * @returns an array of names in the storage. + * @see {@link http://wiki.greasespot.net/GM_listValues} + */ +declare function GM_listValues(): string[]; + +/** + * Stores a name / value pair to the script storage. + * @param name a name of the pair. + * @param value a value to be stored. + * @see {@link http://wiki.greasespot.net/GM_setValue} + */ +declare function GM_setValue(name: string, value: string): void; +declare function GM_setValue(name: string, value: boolean): void; +declare function GM_setValue(name: string, value: number): void; + +//////////////// +// Resources +//////////////// + +/** + * Gets a content of a resouce defined by {@link http://wiki.greasespot.net/Metadata_Block#.40resource|@resource}. + * @param resourceName a name of the resource to get. + * @returns the content of the resource. + * @see {@link http://wiki.greasespot.net/GM_getResourceText} + */ +declare function GM_getResourceText(resourceName: string): string; + +/** + * Gets a URL of a resource defined by {@link http://wiki.greasespot.net/Metadata_Block#.40resource|@resource}. + * @param resourceName a name of the resource. + * @returns a URL that returns the content of the resource. + * @see {@link http://wiki.greasespot.net/GM_getResourceURL} + */ +declare function GM_getResourceURL(resourceName: string): string; + +//////////////// +// Utilities +//////////////// + +/** + * Adds CSS to the content page. + * @param css a CSS string. It can have multiple style definitions. + * @see {@link http://wiki.greasespot.net/GM_addStyle} + */ +declare function GM_addStyle(css: string): void; + +/** + * Writes a message as a log to the console with the script identifier. + * @param message a message to be written. + * @see {@link http://wiki.greasespot.net/GM_log} + */ +declare function GM_log(message: any): void; + +/** + * Opens a URL in a new tab. + * @param url a URL to open. + * @returns window object of the opened tab. + * @see {@link http://wiki.greasespot.net/GM_openInTab} + */ +declare function GM_openInTab(url: string): Window; + +/** + * Registers an item as a submenu of User Script Commands. + * @param caption a caption of the menu item. + * @param commandFunc a function to be invoked when the item has been selected. + * @param accessKey a single character that can be used to select the item by keyboard. + * It should be a letter in the caption. + * @see {@link http://wiki.greasespot.net/GM_registerMenuCommand} + */ +declare function GM_registerMenuCommand(caption: string, commandFunc: Function, accessKey?: string): void; + +/** + * Sets a text to the clipboard of the opeating system. + * @param text a text to be set to the clipboard. + * @see {@link http://wiki.greasespot.net/GM_setClipboard} + */ +declare function GM_setClipboard(text: string): void; + +//////////////// +// XMLHttpRequest +//////////////// + +/** + * Request options for {@link GM_xmlhttpRequest}. + * @see {@link http://wiki.greasespot.net/GM_xmlhttpRequest#Arguments} + */ +interface GMXMLHttpRequestOptions { + binary?: boolean; + context?: any; + data?: string; + headers?: Object; + method: string; + onabort?: (response: GMXMLHttpRequestResponse) => any; + onerror?: (response: GMXMLHttpRequestResponse) => any; + onload?: (response: GMXMLHttpRequestResponse) => any; + onprogress?: (response: GMXMLHttpRequestProgressResponse) => any; + onreadystatechange?: (response: GMXMLHttpRequestResponse) => any; + ontimeout?: (response: GMXMLHttpRequestResponse) => any; + overrideMimeType?: string; + password?: string; + synchronous?: boolean; + timeout?: number; + upload?: { + onabort?: (response: GMXMLHttpRequestResponse) => any; + onerror?: (response: GMXMLHttpRequestResponse) => any; + onload?: (response: GMXMLHttpRequestResponse) => any; + onprogress?: (response: GMXMLHttpRequestProgressResponse) => any; + }; + url: string; + user?: string; +} + +/** + * Response object for general events of {@link GM_xmlhttpRequest}. + * @see {@link http://wiki.greasespot.net/GM_xmlhttpRequest#Response_Object} + */ +interface GMXMLHttpRequestResponse { + readyState: number; + responseHeaders: string; + responseText: string; + status: number; + statusText: string; + context: any; + finalUrl: string; +} + +/** + * Response object for onprogress event of {@link GM_xmlhttpRequest}. + */ +interface GMXMLHttpRequestProgressResponse extends GMXMLHttpRequestResponse { + lengthComputable: boolean; + loaded: number; + total: number; +} + +/** + * Returned object by {@link GM_xmlhttpRequest} in asynchronous mode. + */ +interface GMXMLHttpRequestAsyncResult { + abort(): void; +} + +/** + * Returned object by {@link GM_xmlhttpRequest} in synchronouse mode. + */ +interface GMXMLHttpRequestSyncResult { + abort(): void; + finalUrl: string; + readyState: number; + responseHeaders: string; + responseText: string; + status: number; + statusText: string; +} + +/** + * Returned object by {@link GM_xmlhttpRequest}. + * @see {@link http://wiki.greasespot.net/GM_xmlhttpRequest#Returns} + */ +interface GMXMLHttpRequestResult extends GMXMLHttpRequestAsyncResult, GMXMLHttpRequestSyncResult { +} + +/** + * Sends a HTTP request to a URL. + * @param options options and callbacks for HTTP request. + * @returns an object which can abort the request. + * If the request is sent in the synchronous mode, it also contains the response information. + * @see {@link http://wiki.greasespot.net/GM_setClipboard} + */ +declare function GM_xmlhttpRequest(options: GMXMLHttpRequestOptions): GMXMLHttpRequestResult; From 80c04d04091423692f736299298aab2ce259467b Mon Sep 17 00:00:00 2001 From: gandjustas Date: Sat, 26 Oct 2013 18:53:49 +0400 Subject: [PATCH 122/150] Added chrome control, ClientPeoplePicker and Reputation definitions. --- sharepoint/SharePoint.d.ts | 342 +++++++++++++++++++++++++++++++++---- 1 file changed, 310 insertions(+), 32 deletions(-) diff --git a/sharepoint/SharePoint.d.ts b/sharepoint/SharePoint.d.ts index fd34582c8e..4671ba19e2 100644 --- a/sharepoint/SharePoint.d.ts +++ b/sharepoint/SharePoint.d.ts @@ -3,6 +3,8 @@ // Definitions by: Stanislav Vyshchepan and Andrey Markeev // Definitions: https://github.com/borisyankov/DefinitelyTyped + + declare module Sys { export class EventArgs { static Empty: Sys.EventArgs; @@ -25,12 +27,40 @@ declare module Sys { initialize(): void; updated(): void; } + + export interface IContainer { + addComponent(component: Component): void; + findComponent(id: string): Component; + getComponents(): Component[]; + removeComponent(component: Component); + } + + export class Application extends Component implements IContainer { + addComponent(component: Component): void; + findComponent(id: string): Component; + getComponents(): Component[]; + removeComponent(component: Component); + + static add_load(handler: (sender: Application, eventArgs: ApplicationLoadEventArgs) => void); + static remove_load(handler: (sender: Application, eventArgs: ApplicationLoadEventArgs) => void); + } + + export class ApplicationLoadEventArgs { + constructor(components: Component[], isPartialLoad: boolean); + public components: Component[]; + public isPartialLoad: boolean; + } + module UI { - export class Control { } + export class Control extends Component { } export class DomEvent { static addHandler(element: HTMLElement, eventName: string, handler: (e: Event) => void); static removeHandler(element: HTMLElement, eventName: string, handler: (e: Event) => void); } + + export class DomElement { + static getBounds(element: HTMLElement): { x: number; y: number; width: number; height: number; }; + } } module Net { export class WebRequest { @@ -1210,7 +1240,7 @@ declare module SPClientTemplates { export interface TemplateOverrides { View?: (renderContext: any) => string; // TODO: determine appropriate context type and purpose of this template - Body?: (renderContext: any) => string; // TODO: determine appropriate context type and purpose of this template + Body?: (renderContext: any) => string; // TODO: determine appropriate context type and purpose of this template /** Defines templates for rendering groups (aggregations). */ Group?: GroupCallback; /** Defines templates for list items rendering. */ @@ -1234,10 +1264,10 @@ declare module SPClientTemplates { /** �allbacks called after rendered html inserted into DOM. Can be function (ctx: RenderContext) => void or array of functions.*/ OnPostRender?: any; - /** View style (SPView.StyleID) for which the templates should be applied. + /** View style (SPView.StyleID) for which the templates should be applied. If not defined, the templates will be applied only to default view style. */ ViewStyle?: number; - /** List template type (SPList.BaseTemplate) for which the template should be applied. + /** List template type (SPList.BaseTemplate) for which the template should be applied. If not defined, the templates will be applied to all lists. */ ListTemplateType?: number; /** Base view ID (SPView.BaseViewID) for which the template should be applied. @@ -2400,12 +2430,12 @@ declare module SP { /** Specifies a Collaborative Application Markup Language (CAML) query on a list. */ export class CamlQuery extends SP.ClientValueObject { constructor(); - /** This method creates a Collaborative Application Markup Language (CAML) string - that can be used to recursively get all of the items in a list, including + /** This method creates a Collaborative Application Markup Language (CAML) string + that can be used to recursively get all of the items in a list, including the items in the subfolders. */ static createAllItemsQuery(): SP.CamlQuery; - /** This method creates a Collaborative Application Markup Language (CAML) string - that can be used to recursively get all of the folders in a list, including + /** This method creates a Collaborative Application Markup Language (CAML) string + that can be used to recursively get all of the folders in a list, including the subfolders. */ static createAllFoldersQuery(): SP.CamlQuery; /** Returns true if the query returns dates in Coordinated Universal Time (UTC) format. */ @@ -5817,7 +5847,7 @@ declare module SP { /** Contains information about an actor retrieved from server. An actor is a user, document, site, or tag. */ export class SocialActor extends SP.ClientValueObject { - /** The AccountName property returns the user account name. + /** The AccountName property returns the user account name. This property is only available for social actors of type "user". */ get_accountName(): string; /** Identifies whether the actor is a user, document, site, or tag. */ @@ -5848,7 +5878,7 @@ declare module SP { get_personalSiteUri(): string; /** Represents the status of retrieving the actor */ get_status(): SocialStatusCode; - /** The StatusText property returns the most recent post of the user. + /** The StatusText property returns the most recent post of the user. This property is only available for social actors of type "user". */ get_statusText(): string; /** Returns the GUID of the tag. @@ -5863,10 +5893,10 @@ declare module SP { /** Identifies an actor to the server. An actor can be a user, document, site, or tag. */ export class SocialActorInfo extends SP.ClientValueObject { - /** User account name. + /** User account name. This property is only available for social actors of type "user". */ get_accountName(): string; - /** User account name. + /** User account name. This property is only available for social actors of type "user". */ set_accountName(value: string): string; /** Identifies whether the actor is a user, document, site, or tag. */ @@ -5977,7 +6007,7 @@ declare module SP { } /** Provides information about an overlay. - An overlay is a substring in a post that represents a user, document, site, tag, or link. + An overlay is a substring in a post that represents a user, document, site, tag, or link. The SocialPost class contains an array of SocialDataOverlay objects. Each of the SocialDataOverlay objects specifies a link or one or more actors. */ export class SocialDataOverlay extends SP.ClientValueObject { @@ -6014,8 +6044,8 @@ declare module SP { The most recent post that was requested can be removed from the feed if the current user does not have access to it. Consequently, the feed does not always contain the post with the date specified in this property. */ get_newestProcessed(): string; - /** The OldestProcessed property returns the date-time of the oldest post that was requested. - The oldest post that was requested can be removed from the feed if the current user does not have access to it. + /** The OldestProcessed property returns the date-time of the oldest post that was requested. + The oldest post that was requested can be removed from the feed if the current user does not have access to it. Consequently, the feed does not always contain the post with the date specified in this property */ get_oldestProcessed(): string; /** Contains the social threads in the feed. */ @@ -6032,7 +6062,7 @@ declare module SP { get_owner(): SocialActor; /** Specifies the URI of the personal site portal. */ get_personalSitePortalUri(): string; - /** Creates a post in the current user's newsfeed, in the specified user's feed, or in the specified thread. + /** Creates a post in the current user's newsfeed, in the specified user's feed, or in the specified thread. This method returns a new or a modified thread. @param targetId Optional, specifies the target of the post. If this parameter is null, the post is created as a root post in the current user's feed. @@ -6065,19 +6095,19 @@ declare module SP { getFullThread(threadId: string): SocialThread; /** Returns a feed containing mention reference threads from the current user's personal feed. */ getMentions(clearUnreadMentions: boolean, options: SocialFeedOptions): SocialFeed; - /** Returns the server's count of unread mentions of the current user. - The server maintains a count of unread mentions in posts, but does not track which mentions have been read. - When a new mention is stored on the server, it increments the unread mention for the user specified by the mention. + /** Returns the server's count of unread mentions of the current user. + The server maintains a count of unread mentions in posts, but does not track which mentions have been read. + When a new mention is stored on the server, it increments the unread mention for the user specified by the mention. The unread mention count is cleared by the GetMentions method. */ getUnreadMentionCount(): SP.IntResult; - /** Specifies that the current user likes the specified post. - Returns a digest thread containing the specified post. + /** Specifies that the current user likes the specified post. + Returns a digest thread containing the specified post. A digest thread contains the root post and a selection of reply posts */ likePost(postId: string): SocialThread; - /** Specifies that the current user does not like the specified post. + /** Specifies that the current user does not like the specified post. Returns a digest thread containing the specified post. */ unlikePost(postId: string): SocialThread; - /** Prevents any user from adding a new reply post to the specified thread. + /** Prevents any user from adding a new reply post to the specified thread. Once a thread is locked, no new reply posts can be added until after the thread has been unlocked with the unlockThread method. This method returns a digest of the locked thread */ lockThread(threadId: string): SocialThread; @@ -6117,9 +6147,9 @@ declare module SP { get_followedSitesUri(): string; /** Adds the specified actor to the current user's list of followed items. Returns one of the following values, wrapped into the SP.IntResult object: - 0 = ok, - 1 = alreadyFollowing, - 2 = limitReached, + 0 = ok, + 1 = alreadyFollowing, + 2 = limitReached, 3 = internalError */ follow(actor: SocialActorInfo): SP.IntResult; stopFollowing(actor: SocialActorInfo): SP.BooleanResult; @@ -6252,10 +6282,10 @@ declare module SP { get_text(): string; /** Specifies the text that is substituted for the placeholder */ set_text(value: string): string; - /** Specifies the URI of the document, site, or link. + /** Specifies the URI of the document, site, or link. This property is only available if the ItemType property specifies that the item is a Document, Link, or Site. */ get_uri(): string; - /** Specifies the URI of the document, site, or link. + /** Specifies the URI of the document, site, or link. This property is only available if the ItemType property specifies that the item is a Document, Link, or Site. */ set_uri(value: string): string; } @@ -7060,6 +7090,93 @@ declare module SP { } } +declare module SP { + export module UI { + export module Controls { + + export interface INavigationOptions { + assetId?: string; + siteTitle?: string; + siteUrl?: string; + appTitle?: string; + appTitleIconUrl?: string; + rightToLeft?: boolean; + appStartPage?: string; + appIconUrl?: string; + appHelpPageUrl?: string; + appHelpPageOnClick?: string; + settingsLinks?: ISettingsLink[]; + language?: string; + clientTag?: string; + appWebUrl?: string; + onCssLoaded?: string; + + + bottomHeaderVisible?: boolean; + topHeaderVisible?: boolean; + } + + export class NavigationOptions implements INavigationOptions { } + + + export interface ISettingsLink { + linkUrl: string; + displayName: string; + } + + export class SettingsLink implements ISettingsLink { + linkUrl: string; + displayName: string; + } + + + export class Navigation { + constructor(placeholderDOMElementId: string, options: INavigationOptions); + public get_assetId(): string; + public get_siteTitle(): string; + public get_siteUrl(): string; + + public get_appTitle(): string; + public set_appTitle(value: string): string; + + public get_appTitleIconUrl(): string; + public set_appTitleIconUrl(value: string): string; + + public get_rightToLeft(): boolean; + public set_rightToLeft(value: boolean): boolean; + + public get_appStartPage(): string; + public set_appStartPage(value: string): string; + + public get_appIconUrl(): string; + public set_appIconUrl(value: string): string; + + public get_appHelpPageUrl(): string; + public set_appHelpPageUrl(value: string): string; + + public get_appHelpPageOnClick(): string; + public set_appHelpPageOnClick(value: string): string; + + public get_settingsLinks(): ISettingsLink[]; + public set_settingsLinks(value: ISettingsLink[]): ISettingsLink[]; + + public setVisible(value: boolean): void; + + public setTopHeaderVisible(value: boolean): void; + public setBottomHeaderVisible(value: boolean): void; + public remove(): void; + + static getVersionedLayoutsUrl(pageName: string): string; + } + + + export class ControlManager { + static getControl(placeHolderId: string): any; + } + } + } +} + declare module SP { export module UserProfiles { @@ -7223,7 +7340,7 @@ declare module SP { /** Specifies the person's title. */ get_title(): string; /** Represents all user profile properties including custom. - The privacy settings affect which properties can be retrieved. + The privacy settings affect which properties can be retrieved. Multiple values are delimited by the vertical bar "|". Null values are specified as empty strings. */ get_userProfileProperties(): { [name: string]: string; }; @@ -7312,7 +7429,7 @@ declare module SP { /** Updates the properties for followed item with specified URL. @param url URL that identifies the followed item. The url parameter can identify an existing document or site using the url property of the original item. - The url parameter can also identify a document with the following format: http://host/site?listId=&itemId= + The url parameter can also identify a document with the following format: http://host/site?listId=&itemId= @param data Application-defined data stored with the followed item. */ updateData(url: string, data: FollowedItemData): void; /** Returns the refreshed item that is being pointed to in the Social list. @@ -7382,11 +7499,11 @@ declare module SP { /** Specifies the site identification (GUID) in the Content database for this item if this item is a site, or for its parent site if this item is not a site. */ set_siteId(value: string): string; /** Specifies the subtype of this item. - If the ItemType is Site, the Subtype specifies the web template identification. + If the ItemType is Site, the Subtype specifies the web template identification. If the ItemType is Document, the Subtype has a value of 1. */ get_subtype(): number; /** Specifies the subtype of this item. - If the ItemType is Site, the Subtype specifies the web template identification. + If the ItemType is Site, the Subtype specifies the web template identification. If the ItemType is Document, the Subtype has a value of 1. */ set_subtype(value: number): number; /** Specifies the item of this item */ @@ -8164,3 +8281,164 @@ interface ISPClientAutoFillData { AutoFillMenuOptionType?: number; } +declare class SPClientPeoplePicker { + static ValueName: string; // = 'Key'; + static DisplayTextName: string; // = 'DisplayText'; + static SubDisplayTextName: string; // = 'Title'; + static DescriptionName: string; // = 'Description'; + static SIPAddressName: string; // = 'SIPAddress'; + static SuggestionsName: string; // = 'MultipleMatches'; + static UnvalidatedEmailAddressKey: string; // = "UNVALIDATED_EMAIL_ADDRESS"; + static KeyProperty: string; // = 'AutoFillKey'; + static DisplayTextProperty: string; // = 'AutoFillDisplayText'; + static SubDisplayTextProperty: string; // = 'AutoFillSubDisplayText'; + static TitleTextProperty: string; // = 'AutoFillTitleText'; + static DomainProperty: string; // = 'DomainText'; + + static SPClientPeoplePickerDict: { + [pickerIelementId: string]: SPClientPeoplePicker; + }; + + static InitializeStandalonePeoplePicker(clientId: string, value: ISPClientPeoplePickerEntity[], schema: ISPClientPeoplePickerSchema): void; + + public TopLevelElementId: string;// '', + public EditorElementId: string;//'', + public AutoFillElementId: string;//'', + public ResolvedListElementId: string;//'', + public InitialHelpTextElementId: string;//'', + public WaitImageId: string;//'', + public HiddenInputId: string;//'', + public AllowEmpty: boolean;//true, + public ForceClaims: boolean;//false, + public AutoFillEnabled: boolean;//true, + public AllowMultipleUsers: boolean;//false, + public OnValueChangedClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + public OnUserResolvedClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + public OnControlValidateClientScript: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + public UrlZone: string;//null, + public AllUrlZones: boolean;//false, + public SharePointGroupID: number;//0, + public AllowEmailAddresses: boolean;//false, + public PPMRU: SPClientPeoplePickerMRU; + public UseLocalSuggestionCache: boolean;//true, + public CurrentQueryStr: string;//'', + public LatestSearchQueryStr: string;// '', + public InitialSuggestions: ISPClientPeoplePickerEntity[]; + public CurrentLocalSuggestions: ISPClientPeoplePickerEntity[]; + public CurrentLocalSuggestionsDict: ISPClientPeoplePickerEntity; + public VisibleSuggestions: number;//5, + public PrincipalAccountType: string;//'', + public PrincipalAccountTypeEnum: SP.Utilities.PrincipalType; + public EnabledClaimProviders: string;//'', + public SearchPrincipalSource: SP.Utilities.PrincipalSource;//null, + public ResolvePrincipalSource: SP.Utilities.PrincipalSource;//null, + public MaximumEntitySuggestions: number;//30, + public EditorWidthSet: boolean;//false, + public QueryScriptInit: boolean;//false, + public AutoFillControl: string;//null, + public TotalUserCount: number;//0, + public UnresolvedUserCount: number;//0, + public UserQueryDict: ISPClientPeoplePickerEntity; + public ProcessedUserList: ISPClientPeoplePickerEntity; + public HasInputError: boolean;//false, + public HasServerError: boolean;//false, + public ShowUserPresence: boolean;//true, + public TerminatingCharacter: string;//';', + public UnresolvedUserElmIdToReplace: string;//'', + public WebApplicationID: SP.Guid;//'{00000000-0000-0000-0000-000000000000}', + + public GetAllUserInfo(): ISPClientPeoplePickerEntity[]; +} + +interface ISPClientPeoplePickerSchema { + TopLevelElementId?: string; + EditorElementId?: string; + AutoFillElementId?: string; + ResolvedListElementId?: string; + InitialHelpTextElementId?: string; + WaitImageId?: string; + HiddenInputId?: string; + + AllowMultipleValues?: boolean; + Required?: boolean; + AutoFillEnabled?: boolean; + ForceClaims?: boolean; + AllowEmailAddresses?: boolean; + AllUrlZones?: boolean; + UseLocalSuggestionCache?: boolean; + UserNoQueryPermission?: boolean; + + VisibleSuggestions?: number; + MaximumEntitySuggestions?: number; + + ErrorMessage?: string; + InitialHelpText?: string; + + InitialSuggestions?: ISPClientPeoplePickerEntity[]; + + + UrlZone?: SP.UrlZone; + WebApplicationID?: SP.Guid; + SharePointGroupID?: number; + + /** Specify User, DL, SecGroup or SPGroup*/ + PrincipalAccountType?: string; + + EnabledClaimProvider?: string; + ResolvePrincipalSource?: SP.Utilities.PrincipalSource; + SearchPrincipalSource?: SP.Utilities.PrincipalSource; + + OnUserResolvedClientScript?: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + OnValueChangedClientScript?: (pickerElementId: string, users: ISPClientPeoplePickerEntity[]) => void; + + /** Number or '100%'*/ + Width?: any; + + Rows?: number; + +} + +declare class SPClientPeoplePickerMRU { + static PPMRUVersion: number;// = 1; + static MaxPPMRUItems: number;// = 200; + static PPMRUDomLocalStoreKey: string;// = "ClientPeoplePickerMRU"; + static GetSPClientPeoplePickerMRU(): SPClientPeoplePickerMRU; + + GetItems(strKey: string): Object[]; + SetItem(strSearchTerm: string, objEntity: Object): void; + ResetCache(): void; +} + +interface ISPClientPeoplePickerEntity { + Key?: string; + Description?: string; + DisplayText?: string; + EntityType?: string; + ProviderDisplayName?: string; + ProviderName?: string; + IsResolved?: boolean; + EntityData?: { + Title: string; + MobilePhone: string; + Department: string; + Email: string; + }; + MultipleMatches: Object[]; + DomainText?: string; + [key: string]: any; +} + +declare module Microsoft { + export module Office { + export module Server { + export module ReputationModel { + export class Reputation { + constructor(); + static setLike(context: SP.ClientContext, listId: string, itemId: number, like: boolean); + static setRating(context: SP.ClientContext, listId: string, itemId: number, rating: number); + } + } + } + } +} + From 107312a84bd0abe95abd84e4acc93d4066e514ac Mon Sep 17 00:00:00 2001 From: studiollama Date: Sat, 26 Oct 2013 13:32:45 -0700 Subject: [PATCH 123/150] Added controllerAs to IRoute --- angularjs/angular-route.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts index 224adcba75..b8d1db50b5 100644 --- a/angularjs/angular-route.d.ts +++ b/angularjs/angular-route.d.ts @@ -34,6 +34,7 @@ declare module ng.route { // see http://docs.angularjs.org/api/ngRoute.$routeProvider#when for options explanations interface IRoute { controller?: any; + controllerAs?: any; name?: string; template?: string; templateUrl?: any; From 3039e58e381c375b9c53fafe21902736846f88d4 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sun, 27 Oct 2013 21:44:37 +0400 Subject: [PATCH 124/150] Fixed inheritance and function definitions in Kockout - fixed inheritance - fixed fn definitions - *Functions interfaces made generic to allow generic extensions - added more options in KnockoutComputedDefintion --- knockout/knockout.d.ts | 83 +++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 46 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 08f7bc88b1..63f9938943 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -4,25 +4,18 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface KnockoutSubscribableFunctions { - extend(source); - dispose(): void; - peek(): any; - valueHasMutated(): void; - - valueWillMutate(): void; +interface KnockoutSubscribableFunctions { + notifySubscribers(valueToWrite: T, event?: string); } -interface KnockoutComputedFunctions extends KnockoutSubscribableFunctions { - getDependenciesCount(): number; - getSubscriptionsCount(): number; - hasWriteFunction(): boolean; +interface KnockoutComputedFunctions { } -interface KnockoutObservableFunctions extends KnockoutSubscribableFunctions { +interface KnockoutObservableFunctions { + equalityComparer(a: any, b: any): boolean; } -interface KnockoutObservableArrayFunctions extends KnockoutObservableFunctions { +interface KnockoutObservableArrayFunctions { // General Array functions indexOf(searchElement: T, fromIndex?: number): number; slice(start: number, end?: number): T[]; @@ -49,18 +42,26 @@ interface KnockoutObservableArrayFunctions extends KnockoutObservableFunction } interface KnockoutSubscribableStatic { - fn: KnockoutSubscribableFunctions; + fn: KnockoutSubscribableFunctions; - new (): KnockoutSubscription; + new (): KnockoutSubscribable; } -interface KnockoutSubscription extends KnockoutSubscribableFunctions { - subscribe(callback: (newValue: any) => void, target?:any, topic?: string): KnockoutSubscription; - notifySubscribers(valueToWrite, topic?: string); +interface KnockoutSubscription { + dispose(): void; +} + +interface KnockoutSubscribable extends KnockoutSubscribableFunctions { + (): T; + (value: T): void; + + subscribe(callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription; + extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable; + getSubscriptionsCount(): number; } interface KnockoutComputedStatic { - fn: KnockoutComputedFunctions; + fn: KnockoutComputedFunctions; (): KnockoutComputed; (func: () => T, context?: any, options?: any): KnockoutComputed; @@ -68,51 +69,41 @@ interface KnockoutComputedStatic { (options?: any): KnockoutComputed; } -interface KnockoutComputed extends KnockoutComputedFunctions { - (): T; - (value: T): void; - - subscribe(callback: (newValue: T) => void, target?:any, topic?: string): KnockoutSubscription; - notifySubscribers(valueToWrite: T, topic?: string); +interface KnockoutComputed extends KnockoutSubscribable, KnockoutComputedFunctions { + peek(): T; + dispose(): void; + isActive(): boolean; + getDependenciesCount(): number; } interface KnockoutObservableArrayStatic { - fn: KnockoutObservableArrayFunctions; (value?: T[]): KnockoutObservableArray; } -interface KnockoutObservableArray extends KnockoutObservableArrayFunctions { - (): T[]; - (value: T[]): void; - - subscribe(callback: (newValue: T[]) => void, target?:any, topic?: string): KnockoutSubscription; - notifySubscribers(valueToWrite: T[], topic?: string); +interface KnockoutObservableArray extends KnockoutObservable, KnockoutObservableArrayFunctions { } interface KnockoutObservableStatic { - fn: KnockoutObservableFunctions; + fn: KnockoutObservableFunctions; (value?: T): KnockoutObservable; } -/** use as method to get/set the value */ -interface KnockoutObservableBase extends KnockoutObservableFunctions { - getSubscriptionsCount(): number; -} - -interface KnockoutObservable extends KnockoutObservableBase { - (): T; - (value: T): void; - - subscribe(callback: (newValue: T) => void, target?:any, topic?: string): KnockoutSubscription; - notifySubscribers(valueToWrite: T, topic?: string); +interface KnockoutObservable extends KnockoutSubscribable, KnockoutObservableFunctions { + peek(): T; + valueHasMutated(): void; + valueWillMutate(): void; } interface KnockoutComputedDefine { - read(): T; - write(T); + read(): T; + write? (value: T): void; + disposeWhenNodeIsRemoved?: Node; + disposeWhen? (): boolean; + owner?: any; + deferEvaluation?: boolean; } interface KnockoutBindingContext { From 5a2c16ed29490fdca2429216d590fab1aec36e56 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sun, 27 Oct 2013 22:06:54 +0400 Subject: [PATCH 125/150] Changed definitions in knockout.validation related to previous changes in kockout KnockoutObservableBase replaced by KnockoutObservable --- knockout.validation/knockout.validation.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/knockout.validation/knockout.validation.d.ts b/knockout.validation/knockout.validation.d.ts index 725902e60f..2e00c5223d 100644 --- a/knockout.validation/knockout.validation.d.ts +++ b/knockout.validation/knockout.validation.d.ts @@ -117,10 +117,10 @@ interface KnockoutValidationStatic { addRule(observable: KnockoutObservable, rule: KnockoutValidationRule): KnockoutObservable; - addAnonymousRule(observable: KnockoutObservableBase, ruleObj: KnockoutValidationAnonymousRuleDefinition): void; + addAnonymousRule(observable: KnockoutObservable, ruleObj: KnockoutValidationAnonymousRuleDefinition): void; insertValidationMessage(element: Element): Element; - parseInputValidationAttributes(element: Element, valueAccessor: () => KnockoutObservableBase): void; + parseInputValidationAttributes(element: Element, valueAccessor: () => KnockoutObservable): void; rules: KnockoutValidationRuleDefinitions; @@ -129,12 +129,12 @@ interface KnockoutValidationStatic { utils: KnockoutValidationUtils; localize(msgTranslations: any): void; - validateObservable(observable: KnockoutObservableBase): boolean; + validateObservable(observable: KnockoutObservable): boolean; } interface KnockoutStatic { validation: KnockoutValidationStatic; - validatedObservable(initialValue: any): KnockoutObservableBase; + validatedObservable(initialValue: any): KnockoutObservable; applyBindingsWithValidation(viewModel: any, rootNode?: any, options?: KnockoutValidationConfiguration): void; } From d0c36de348daaee3f6f838f2f44ec7a894b8db06 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sun, 27 Oct 2013 23:22:03 +0400 Subject: [PATCH 126/150] Changed definitions in knockout.deferred.updates related to previous changes in knockout deferUpdates define in KnockoutSubscription --- knockout.deferred.updates/knockout.deferred.updates.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knockout.deferred.updates/knockout.deferred.updates.d.ts b/knockout.deferred.updates/knockout.deferred.updates.d.ts index 7822c7d95b..1371f3263e 100644 --- a/knockout.deferred.updates/knockout.deferred.updates.d.ts +++ b/knockout.deferred.updates/knockout.deferred.updates.d.ts @@ -30,7 +30,7 @@ interface KnockoutComputedStatic { deferUpdates: boolean; } -interface KnockoutComputedFunctions { +interface KnockoutSubscription { deferUpdates: boolean; } From 392b8a5a085d2943d914269cea91066b5ab49230 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Sun, 27 Oct 2013 17:17:13 -0400 Subject: [PATCH 127/150] Add missing on() handler This was was exposed by a recent update to jquery that tightened up the typing for on(). Documentation for on(): http://api.jquery.com/on/ --- bootstrap.datepicker/bootstrap.datepicker.d.ts | 10 ++++++++-- jquery/jquery.d.ts | 1 + select2/select2.d.ts | 12 ++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bootstrap.datepicker/bootstrap.datepicker.d.ts b/bootstrap.datepicker/bootstrap.datepicker.d.ts index 9be7bccc24..4cf27ef199 100644 --- a/bootstrap.datepicker/bootstrap.datepicker.d.ts +++ b/bootstrap.datepicker/bootstrap.datepicker.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bootstrap.datepicker +// Type definitions for bootstrap.datepicker // Project: https://github.com/eternicode/bootstrap-datepicker // Definitions by: Boris Yankov // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -24,4 +24,10 @@ interface JQuery { datepicker(methodName: string): JQuery; datepicker(methodName: string, params: any): JQuery; datepicker(options: DatepickerOptions): JQuery; -} \ No newline at end of file + + off(events?: "changeDate", selector?: any, handler?: (eventObject: any) => any): JQuery; + + on(events: "changeDate", selector?: string, data?: any, handler?: (eventObject: any) => any): JQuery; + on(events: "changeDate", selector?: string, handler?: (eventObject: any) => any): JQuery; + on(events: "changeDate", handler?: (eventObject: any) => any): JQuery; +} diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 10c5cb979a..332ee75da7 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -616,6 +616,7 @@ interface JQuery { on(events: string, selector?: string, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; on(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; + on(events: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; on(eventsMap: { [key: string]: any; }, selector?: any, data?: any): JQuery; one(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery; diff --git a/select2/select2.d.ts b/select2/select2.d.ts index 886ae6d349..d18a3924f9 100644 --- a/select2/select2.d.ts +++ b/select2/select2.d.ts @@ -71,7 +71,19 @@ interface Select2Options { escapeMarkup?: (markup: string) => string; } +interface Select2JQueryEventObject extends JQueryEventObject { + val: any; + added: any; + removed: any; +} + interface JQuery { + off(events?: "change", selector?: any, handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + + on(events: "change", selector?: string, data?: any, handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "change", selector?: string, handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "change", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + select2(): JQuery; select2(it: IdTextPair): JQuery; select2(options: Select2Options): JQuery; From c69454cb817b2f066c3456499f546fd99f402739 Mon Sep 17 00:00:00 2001 From: Dan Ludwig Date: Mon, 28 Oct 2013 11:10:24 -0400 Subject: [PATCH 128/150] Add initial typescript definition file for google.visualization. This is an initial d.ts for the google.visualization API, and is by no means complete. It contains classes, interfaces, and functions for: 1. Loading visualization packages, and handling package load callbacks. 2. DataTable construction, manipulation, and creation from arrays. 3. Adding event listeners (minimal API, only 1 listener function def). 4. GeoChart construction & drawing. A small tests file has also been added. --- .../google.visualization-tests.ts | 41 ++++++ .../google.visualization.d.ts | 121 ++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 google.visualization/google.visualization-tests.ts create mode 100644 google.visualization/google.visualization.d.ts diff --git a/google.visualization/google.visualization-tests.ts b/google.visualization/google.visualization-tests.ts new file mode 100644 index 0000000000..0f00828168 --- /dev/null +++ b/google.visualization/google.visualization-tests.ts @@ -0,0 +1,41 @@ +/// + +function test_arrayToDataTable() { + var array = [ + ['City', 'Population', 'Area'], + ['Rome', 2761477, 1285.31], + ['Milan', 1324110, 181.76], + ['Naples', 959574, 117.27], + ['Turin', 907563, 130.17], + ['Palermo', 655875, 158.9], + ['Genoa', 607906, 243.60], + ['Bologna', 380181, 140.7], + ['Florence', 371282, 102.41], + ['Fiumicino', 67370, 213.44], + ['Anzio', 52192, 43.43], + ['Ciampino', 38262, 11], + ]; + + var dataTable = google.visualization.arrayToDataTable(array); +} + +function test_ctorDataTable() { + var dataTable = new google.visualization.DataTable(); + return dataTable; +} + +function test_dataTableAddColumn() { + var dataTable = test_ctorDataTable(); + dataTable.addColumn('string', 'First Column'); + dataTable.addColumn('number', 'Second Column'); +} + +function test_dataTableAddRow() { + var dataTable = test_ctorDataTable(); + dataTable.addRow(['row1', 6]); + dataTable.addRow(['row2', -1]); + dataTable.addRow(['row3', 0]); +} + + + diff --git a/google.visualization/google.visualization.d.ts b/google.visualization/google.visualization.d.ts new file mode 100644 index 0000000000..13d9421bc3 --- /dev/null +++ b/google.visualization/google.visualization.d.ts @@ -0,0 +1,121 @@ +declare module google { + + function load(visualization: string, version: string, packages: any): void; + function setOnLoadCallback(handler: Function): void; + function setOnLoadCallback(handler: () => void): void; + + module visualization { + + // https://developers.google.com/chart/interactive/docs/reference#DataTable + + export interface DataTableColumnDescription { + type?: string; + label?: string; + id?: string; + role?: string; + pattern?: string; + } + + export interface DataObjectCell { + v?: any; + f?: string; + p?: any; + } + + export interface DataObjectColumn { + type: string; + id?: string; + label?: string; + pattern?: string; + p?: any; + } + + export interface DataObjectRow { + c: DataObjectCell[]; + p?: any; + } + + export interface DataObject { + cols: DataObjectColumn[]; + rows: DataObjectRow[]; + p: any; + } + + export class DataTable { + constructor(data?: any, version?: any); + addColumn(type: string, label?: string, id?: string): number; + addColumn(descriptionObject: DataTableColumnDescription): number; + addRow(cellObject: DataObjectCell): number; + addRow(cellArray?: any[]): number; + addRows(count: number): number; + addRows(array: DataObjectCell[][]): number; + addRows(array: any[]): number; + } + + function arrayToDataTable(data: any[]): DataTable; + + //https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart + export class GeoChart { + constructor(element: Element); + draw(chart: DataTable, options: GeoChartOptions): void; + } + export interface GeoChartOptions { + backgroundColor?: any; + colorAxis?: GeoChartColorAxis; + datalessRegionColor?: string; + displayMode?: string; + enableRegionInteractivity?: boolean; + height?: number; + keepAspectRatio?: boolean; + legend?: GeoChartLegend; + region?: string; + magnifyingGlass?: GeoChartMagnifyingGlass; + markerOpacity?: number; + resolution?: string; + sizeAxis?: GeoChartAxis; + tooltip?: GeoChartTooltip; + width?: number; + } + //export interface GeoChartColor { + // fill?: string; + // stroke?: string; + // strokeWidth: number; + //} + export interface GeoChartColorAxis extends GeoChartAxis { + minValue?: number; + maxValue?: number; + values?: number[]; + colors?: string[]; + } + export interface GeoChartTextStyle { + color?: string; + fontName?: string; + fontSize?: number; + bold?: boolean; + italic?: boolean; + } + export interface GeoChartLegend { + numberFormat?: string; + textStyle?: GeoChartTextStyle; + } + export interface GeoChartMagnifyingGlass { + enable?: boolean; + zoomFactor?: number; + } + export interface GeoChartAxis { + maxSize?: number; + maxValue?: number; + minSize?: number; + minValue?: number; + } + export interface GeoChartTooltip { + textStyle?: GeoChartTextStyle; + trigger?: string; + } + + module events { + function addListener(chart: any, eventName: string, callback: Function): any; + function addListener(chart: any, eventName: string, callback: () => any): any; + } + } +} \ No newline at end of file From 9b980143a84478e8b32fee094066048a0b96715b Mon Sep 17 00:00:00 2001 From: danrspencer Date: Mon, 28 Oct 2013 15:58:45 +0000 Subject: [PATCH 129/150] Prototype for createSpyObj to allow for typed spies Added an overload to the prototype for createSpyObj to allow it to return a strongly typed spy object via use of generics --- jasmine/jasmine.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 142d51bcb0..2c6e836d2b 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -32,6 +32,7 @@ declare module jasmine { function objectContaining(sample: any): ObjectContaining; function createSpy(name: string, originalFn?: Function): Spy; function createSpyObj(baseName: string, methodNames: any[]): any; + function createSpyObj(baseName: string, methodNames: any[]): T; function pp(value: any): string; function getEnv(): Env; From ba9abec8939816c11f6f6d9be1d6416765167205 Mon Sep 17 00:00:00 2001 From: Jeff May Date: Sat, 26 Oct 2013 13:44:23 -0400 Subject: [PATCH 130/150] Updated grunt declarations to match 0.4.x documentation. Had to weaken some return types for TypeScript (left comments). Conflicts: gruntjs/gruntjs.d.ts --- gruntjs/gruntjs-tests.ts | 2 +- gruntjs/gruntjs.d.ts | 1262 ++++++++++++++++++++++++++++++++------ 2 files changed, 1064 insertions(+), 200 deletions(-) diff --git a/gruntjs/gruntjs-tests.ts b/gruntjs/gruntjs-tests.ts index abd1c90edd..5017451f18 100644 --- a/gruntjs/gruntjs-tests.ts +++ b/gruntjs/gruntjs-tests.ts @@ -4,7 +4,7 @@ // http://gruntjs.com/getting-started#an-example-gruntfile // exports should work same as module.exports -exports = function (grunt) { +exports = (grunt: IGrunt) => { // Project configuration. grunt.initConfig({ diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index 463721da92..92da410e37 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -1,220 +1,1084 @@ -// Type definitions for Grunt JS -// Project: http://gruntjs.com/ -// Definitions by: Basarat Ali Syed -// Definitions: https://github.com/borisyankov/DefinitelyTyped +/// +/** + * {@link http://github.com/marak/colors.js/} + */ +declare module colors { -//////////////// -/// To add plugins update the IGruntConfig using open ended interface syntax -//////////////// -interface IGruntConfig { - pkg?: any; + interface String { + yellow: string; + cyan: string; + white: string; + magenta: string; + green: string; + red: string; + grey: string; + blue: string; + } } -//////////////// -/// Sample grunt plugin definition: -/// uglify : https://github.com/gruntjs/grunt-contrib-uglify -//////////////// -interface IGruntUglifyConfig { - mangle?: boolean; - compress?: boolean; - beautify?: boolean; - report?: any; // false / 'min' / 'gzip' - sourceMap?: any; // String / Function - sourceMapRoot?: string; - sourceMapIn?: string; - sourceMappingURL?: any; // String / Function - sourceMapPrefix?: number; - wrap?: string; - exportAll?: boolean; - preserveComments?: any; // boolean / string / function - banner?: string; -} -interface IGruntConfig { - uglify?: { - options?: IGruntUglifyConfig; - build?: { - src: string; - dest: string; - }; +declare module node { - }; + /** + * {@link http://npmjs.org/doc/json.html} + */ + interface NodePackage { + name: string + version: string + description?: string + keywords?: string[] + homepage?: string + } } +/** + * {@link http://github.com/isaacs/minimatch} + */ +declare module minimatch { + /** + * A minimal matching utility options. + * + * This is the matching library used internally by npm. + * Eventually, it will replace the C binding in node-glob. + * It works by converting glob expressions into JavaScript RegExp objects. + */ + interface IMinimatchOptions { + /* + All options are false by default. + */ + /** + * Dump a ton of stuff to stderr. + */ + debug?: boolean -//////////////// -// Main Grunt object -// http://gruntjs.com/api/grunt -//////////////// -interface IGrunt { - // Config - config: IGruntConfigObject; - initConfig(config?: IGruntConfig): void; + /** + * Do not expand {a,b} and {1..3} brace sets. + */ + nobrace?: boolean + /** + * Disable ** matching against multiple folder names. + */ + noglobstar?: boolean - // Tasks - task: any; - // Creating - registerTask: Function; - registerMultiTask: Function; - renameTask: Function; - // Loading - loadTasks: Function; - loadNpmTasks: Function; + /** + * Allow patterns to match filenames starting with a period, + * even if the pattern does not explicitly have a period in that spot. + */ + // Note that by default, a/**\/b will not match a/.d/b, unless dot is set. + dot?: boolean - // Errors - warn: Function; - fatal: Function; + /** + * Disable "extglob" style patterns like +(a|b). + */ + noext?: boolean - // Misc: - package: any; - version: any; + /** + * Perform a case-insensitive match. + */ + nocase?: boolean - // File - file: IGruntFileObject; + /** + * When a match is not found by minimatch.match, return a list containing the pattern itself. + * When set, an empty list is returned if there are no matches. + */ + nonull?: boolean - // Event - event: any; - // Fail - fail: any; - // Log - log: any; - // Options - option: any; - // Template - template: any; - // Util - util: any; + /** + * If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. + * For example, a?b would match the path /xyz/123/acb, but not /xyz/acb/123. + */ + matchBase?: boolean + + /** + * Suppress the behavior of treating # at the start of a pattern as a comment. + */ + nocomment?: boolean + + /** + * Suppress the behavior of treating a leading ! character as negation. + */ + nonegate?: boolean + + /** + * Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.) + */ + flipNegate?: boolean + } } -//////////////// -/// Grunt Config object -/// http://gruntjs.com/api/grunt.config#accessing-config-data -//////////////// -interface IGruntConfigObject { - (...param: any[]): any; - init: (config?: IGruntConfig) => void; - get: Function; - process: Function; - getRaw: Function; - set: Function; - escape: (propString: string) => void; - requires: Function; +/* GRUNT CONFIGURATION + *********************/ + +declare module grunt { + + module config { + + /** + * {@link http://gruntjs.com/sample-gruntfile} + */ + interface IProjectConfig extends IConfigOptionFormat { + pkg: string + } + + /** + * @see IProjectConfig + */ + interface IConfigOptionFormat { + [plugin: string]: IConfigPluginFormat + } + + /** + * A map of plugin task names to config objects. + */ + interface IConfigPluginFormat { + [task: string]: grunt.task.ITaskOptions + } + + /** + * {@link http://gruntjs.com/api/grunt.config} + */ + interface ConfigModule { + /** + * Get or set a value from the project's Grunt configuration. + * This method serves as an alias to other methods; + * if two arguments are passed, grunt.config.set is called, + * otherwise grunt.config.get is called. + */ + (prop: string, value: any): void + (prop: string): any + + /** + * Initialize a configuration object for the current project. + * The specified configObject is used by tasks and can be accessed using the grunt.config method. + * Nearly every project's Gruntfile will call this method. + */ + init(config: IProjectConfig): void + + /** + * Get a value from the project's Grunt configuration. + * If prop is specified, that property's value is returned, or null if that property is not defined. + * If prop isn't specified, a copy of the entire config object is returned. + * Templates strings will be recursively processed using the grunt.config.process method. + */ + get(prop: string): T + get(): ConfigModule + + /** + * Process a value, recursively expanding <% %> templates (via the grunt.template.process method) + * in the context of the Grunt config, as they are encountered. + * this method is called automatically by grunt.config.get but not by grunt.config.getRaw. + * + * If any retrieved value is entirely a single '<%= foo %>' or '<%= foo.bar %>' template string, + * and the specified foo or foo.bar property is a non-string (and not null or undefined) value, + * it will be expanded to the actual value. That, combined with grunt's task system automatically + * flattening arrays, can be extremely useful. + */ + process(value: string): T + + /** + * Get a raw value from the project's Grunt configuration, without processing <% %> template strings. + * If prop is specified, that property's value is returned, or null if that property is not defined. + * If prop isn't specified, a copy of the entire config object is returned. + */ + getRaw(prop: string): T + + /** + * Set a value into the project's Grunt configuration. + * @note any specified <% %> template strings will only be processed when config data is retrieved. + */ + set(prop: string, value: any): void + + /** + * Escape '.' dots in the given propString. This should be used for property names that contain dots. + */ + escape(propString: string): string + + /** + * Fail the current task if one or more required config properties is missing, null or undefined. + * One or more string or array config properties may be specified. + */ + requires(prop: string, ...andProps: string[]) + requires(prop: string[], ...andProps: string[][]) + } + } + + module event { + /** + * {@link http://github.com/hij1nx/EventEmitter2} + */ + interface EventModule { + + /** + * Adds a listener to the end of the listeners array for the specified event. + */ + addListener(event: string, listener: Function): void + on(event: string, listener: Function): void + + /** + * Adds a listener that will be fired when any event is emitted. + */ + onAny(listener: Function): void + + /** + * Removes the listener that will be fired when any event is emitted. + */ + offAny(listener: Function): void + + /** + * Adds a one time listener for the event. + * The listener is invoked only the first time the event is fired, after which it is removed. + */ + once(event: string, listener: Function): void + + /** + * Adds a listener that will execute n times for the event before being removed. + * The listener is invoked only the first time the event is fired, after which it is removed. + */ + many(event: string, timesToListen: number, listener: Function): void + + /** + * Remove a listener from the listener array for the specified event. + * Caution: changes array indices in the listener array behind the listener. + */ + removeListener(event: string, listener: Function): void + off(event: string, listener: Function): void + + /** + * Removes all listeners, or those of the specified event. + */ + removeAllListeners(event: string): void + + /** + * By default EventEmitters will print a warning if more than 10 listeners are added to it. + * This is a useful default which helps finding memory leaks. Obviously not all Emitters + * should be limited to 10. This function allows that to be increased. + * + * Set to zero for unlimited. + */ + setMaxListener(n: number): void + + /** + * Returns an array of listeners for the specified event. + * This array can be manipulated, e.g. to remove listeners. + */ + listeners(event: string): Function[] + + /** + * Returns an array of listeners that are listening for any event that is specified. + * This array can be manipulated, e.g. to remove listeners. + */ + listenersAny() + + /** + * Execute each of the listeners that may be listening for the specified event name + * in order with the list of arguments. + */ + emit(event: string, ...args: any[]) + } + } + + module fail { + + enum ErrorCode { + NoError = 0, + Fatal = 1, + MissingGruntfile = 2, + Task = 3, + Template = 4, + Autocomplete = 5, + Warning = 6, + } + + interface FailModule { + + /** + * Display a warning and abort Grunt immediately. + * Grunt will continue processing tasks if the --force command-line option was specified. + */ + warn(error: string, errorCode?: ErrorCode): void + warn(error: Error, errorCode?: ErrorCode): void + + /** + * Display a warning and abort Grunt immediately. + */ + fatal(error: string, errorCode?: ErrorCode): void + fatal(error: Error, errorCode?: ErrorCode): void + } + } + + module file { + + /** + * {@link http://gruntjs.com/api/grunt.file#grunt.file.defaultencoding} + */ + interface IFileEncodedOption { + encoding: string + } + + /** + * {@link http://gruntjs.com/api/grunt.file#grunt.file.copy} + * + * @see IFileWriteBufferOption + * @see IFileWriteStringOption + */ + interface IFileWriteOptions { + /** + * These optional globbing patterns will be matched against the filepath + * (not the filename) using grunt.file.isMatch. If any specified globbing + * pattern matches, the file won't be processed via the `process` function. + * If `true` is specified, processing will be prevented. + */ + // noProcess?: string[] + // noProcess?: boolean + noProcess?: any + } + + /** + * @see IFileWriteOptions + */ + interface IFileWriteBufferOption extends grunt.file.IFileWriteOptions { + /** + * The source file contents and file path are passed into this function, + * whose return value will be used as the destination file's contents. If + * this function returns `false`, the file copy will be aborted. + */ + process?: (buffer: NodeBuffer) => boolean + } + + /** + * @see IFileWriteOptions + */ + interface IFileWriteStringOption extends grunt.file.IFileWriteOptions { + /** + * The source file contents and file path are passed into this function, + * whose return value will be used as the destination file's contents. If + * this function returns `false`, the file copy will be aborted. + */ + process?: (file: string) => boolean + } + + /** + * {@link http://gruntjs.com/api/grunt.file} + */ + interface FileModule { + + /** + * Set this property to change the default encoding used by all grunt.file methods. + * Defaults to 'utf8'. + * + * If you do have to change this value, it's recommended that you change + * it as early as possible inside your Gruntfile. + */ + defaultEncoding: string + + /** + * Read and return a file's contents. + * Returns a string, unless options.encoding is null in which case it returns a Buffer. + */ + read(filepath): string + read(filepath, options: IFileEncodedOption): NodeBuffer + + /** + * Read a file's contents, parsing the data as JSON and returning the result. + * @see FileModule.read for a list of supported options. + */ + readJSON(filepath): string + readJSON(filepath, options: IFileEncodedOption): NodeBuffer + + /** + * Read a file's contents, parsing the data as YAML and returning the result. + * @see FileModule.read for a list of supported options. + */ + readYAML(filepath: string) + readYAML(filepath: string, options: IFileEncodedOption) + + /** + * Write the specified contents to a file, creating intermediate directories if necessary. + * Strings will be encoded using the specified character encoding, Buffers will be written to disk as-specified. + * + * @param contents If `contents` is a Buffer, encoding is ignored. + * @param options If an encoding is not specified, default to grunt.file.defaultEncoding. + */ + write(filepath: string, contents: NodeBuffer, options?: IFileEncodedOption): void + + /** + * Copy a source file to a destination path, creating intermediate directories if necessary. + */ + copy(srcpath: string, destpath: string) + copy(srcpath: string, destpath: string, options: IFileWriteStringOption) + copy(srcpath: string, destpath: string, options: IFileWriteBufferOption) + + /** + * Delete the specified filepath. Will delete files and folders recursively. + */ + delete(filepath: string, options?: { force?: boolean }) + + /** + * Works like mkdir -p. Create a directory along with any intermediate directories. + * If mode isn't specified, it defaults to 0777 & (~process.umask()). + */ + mkdir(dirpath: string, mode?: string) + + /** + * Recurse into a directory, executing callback for each file. + * + * Callback args: + * abspath - The full path to the current file, + * which is nothing more than the rootdir + subdir + filename arguments, joined. + * rootdir - The root director, as originally specified. + * subdir - The current file's directory, relative to rootdir. + * filename - The filename of the current file, without any directory parts. + */ + recurse( + rootdir: string, + callback: (abspath: string, rootdir: string, subdir: string, filename: string) => void + ) + + /** + * Return a unique array of all file or directory paths that match the given globbing pattern(s). + * This method accepts either comma separated globbing patterns or an array of globbing patterns. + * Paths matching patterns that begin with ! will be excluded from the returned array. + * Patterns are processed in order, so inclusion and exclusion order is significant. + * + * File paths are relative to the Gruntfile unless the current working directory is changed with + * grunt.file.setBase or the --base command-line option. + */ + expand(patterns: string[]): string[] + expand(options: IFilesConfig, patterns: string[]): string[] + + /** + * Returns an array of src-dest file mapping objects. + * For each source file matched by a specified pattern, join that file path to the specified dest. + * This file path may be flattened or renamed, depending on the options specified. + * + * @see FileModule.expand method documentation for an explanation of how the patterns + * and options arguments may be specified. + */ + expandMapping(patterns: string[], dest: string, options: IExpandedFilesConfig): IFilesMap + + /** + * Match one or more globbing patterns against one or more file paths. + * Returns a uniqued array of all file paths that match any of the specified globbing patterns. + * Both the patterns and filepaths argument can be a single string or array of strings. + * Paths matching patterns that begin with ! will be excluded from the returned array. + * Patterns are processed in order, so inclusion and exclusion order is significant. + */ + match(pattern: string, filepath: string): string[] + match(pattern: string, filepaths: string[]): string[] + match(patterns: string[], filepath: string): string[] + match(patterns: string[], filepaths: string[]): string[] + match(options: minimatch.IMinimatchOptions, pattern: string, filepath: string): string[] + match(options: minimatch.IMinimatchOptions, pattern: string, filepaths: string[]): string[] + match(options: minimatch.IMinimatchOptions, patterns: string[], filepath: string): string[] + match(options: minimatch.IMinimatchOptions, patterns: string[], filepaths: string[]): string[] + + /** + * This method contains the same signature and logic as the grunt.file.match method, + * but simply returns true if any files were matched, otherwise false. + * + * @see FileModule.match + */ + isMatch(pattern: string, filepath: string): boolean + isMatch(pattern: string, filepaths: string[]): boolean + isMatch(patterns: string[], filepath: string): boolean + isMatch(patterns: string[], filepaths: string[]): boolean + isMatch(options: minimatch.IMinimatchOptions, pattern: string, filepath: string): boolean + isMatch(options: minimatch.IMinimatchOptions, pattern: string, filepaths: string[]): boolean + isMatch(options: minimatch.IMinimatchOptions, patterns: string[], filepath: string): boolean + isMatch(options: minimatch.IMinimatchOptions, patterns: string[], filepaths: string[]): boolean + + + /* + * Like the Node.js path.join method, the methods below will + * join all arguments together and normalize the resulting path. + */ + + /** + * Does the given path exist? + */ + exists(path: string, ...append: string[]): boolean + + /** + * Is the given path a symbolic link? + */ + isLink(path: string, ...append: string[]): boolean + + /** + * Is the given path a symbolic link? + */ + isDir(path: string, ...append: string[]): boolean + + /** + * Is the given path a file? + */ + isFile(path: string, ...append: string[]): boolean + + /** + * Is a given file path absolute? + */ + isPathAbsolute(path: string, ...append: string[]): boolean + + /** + * Do all the specified paths refer to the same path? + */ + arePathsEquivalent(path: string, ...append: string[]): boolean + + /** + * Are all descendant path(s) contained within the specified ancestor path? + */ + doesPathContain(ancestorPath: string, decendantPaths: string[]): boolean + + /** + * Is a given file path the current working directory (CWD)? + */ + isPathCwd(path: string, ...append: string[]): boolean + + /** + * Change grunt's current working directory (CWD). + * By default, all file paths are relative to the Gruntfile. + * This works just like the --base command-line option. + */ + setBase(path: string, ...append: string[]): void + + // External libraries + // TODO: Create declarations + glob: any + minimatch: any + findup: any + } + + /** + * A convenience type. + * + * {@link http://gruntjs.com/configuring-tasks#files} + */ + interface IFilesArray extends Array {} + + /** + * {@link http://gruntjs.com/configuring-tasks#files} + */ + interface IFilesConfig extends minimatch.IMinimatchOptions { + + /** + * Pattern(s) to match, relative to the {@link IExpandedFilesConfig.cwd}. + */ + src: string[] + + /** + * Destination path prefix. + */ + dest?: string + + /** + * Process a dynamic src-dest file mapping, + * @see {@link http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically for more information. + */ + expand?: boolean // = false + + /** + * Either a valid fs.Stats method name: + * - isFile + * - isDirectory + * - isBlockDevice + * - isCharacterDevice + * - isSymbolicLink + * - isFIFO + * - isSocket + * + * or a function that is passed the matched src filepath and returns true or false. + * + * string + * (src: string) => boolean + */ + // filter?: string + // filter?: (src: string) => boolean + filter?: any + } + + /** + * These are valid for compact-format + */ + interface IExpandedFilesConfig extends IFilesConfig { + + /** + * Enables the following options + */ + expand: boolean // = true + + /** + * All {@link IExpandedFilesConfig.src} matches are relative to (but don't include) this path. + */ + cwd?: boolean + + /** + * Replace any existing extension with this value in generated {@link IExpandedFilesConfig.dest} paths. + */ + ext?: boolean + + /** + * Remove all path parts from generated {@link IExpandedFilesConfig.dest} paths. + */ + flatten?: boolean + + /** + * This function is called for each matched src file, (after extension renaming and flattening). + * The {@link IExpandedFilesConfig.dest} and matched {@link IExpandedFilesConfig.src} path are passed in, + * and this function must return a new dest value. + * If the same dest is returned more than once, each src which used it will be added to an array of sources for it. + */ + rename?: boolean + } + + /** + * @see {@link http://gruntjs.com/configuring-tasks#files-object-format} + */ + interface IFilesMap { + /** + * A map of sources to a destination. + */ + [dest: string]: string[] + } + } + + module log { + + /** + * Grunt output should look consistent, and maybe even pretty. + * As such, there is a plethora of logging methods, and a few useful patterns. + * All of the methods that actually log something are chainable. + */ + interface CommonLogging { + + /** + * Log the specified msg string, with no trailing newline. + */ + write(msg: string): T + + /** + * Log the specified msg string, with trailing newline. + */ + writeln(msg: string): T + + /** + * If msg string is omitted, logs ERROR in red, + * otherwise logs >> msg, with trailing newline. + */ + error(msg: string): T + + /** + * Log an error with grunt.log.error, wrapping text to 80 columns using grunt.log.wraptext. + */ + errorlns(msg: string): T + + /** + * If msg string is omitted, logs OK in green, otherwise logs >> msg, with trailing newline. + */ + ok(msg: string): T + + /** + * Log an ok message with grunt.log.ok, wrapping text to 80 columns using grunt.log.wraptext. + */ + oklns(msg: string): T + + /** + * Log the specified msg string in bold, with trailing newline. + */ + subhead(msg: string): T + + /** + * Log a list of obj properties (good for debugging flags). + */ + writeflags(obj: any): T + } + + /** + * @note all methods available under grunt.verbose work exactly like grunt.log methods, + * but only log if the --verbose command-line option was specified. + */ + interface VerboseLogModule extends CommonLogging { + or: NotVerboseLogModule + } + + /** + * @note all methods available under grunt.verbose work exactly like grunt.log methods, + * but only log if the --verbose command-line option was not specified. + */ + interface NotVerboseLogModule extends CommonLogging { + or: VerboseLogModule + } + + /** + * {@link http://gruntjs.com/api/grunt.log} + */ + interface LogModule extends CommonLogging { + verbose: VerboseLogModule + notverbose: NotVerboseLogModule + } + } + + module option { + + /** + * {@link http://gruntjs.com/api/grunt.option} + */ + interface OptionModule { + + /** + * Gets or sets an option. + * Boolean options can be negated by prepending no- onto the key. For example: + * + * grunt.option('staging', false); + * var isDev = grunt.option('no-staging'); + * assert(isDev === true) + */ + (key: string, value: T): void + (key: string): T + + /** + * Initialize grunt.option. + * If initObject is omitted option will be initialized to an empty object + * otherwise will be set to initObject. + */ + init(initObject?: any): void + + /** + * Returns the options as an array of command line parameters. + */ + flags: grunt.IFlag[] + } + + } + + module task { + + interface TaskFunction extends ITask { + (...args: any[]): boolean + } + + /** + * {@link http://gruntjs.com/api/grunt.task} + */ + interface CommonTaskModule { + + /** + * If a task list is specified, the new task will be an alias for one or more other tasks. + * Whenever this "alias task" is run, every specified task in taskList will be run, in the order specified. + * The taskList argument must be an array of tasks. + */ + registerTask(taskName: string, taskList: string[]): void + + /** + * If a description and taskFunction are passed, the specified function will be executed + * whenever the task is run. + * + * In addition, the specified description will be shown when grunt --help is run. + * Task-specific properties and methods are available inside the task function as properties + * of the this object. The task function can return false to indicate that the task has failed. + * + * @note taskFunction.apply(scope: grunt.task.IMultiTask, args: any[]) + */ + registerTask(taskName: string, description: string, taskFunction: TaskFunction): void + + /** + * Register a "multi task." A multi task is a task that implicitly iterates over all of its + * named sub-properties (AKA targets) if no target was specified. + * In addition to the default properties and methods, extra multi task-specific properties + * are available inside the task function as properties of the this object. + * + * @note taskFunction.apply(scope: grunt.task.IMultiTask, args: any[]) + */ + registerMultiTask(taskName: string, taskFunction: grunt.task.ITask): void + registerMultiTask(taskName: string, taskDescription: string, taskFunction: TaskFunction): void + } + + /** + * {@link http://gruntjs.com/api/grunt.task#queueing-tasks} + */ + interface TaskModule extends CommonTaskModule { + /** + * Enqueue one or more tasks. + * Every specified task in taskList will be run immediately after the current task completes, + * in the order specified. The task list can be an array of tasks or individual task arguments. + */ + run(tasks: string[]): void + run(task: string, ...thenTasks: string[]): void + + /** + * Empty the task queue completely. Unless additional tasks are enqueued, no more tasks will be run. + */ + clearQueue(): void + + /** + * Normalizes a task target configuration object into an array of src-dest file mappings. + * This method is used internally by the multi task system this.files / grunt.task.current.files property. + */ + normalizeMultiTaskFiles(data: grunt.config.IProjectConfig, targetname?: string): grunt.file.IFilesMap + } + + interface AsyncResultCatcher { + /** + * Either false or an Error object may be passed to the done function + * to instruct Grunt that the task has failed. + */ + done(success: boolean): void; + done(error: Error): void; + done(result: any): void; + } + + /** + * @link http://gruntjs.com/inside-tasks + * + * Grunt version 0.4.x + */ + interface ITask { + + /** + * If a task is asynchronous, this method must be invoked to instruct Grunt to wait. + * It returns a handle to a "done" function that should be called when the task has completed. + * + * // Tell Grunt this task is asynchronous. + * var done = this.async(); + * // Your async code. + * setTimeout(function() { + * // Let's simulate an error, sometimes. + * var success = Math.random() > 0.5; + * // All done! + * done(success); + * }, 1000); + */ + async(): AsyncResultCatcher + + /** + * If one task depends on the successful completion of another task (or tasks), + * this method can be used to force Grunt to abort if the other task didn't run, + * or if the other task failed. + * + * @param tasks an array of task names or individual task names, as arguments. + * @note that this won't actually run the specified task(s), + * it will just fail the current task if they haven't already run successfully. + */ + requires(tasks: string[]): void + requires(tasks: string, ...otherTasks: string[]): void + requires(tasks: string[], ...otherTasks: string[][]): void + + /** + * Fail the current task if one or more required config properties is missing. + * One or more string or array config properties may be specified. + * this.requiresConfig(prop [, prop [, ...]]) + */ + requiresConfig(prop: string, ...andProps: string[]) + + /** + * The name of the task, as defined in grunt.registerTask. + * For example, if a "sample" task was run as grunt sample or grunt sample:foo, + * inside the task function, this.name would be "sample". + */ + name: string + + /** + * The name of the task, including any colon-separated arguments or flags specified on the command-line. + * For example, if a "sample" task was run as grunt sample:foo, + * inside the task function, this.nameArgs would be "sample:foo". + */ + nameArgs: string + + /** + * An array of arguments passed to the task. + * For example, if a "sample" task was run as grunt sample:foo:bar, + * inside the task function, this.args would be ["foo", "bar"]. + */ + args: string[] + + /** + * An object generated from the arguments passed to the task. + * For example, if a "sample" task was run as grunt sample:foo:bar, + * inside the task function, this.flags would be {foo: true, bar: true}. + */ + flags: grunt.IFlag[] + + /** + * The number of grunt.log.error calls that occurred during this task. + * This can be used to fail a task if errors were logged during the task. + */ + errorCount: number + + /** + * Returns an options object. + * Properties of the optional defaultsObj argument will be overridden by any task-level options + * object properties, which will be further overridden in multi tasks by any target-level + * options object properties. + */ + // options(defaultsObj: T): ITaskOptions + // options(defaultsObj: T): T + options(defaultsObj: any): any + } + + /** + * {@link http://gruntjs.com/inside-tasks#inside-multi-tasks} + */ + interface IMultiTask extends ITask { + /** + * In a multi task, this property contains the name of the target currently being iterated over. + * For example, if a "sample" multi task was run as grunt sample:foo with the config data + * {sample: {foo: "bar"}}, inside the task function, this.target would be "foo". + */ + target: string + + /** + * In a multi task, all files specified using any Grunt-supported file formats and options, + * globbing patterns or dynamic mappings will automatically be normalized into a single format: + * the Files Array file format. + * + * What this means is that tasks don't need to contain a ton of boilerplate for explicitly + * handling custom file formats, globbing patterns, mapping source files to destination files + * or filtering out files or directories. A task user can just specify files per the Configuring + * tasks guide, and Grunt will handle all the details. + * + * Your task should iterate over the this.files array, utilizing the src and dest properties of + * each object in that array. The this.files property will always be an array. + * The src property will also always be an array, in case your task cares about multiple source + * files per destination file. + * + * @note it's possible that nonexistent files might be included in src values, + * so you may want to explicitly test that source files exist before using them. + */ + files: grunt.file.IFilesArray + + /** + * In a multi task, all src files files specified via any file format are reduced to a single array. + * If your task is "read only" and doesn't care about destination filepaths, + * use this array instead of this.files. + */ + filesSrc: string[] + + /** + * In a multi task, this is the actual data stored in the Grunt config object for the given target. + * For example, if a "sample" multi task was run as grunt sample:foo with the config data + * {sample: {foo: "bar"}}, inside the task function, this.data would be "bar". + * + * @note It is recommended that this.options this.files and this.filesSrc are used instead of this.data, + * as their values are normalized. + */ + data: any + } + + /** + * {@link http://gruntjs.com/configuring-tasks} + * + * A TaskConfig can be either be a full config or a compacted files config. + * @see ITaskCompactOptions + */ + interface ITaskOptions { + + options?: any + + // files?: grunt.file.IFilesArray + // files?: grunt.file.IFilesMap + files?: any + } + + /** + * @see ITaskOptions + */ + interface ITaskCompactOptions extends grunt.task.ITaskOptions, grunt.file.IFilesConfig {} + } + + module template { + + interface TemplateModule { + // TODO + } + } + + module util { + + interface UtilModule { + // TODO + } + } + + /* + * Common interfaces + */ + + interface IFlag { + [flag: string]: boolean + } + + /* + * Grunt module mixins. + */ + + interface IConfigComponents extends grunt.config.ConfigModule { + /** + * An alias + * @see grunt.config.ConfigModule.init + */ + initConfig(config: grunt.config.IProjectConfig): void + } + + interface ITaskComponents extends grunt.task.CommonTaskModule { + + /** + * The currently running task or multitask. + * @see IMultiTask for when to cast + */ + current: grunt.task.ITask + + /** + * Load task-related files from the specified directory, relative to the Gruntfile. + * This method can be used to load task-related files from a local Grunt plugin by + * specifying the path to that plugin's "tasks" subdirectory. + */ + loadTasks(tasksPath: string): void + + /** + * Load tasks from the specified Grunt plugin. + * This plugin must be installed locally via npm, and must be relative to the Gruntfile. + * Grunt plugins can be created by using the grunt-init gruntplugin template: grunt init:gruntplugin. + */ + loadNpmTasks(pluginName: string): void + } } -//////////////// -// Grunt File object -// http://gruntjs.com/api/grunt.file -//////////////// -interface IGruntFileObjectOptionsSimple { - encoding?: string; +/* GRUNT MODULE + **************/ + +/** + * The main Grunt module. + * + * {@link http://gruntjs.com/api/grunt} + */ +interface IGrunt extends grunt.IConfigComponents, grunt.fail.FailModule, grunt.ITaskComponents { + + config: grunt.config.ConfigModule + + event: grunt.event.EventModule + + fail: grunt.fail.FailModule + + file: grunt.file.FileModule + + log: grunt.log.LogModule + + option: grunt.option.OptionModule + + task: grunt.task.TaskModule + + template: grunt.template.TemplateModule + + util: grunt.util.UtilModule + + /** + * The current Grunt package.json metadata, as an object. + */ + package: node.NodePackage + + /** + * The current Grunt version, as a string. This is just a shortcut to the grunt.package.version property. + */ + version: string } -interface IGruntFileObjectOptions extends IGruntFileObjectOptionsSimple { - process?: Function; - noProcess?: any; -} -interface IGruntFileObject { - - // Character encoding - defaultEncoding: string; - - // Reading and writing - read(filepath: string, options?: IGruntFileObjectOptionsSimple): string; - readJSON(filepath: string, options?: IGruntFileObjectOptionsSimple): any; - readYAML(filepath: string, options?: IGruntFileObjectOptionsSimple): any; - write(filepath: string, contents: any, options?: IGruntFileObjectOptionsSimple): void; - copy(srcpath: string, destpath: string, options?: IGruntFileObjectOptions): void; - delete(filepath: string, options?: { force?: boolean; }): void; - - // Directories - mkdir(dirpath: string, mode?: number): void; - recurse(rootdir: string, callback: (abspath: string, rootdir: string, subdir: string, filename: string) => void): void; - - // Globbing patterns - expand(...patterns: string[]): string[]; - expand(options: Object, ...patterns: string[]): string[]; - expandMapping(patterns: string[], dest: string, options?: Object): any[]; - - match(patterns: string[], filepaths: string[]): string[]; - match(patterns: string[], filepaths: string): string[]; - match(patterns: string, filepaths: string[]): string[]; - match(patterns: string, filepaths: string): string[]; - match(options: Object, patterns: string[], filepaths: string[]): string[]; - match(options: Object, patterns: string[], filepaths: string): string[]; - match(options: Object, patterns: string, filepaths: string[]): string[]; - match(options: Object, patterns: string, filepaths: string): string[]; - - isMatch(patterns: string[], filepaths: string[]): boolean; - isMatch(patterns: string[], filepaths: string): boolean; - isMatch(patterns: string, filepaths: string[]): boolean; - isMatch(patterns: string, filepaths: string): boolean; - isMatch(options: Object, patterns: string[], filepaths: string[]): boolean; - isMatch(options: Object, patterns: string[], filepaths: string): boolean; - isMatch(options: Object, patterns: string, filepaths: string[]): boolean; - isMatch(options: Object, patterns: string, filepaths: string): boolean; - - // file types - exists(...paths: string[]): boolean; - isLink(...paths: string[]): boolean; - isDir(...paths: string[]): boolean; - isFile(...paths: string[]): boolean; - - // paths - isPathAbsolute(...paths: string[]): boolean; - arePathsEquivalent(...paths: string[]): boolean; - doesPathContain(ancestorPath: string, ...descendantPaths: string[]): boolean; - isPathCwd(...paths: string[]): boolean; - isPathInCwd(...paths: string[]): boolean; - setBase(...paths: string[]): void; - - // External libraries - glob: any; - minimatch: any; - findup: any; -} - -//////////////// -// 'this' when executing within a task -// http://gruntjs.com/api/inside-tasks -//////////////// -interface IGruntTaskThis { - async(): (err:any) => void; - requires(...taskNames: string[]): void; - requiresConfig(...props: string[]): void; - name: string; - nameArgs: string; - args: string[]; - flags: any; - errorCount: number; - options(defaults?: Object): any; -} - -//////////////// -// 'this' when executing within a multitask -// http://gruntjs.com/api/inside-tasks -//////////////// -interface IGruntMultiTaskThis extends IGruntTaskThis { - target: string; - files: IGruntFileArray[]; - filesSrc: string[]; - data: any; -} - -//////////////// -// Files array format -// http://gruntjs.com/configuring-tasks#files-array-format -//////////////// -interface IGruntFileArray { - src: string[]; - dest: string; - nonull?: boolean; - filter?: any; -} - -//////////////// -/// Globally called export function module.exports -//////////////// - -declare var exports: (grunt: IGrunt) => void; From 85ec704f8dba9b0ffca2e3f9f4b6622ef567233d Mon Sep 17 00:00:00 2001 From: Jeff May Date: Sun, 27 Oct 2013 22:49:24 -0400 Subject: [PATCH 131/150] Updated for contribution guidelines. Conflicts: README.md --- README.md | 2 +- gruntjs/gruntjs.d.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 143754d982..5b2e26e789 100755 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ List of Definitions * [GoJS](http://gojs.net/) (by [Barbara Duckworth](https://github.com/barbara42)) * [Greasemonkey](http://www.greasespot.net/) (by [Kota Saito](https://github.com/kotas)) * [GreenSock Animation Platform (GSAP)](http://www.greensock.com/get-started-js/) (by [Robert S.](https://github.com/codeBelt)) -* [Grunt JS](http://gruntjs.com/) (by [Basarat Ali Syed](https://github.com/basarat)) +* [Grunt JS](http://gruntjs.com/) (by [Jeff May](https://github.com/jeffmay) and [Basarat Ali Syed](https://github.com/basarat)) * [Google API Client](https://code.google.com/p/google-api-javascript-client/) (by [Frank M](https://github.com/sgtfrankieboy)) * [Google App Engine Channel API](https://developers.google.com/appengine/docs/java/channel/javascript) (by [vvakame](https://github.com/vvakame)) * [GoogleMaps](https://developers.google.com/maps/) (by [Esben Nepper](https://github.com/eNepper)) diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index 92da410e37..f191173e16 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -1,3 +1,8 @@ +// Type definitions for Grunt 0.4.x +// Project: http://gruntjs.com +// Definitions by: Jeff May +// Definitions: https://github.com/jeffmay/DefinitelyTyped + /// /** From 112ff52ba16f89ebd5811aa272ac8075afb416cf Mon Sep 17 00:00:00 2001 From: Jeff May Date: Sun, 27 Oct 2013 22:58:37 -0400 Subject: [PATCH 132/150] Switched to generic MultiTask for structured configuration. --- gruntjs/gruntjs.d.ts | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index f191173e16..04b730ce78 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -8,18 +8,15 @@ /** * {@link http://github.com/marak/colors.js/} */ -declare module colors { - - interface String { - yellow: string; - cyan: string; - white: string; - magenta: string; - green: string; - red: string; - grey: string; - blue: string; - } +interface String { + yellow: string; + cyan: string; + white: string; + magenta: string; + green: string; + red: string; + grey: string; + blue: string; } declare module node { @@ -924,7 +921,7 @@ declare module grunt { /** * {@link http://gruntjs.com/inside-tasks#inside-multi-tasks} */ - interface IMultiTask extends ITask { + interface IMultiTask extends ITask { /** * In a multi task, this property contains the name of the target currently being iterated over. * For example, if a "sample" multi task was run as grunt sample:foo with the config data @@ -967,7 +964,7 @@ declare module grunt { * @note It is recommended that this.options this.files and this.filesSrc are used instead of this.data, * as their values are normalized. */ - data: any + data: T } /** @@ -1031,7 +1028,7 @@ declare module grunt { * The currently running task or multitask. * @see IMultiTask for when to cast */ - current: grunt.task.ITask + current: grunt.task.ITask /** * Load task-related files from the specified directory, relative to the Gruntfile. From 56f5ab0ad8fa7195a88ca1531e6942963545c756 Mon Sep 17 00:00:00 2001 From: Jeff May Date: Mon, 28 Oct 2013 00:42:59 -0400 Subject: [PATCH 133/150] Added Template and Util modules. --- gruntjs/gruntjs-tests.ts | 12 +++ gruntjs/gruntjs.d.ts | 212 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 222 insertions(+), 2 deletions(-) diff --git a/gruntjs/gruntjs-tests.ts b/gruntjs/gruntjs-tests.ts index 5017451f18..9097fa7df1 100644 --- a/gruntjs/gruntjs-tests.ts +++ b/gruntjs/gruntjs-tests.ts @@ -26,4 +26,16 @@ exports = (grunt: IGrunt) => { // Default task(s). grunt.registerTask('default', ['uglify']); + + // util methods + var testOneArg = (a: number) => a * 2; + var asyncedOneArg = grunt.util.callbackify(testOneArg); + asyncedOneArg(1, (result: number) => { + console.log(result); + }); + var testTwoArgs = (a: number, b: string) => "it works with " + a + " " + b; + var asyncedTwoArgs = grunt.util.callbackify(testTwoArgs); + asyncedTwoArgs(2, "values", (result: string) => { + console.log(result); + }); }; \ No newline at end of file diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index 04b730ce78..a113244a5d 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -991,14 +991,222 @@ declare module grunt { module template { interface TemplateModule { - // TODO + + /** + * Process a Lo-Dash template string. + * + * The template argument will be processed recursively until there are no more templates to process. + * + * The default data object is the entire config object, but if options.data is set, that object will + * be used instead. The default template delimiters are <% %> but if options.delimiters is set to a + * custom delimiter name, those template delimiters will be used instead. + * + * Inside templates, the grunt object is exposed so that you can do things like: + * <%= grunt.template.today('yyyy') %> + * + * @note if the data object already has a grunt property, the grunt API will not be accessible in templates. + */ + process(template: string): (options: any) => string + process(template: string, options: any): string + + /** + * Set the Lo-Dash template delimiters to a predefined set in case you grunt.util._.template + * needs to be called manually. + * + * The config delimiters <% %> are included by default. + */ + setDelimiters(name: string): void + + /** + * Add a named set of Lo-Dash template delimiters. + * + * You probably won't need to use this method, because the built-in delimiters should be sufficient, + * but you could always add {% %} or [% %] style delimiters. + */ + addDelimiters(name: string, opener: string, closer: string): void + + /** + * {@link http://github.com/felixge/node-dateformat} + * + * @note if you don't include the mask argument, dateFormat.masks.default is used + */ + date(date?: Date, format?: string): string + date(date?: number, format?: string): string + date(date?: string, format?: string): string + + /** + * {@link http://github.com/felixge/node-dateformat} + * + * @note if you don't include the mask argument, dateFormat.masks.default is used + */ + today(format?: string) } } module util { + /** + * {@link http://gruntjs.com/api/grunt.util} + */ interface UtilModule { - // TODO + + /** + * Return the "kind" of a value. Like typeof but returns the internal [Class](Class/) value. + * Possible results are "number", "string", "boolean", "function", "regexp", "array", "date", + * "error", "null", "undefined" and the catch-all "object". + */ + kindOf(value: any): string + + /** + * Return a new Error instance (that can be thrown) with the appropriate message. + * If an Error object is specified instead of message that object will be returned. + * Also, if an Error object is specified for origError and Grunt was run with the --debug 9 option, + * the original Error stack will be dumped. + */ + error(message: string, origError?: Error) + + /** + * The linefeed character, normalized for the current operating system. + * (\r\n on Windows, \n otherwise) + */ + linefeed: string + + /** + * Given a string, return a new string with all the linefeeds normalized for the current operating system. + * (\r\n on Windows, \n otherwise) + */ + normalizelf(str: string): string + + /** + * Recurse through nested objects and arrays, executing callbackFunction for each non-object value. + * If continueFunction returns false, a given object or value will be skipped. + */ + recurse(object: any, callbackFunction: (value: any) => void, continueFunction: (objOrValue: any) => boolean): void + + /** + * Return string str repeated n times. + */ + repeat(n: number, str: string): string + + /** + * Given str of "a/b", If n is 1, return "a" otherwise "b". + * You can specify a custom separator if '/' doesn't work for you. + */ + pluralize(n: number, str: string, separator?: string): string + + /** + * Spawn a child process, keeping track of its stdout, stderr and exit code. + * The method returns a reference to the spawned child. + * When the child exits, the done function is called. + * + * @param done a function with arguments: + * error - If the exit code was non-zero and a fallback wasn't specified, + * an Error object, otherwise null. + * result - The result object is an + * code - The numeric exit code. + */ + spawn(options: ISpawnOptions, done: (error: Error, result: ISpawnResult, code: number) => void): ISpawnedChild + + /** + * Given an array or array-like object, return an array. + * Great for converting arguments objects into arrays. + */ + toArray(arrayLikeObject: any): T[] + + /** + * Normalizes both "returns a value" and "passes result to a callback" functions to always + * pass a result to the specified callback. If the original function returns a value, + * that value will now be passed to the callback, which is specified as the last argument, + * after all other predefined arguments. If the original function passed a value to a callback, + * it will continue to do so. + */ + callbackify(syncOrAsyncFunction: () => R): + (callback: (result: R) => void) => void + callbackify(syncOrAsyncFunction: (a: A) => R): + (a: A, callback: (result: R) => void) => void + callbackify(syncOrAsyncFunction: (a: A, b: B) => R): + (a: A, b: B, callback: (result: R) => void) => void + callbackify(syncOrAsyncFunction: (a: A, b: B, c: C) => R): + (a: A, b: B, c: C, callback: (result: R) => void) => void + callbackify(syncOrAsyncFunction: (a: A, b: B, c: C, d: D) => R): + (a: A, b: B, c: C, d: D, callback: (result: R) => void) => void + + // Internal libraries + namespace: any + task: any + } + + /** + * {@link http://gruntjs.com/api/grunt.util#grunt.util.spawn} + */ + interface ISpawnOptions { + + /** + * The command to execute. It should be in the system path. + */ + cmd: string + + /** + * If specified, the same grunt bin that is currently running will be + * spawned as the child command, instead of the "cmd" option. + * Defaults to false. + */ + grunt?: boolean + + /** + * An array of arguments to pass to the command. + */ + args?: string[] + + /** + * Additional options for the Node.js child_process spawn method. + */ + opts?: ISpawnOptions + + /** + * If this value is set and an error occurs, it will be used as the value + * and null will be passed as the error value. + */ + fallback?: any + } + + /** + * @note When result is coerced to a string, the value is stdout if the exit code + * was zero, the fallback if the exit code was non-zero and a fallback was + * specified, or stderr if the exit code was non-zero and a fallback was + * not specified. + */ + interface ISpawnResult { + stdout: string + stderr: string + code: number + } + + /** + * {@link http://github.com/snbartell/node-spawn} + */ + interface ISpawnedChild { + /** + * Start the cmd with the options provided. + */ + start(): void + + /** + * Convenience function. Overrides options. restarts to 0. + * Runs command exactly once no matter the options passed into the constructor. + */ + once(): void + + /** + * Convenience function. Overrides options.restarts to -1. + * Runs command indefinitely no matter the options passed into the constructor. + */ + forever(): void + + /** + * Shut down the child and don't let it restart. + */ + kill(): void } } From 3b64c0a07278f5c96461c256bafec8f130ac6216 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Mon, 28 Oct 2013 17:02:58 -0400 Subject: [PATCH 134/150] Fix getItemById() It was missing a necessary parameter. --- slickgrid/SlickGrid.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slickgrid/SlickGrid.d.ts b/slickgrid/SlickGrid.d.ts index 682463f78f..8459fbd9ea 100644 --- a/slickgrid/SlickGrid.d.ts +++ b/slickgrid/SlickGrid.d.ts @@ -1529,7 +1529,7 @@ declare module Slick { public getGroups(): Group[]; public getIdxById(): string; public getRowById(): T; - public getItemById(): T; + public getItemById(id: any): T; public getItemByIdx(): T; public mapRowsToIds(rowArray: T[]): string[]; public setRefreshHints(hints: RefreshHints): void; From 15f97500430e0780350dc7284825448fc66615b1 Mon Sep 17 00:00:00 2001 From: Georgios Diamantopoulos Date: Tue, 29 Oct 2013 12:09:34 +0200 Subject: [PATCH 135/150] Fixes in latest NG pkg `IAttributes` definition made it impossible to use scoped attributes - see my comments `scope.$eval` was missing locals argument `IDirective.controller` made it impossible to use minify-safe array notation, had to switch back to `any` `IDirective.require` can be both `string` or `string[]` so changed back to `any`. This will all be so much better once we get union support in TS... --- angularjs/angular.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 918f82ce4a..08f22481a6 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -124,6 +124,11 @@ declare module ng { // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes /////////////////////////////////////////////////////////////////////////// interface IAttributes { + // this is necessary to be able to access the scoped attributes. it's not very elegant + // because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way + // this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656 + [name: string]: any; + // Adds the CSS class value specified by the classVal parameter to the // element. If animations are enabled then an animation will be triggered // for the class addition. @@ -647,7 +652,7 @@ declare module ng { templateAttributes: IAttributes, transclude: (scope: IScope, cloneLinkingFn: Function) => void ) => any; - controller?: (...injectables: any[]) => void; + controller?: any; controllerAs?: string; link?: (scope: IScope, @@ -658,7 +663,7 @@ declare module ng { name?: string; priority?: number; replace?: boolean; - require?: string[]; + require?: any; restrict?: string; scope?: any; template?: any; From 05b6a0a1cae09a74fa0daec8135f6bc327ac8851 Mon Sep 17 00:00:00 2001 From: Jeff May Date: Tue, 29 Oct 2013 09:51:11 -0400 Subject: [PATCH 136/150] Fixed implicitAny bugs. --- gruntjs/gruntjs.d.ts | 68 +++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index a113244a5d..0b3d6ee2eb 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -149,7 +149,7 @@ declare module grunt { * if two arguments are passed, grunt.config.set is called, * otherwise grunt.config.get is called. */ - (prop: string, value: any): void + (prop: string, value: any): any (prop: string): any /** @@ -164,6 +164,8 @@ declare module grunt { * If prop is specified, that property's value is returned, or null if that property is not defined. * If prop isn't specified, a copy of the entire config object is returned. * Templates strings will be recursively processed using the grunt.config.process method. + * + * @note Although this accepts a generic type, you may still get the wrong typed value. */ get(prop: string): T get(): ConfigModule @@ -191,7 +193,7 @@ declare module grunt { * Set a value into the project's Grunt configuration. * @note any specified <% %> template strings will only be processed when config data is retrieved. */ - set(prop: string, value: any): void + set(prop: string, value: T): T /** * Escape '.' dots in the given propString. This should be used for property names that contain dots. @@ -202,8 +204,8 @@ declare module grunt { * Fail the current task if one or more required config properties is missing, null or undefined. * One or more string or array config properties may be specified. */ - requires(prop: string, ...andProps: string[]) - requires(prop: string[], ...andProps: string[][]) + requires(prop: string, ...andProps: string[]): void + requires(prop: string[], ...andProps: string[][]): void } } @@ -216,42 +218,42 @@ declare module grunt { /** * Adds a listener to the end of the listeners array for the specified event. */ - addListener(event: string, listener: Function): void - on(event: string, listener: Function): void + addListener(event: string, listener: Function): EventModule + on(event: string, listener: Function): EventModule /** * Adds a listener that will be fired when any event is emitted. */ - onAny(listener: Function): void + onAny(listener: Function): EventModule /** * Removes the listener that will be fired when any event is emitted. */ - offAny(listener: Function): void + offAny(listener: Function): EventModule /** * Adds a one time listener for the event. * The listener is invoked only the first time the event is fired, after which it is removed. */ - once(event: string, listener: Function): void + once(event: string, listener: Function): EventModule /** * Adds a listener that will execute n times for the event before being removed. * The listener is invoked only the first time the event is fired, after which it is removed. */ - many(event: string, timesToListen: number, listener: Function): void + many(event: string, timesToListen: number, listener: Function): EventModule /** * Remove a listener from the listener array for the specified event. * Caution: changes array indices in the listener array behind the listener. */ - removeListener(event: string, listener: Function): void - off(event: string, listener: Function): void + removeListener(event: string, listener: Function): EventModule + off(event: string, listener: Function): EventModule /** * Removes all listeners, or those of the specified event. */ - removeAllListeners(event: string): void + removeAllListeners(event: string): EventModule /** * By default EventEmitters will print a warning if more than 10 listeners are added to it. @@ -272,13 +274,13 @@ declare module grunt { * Returns an array of listeners that are listening for any event that is specified. * This array can be manipulated, e.g. to remove listeners. */ - listenersAny() + listenersAny(): Function[] /** * Execute each of the listeners that may be listening for the specified event name * in order with the list of arguments. */ - emit(event: string, ...args: any[]) + emit(event: string, ...args: any[]): any } } @@ -380,22 +382,22 @@ declare module grunt { * Read and return a file's contents. * Returns a string, unless options.encoding is null in which case it returns a Buffer. */ - read(filepath): string - read(filepath, options: IFileEncodedOption): NodeBuffer + read(filepath: string): string + read(filepath: string, options: IFileEncodedOption): NodeBuffer /** * Read a file's contents, parsing the data as JSON and returning the result. * @see FileModule.read for a list of supported options. */ - readJSON(filepath): string - readJSON(filepath, options: IFileEncodedOption): NodeBuffer + readJSON(filepath: string): any + readJSON(filepath: string, options: IFileEncodedOption): NodeBuffer /** * Read a file's contents, parsing the data as YAML and returning the result. * @see FileModule.read for a list of supported options. */ - readYAML(filepath: string) - readYAML(filepath: string, options: IFileEncodedOption) + readYAML(filepath: string): any + readYAML(filepath: string, options: IFileEncodedOption): NodeBuffer /** * Write the specified contents to a file, creating intermediate directories if necessary. @@ -409,20 +411,22 @@ declare module grunt { /** * Copy a source file to a destination path, creating intermediate directories if necessary. */ - copy(srcpath: string, destpath: string) - copy(srcpath: string, destpath: string, options: IFileWriteStringOption) - copy(srcpath: string, destpath: string, options: IFileWriteBufferOption) + copy(srcpath: string, destpath: string): void + copy(srcpath: string, destpath: string, options: IFileWriteStringOption): void + copy(srcpath: string, destpath: string, options: IFileWriteBufferOption): void /** * Delete the specified filepath. Will delete files and folders recursively. + * + * @return true if the files could be deleted, otherwise false. */ - delete(filepath: string, options?: { force?: boolean }) + delete(filepath: string, options?: { force?: boolean }): boolean /** * Works like mkdir -p. Create a directory along with any intermediate directories. * If mode isn't specified, it defaults to 0777 & (~process.umask()). */ - mkdir(dirpath: string, mode?: string) + mkdir(dirpath: string, mode?: string): void /** * Recurse into a directory, executing callback for each file. @@ -437,7 +441,7 @@ declare module grunt { recurse( rootdir: string, callback: (abspath: string, rootdir: string, subdir: string, filename: string) => void - ) + ): void /** * Return a unique array of all file or directory paths that match the given globbing pattern(s). @@ -871,7 +875,7 @@ declare module grunt { * One or more string or array config properties may be specified. * this.requiresConfig(prop [, prop [, ...]]) */ - requiresConfig(prop: string, ...andProps: string[]) + requiresConfig(prop: string, ...andProps: string[]): void /** * The name of the task, as defined in grunt.registerTask. @@ -1026,6 +1030,7 @@ declare module grunt { addDelimiters(name: string, opener: string, closer: string): void /** + * Format a date using the dateformat library. * {@link http://github.com/felixge/node-dateformat} * * @note if you don't include the mask argument, dateFormat.masks.default is used @@ -1035,11 +1040,12 @@ declare module grunt { date(date?: string, format?: string): string /** + * Format today's date using the dateformat library using the current date and time. * {@link http://github.com/felixge/node-dateformat} * * @note if you don't include the mask argument, dateFormat.masks.default is used */ - today(format?: string) + today(format?: string): string } } @@ -1063,7 +1069,9 @@ declare module grunt { * Also, if an Error object is specified for origError and Grunt was run with the --debug 9 option, * the original Error stack will be dumped. */ - error(message: string, origError?: Error) + error(message: string, origError?: Error): Error + error(error: Error, origError?: Error): Error + error(error: any, origError?: Error): Error /** * The linefeed character, normalized for the current operating system. From f8ef5191408848993bce1a22cd94344515f97344 Mon Sep 17 00:00:00 2001 From: KhodeN Date: Wed, 30 Oct 2013 17:07:53 +1100 Subject: [PATCH 137/150] Update sugar.d.ts Fix Array.subtract --- sugar/sugar.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sugar/sugar.d.ts b/sugar/sugar.d.ts index 98a5c7705e..b96d10beae 100644 --- a/sugar/sugar.d.ts +++ b/sugar/sugar.d.ts @@ -2813,7 +2813,12 @@ interface Array { * ['a','b'].subtract('b','c') -> ['a'] **/ subtract(...args: T[]): T[]; - + + /** + * @see subtract + **/ + subtract(args: T[]): T[]; + /** * Sums all values in the array. * @param map Property on each element in the array or callback function to sum up the elements. From 000f090aff567dfa997f1f6bea11c392f023f7e6 Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Wed, 30 Oct 2013 18:23:49 -0700 Subject: [PATCH 138/150] (select2) set option parameter in matcher to any --- select2/select2.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2/select2.d.ts b/select2/select2.d.ts index d18a3924f9..842b75ef7b 100644 --- a/select2/select2.d.ts +++ b/select2/select2.d.ts @@ -47,7 +47,7 @@ interface Select2Options { closeOnSelect?: boolean; openOnEnter?: boolean; id?: (object: any) => string; - matcher?: (term: string, text: string, option: JQuery) => boolean; + matcher?: (term: string, text: string, option: any) => boolean; formatSelection?: (object: any, container: JQuery) => string; formatResult?: (object: any, container: JQuery, query: any) => string; formatResultCssClass?: (object: any) => string; From 1ebd49703ad865858ae9e92adb716d486fbe3b90 Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Thu, 31 Oct 2013 11:46:43 +0400 Subject: [PATCH 139/150] Fix Leaflet TileLayer.WMS class definition --- leaflet/leaflet.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 5cdc961bdf..46f6bea73f 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -932,7 +932,7 @@ declare module L { */ setUrl(urlTemplate: string): TileLayer; - static WMS: new () => WMS; + static WMS: new (url: string, options: WMSOptions) => WMS; static Canvas: new () => Canvas; @@ -998,7 +998,7 @@ declare module L { } - export class WMS { + export class WMS extends TileLayer { /** * Instantiates a WMS tile layer object given a base URL of the WMS service and * a WMS parameters/options object. @@ -1009,11 +1009,11 @@ declare module L { * Merges an object with the new parameters and re-requests tiles on the current * screen (unless noRedraw was set to true). */ - setParams(params: WMS, noRedraw?: boolean): WMS; + setParams(params: any, noRedraw?: boolean): WMS; } - export class Canvas { + export class Canvas extends TileLayer { /** * Instantiates a Canvas tile layer object given an options object (optionally). */ From 84e6d1bec3756dc0bb5e54690e48d4826694556e Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Thu, 31 Oct 2013 11:59:04 +0400 Subject: [PATCH 140/150] Add OpenLayers map viewing library definitions --- openlayers/openlayers.d.ts | 1713 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1713 insertions(+) create mode 100644 openlayers/openlayers.d.ts diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts new file mode 100644 index 0000000000..7d4d3858a0 --- /dev/null +++ b/openlayers/openlayers.d.ts @@ -0,0 +1,1713 @@ +// Type definitions for OpenLayers.js 2.10 +// Project: https://github.com/openlayers/openlayers +// Definitions by: Ilya Bolkhovsky +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module OpenLayers { + + export interface MapOptions { + + projection?: string; + + maxExtend?: Bounds; + + center?: LonLat; + } + + export interface DistanceOptions { + /** + * Return details from the distance calculation. Default is false. + */ + details?: boolean; + + /** + * Calculate the distance from this geometry to the nearest edge of the target geometry. Default is true. If true, calling distanceTo from a geometry that is wholly contained within the target will result in a non-zero distance. If false, whenever geometries intersect, calling distanceTo will return 0. If false, details cannot be returned. + */ + edge?: boolean; + } + + export interface BoundsOptions { + /** + * Whether or not to include the border. Default is true. + */ + inclusive?: boolean; + + /** + * If a worldBounds is provided, the + * ll will be considered as contained if it exceeds the world bounds, + * but can be wrapped around the dateline so it is contained by this + * bounds. + */ + worldBounds?: Bounds; + } + + export interface WrapDateLineOptions { + /** + * Allow for a margin of error + * with the 'left' value of this + * bound. + * Default is 0. + */ + leftTolerance?: number; + + /** + * Allow for a margin of error + * with the 'right' value of this + * bound. + * Default is 0. + */ + rightTolerance?: number; + } + + export class Animation { + // TODO + } + + export class String { + // TODO + } + + export class Number { + // TODO + } + + export class Function { + // TODO + } + + export class Array { + // TODO + } + + export class Console { + // TODO + } + + export class Control { + // TODO + } + + export class Event { + // TODO + } + + export class Events { + // TODO + } + + export class Feature { + // TODO + } + + export class Filter { + // TODO + } + + export class Format { + // TODO + } + + export class Handler { + // TODO + } + + export class Icon { + // TODO + } + + export class Kinetic { + // TODO + } + + export class Lang { + // TODO + } + + export class Layer { + // TODO + } + + export class Marker { + // TODO + } + + export class Popup { + // TODO + } + + export class Protocol { + // TODO + } + + export class Renderer { + // TODO + } + + export class Request { + // TODO + } + + export class Rule { + // TODO + } + + export class SingleFile { + // TODO + } + + export class Spherical { + // TODO + } + + export class Strategy { + // TODO + } + + export class Style { + // TODO + } + + export class Style2 { + // TODO + } + + export class StyleMap { + // TODO + } + + export class Symbolizer { + // TODO + } + + export class Tile { + // TODO + } + + export class TileManager { + // TODO + } + + export class Tween { + // TODO + } + + export class Util { + // TODO + } + + export class WPSClient { + // TODO + } + + export class WPSProcess { + // TODO + } + + export class Geometry { + /** + * A unique identifier for this geometry. + */ + id: string; + + /** + * This is set when a Geometry is added as component + * of another geometry + */ + parent: Geometry; + + /** + * The bounds of this geometry + */ + bounds: Bounds; + + /** + * A Geometry is a description of a geographic object. + */ + constructor(); + + /** + * Destroy this geometry. + */ + destroy(): void; + + /** + * Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry. + */ + clone(): Geometry; + + /** + * Set the bounds for this Geometry. + */ + setBounds(bounds: Bounds): void; + + /** + * Nullify this components bounds and that of its parent as well. + */ + clearBounds(): void; + + /** + * Extend the existing bounds to include the new bounds. + * If geometry's bounds is not yet set, then set a new Bounds. + */ + extendBounds(newBounds: Bounds): void; + + /** + * Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster. + */ + getBounds(): Bounds; + + /** + * Calculate the closest distance between two geometries (on the x-y plane). + */ + distanceTo(geometry: Geometry, options: Object): Object; + + /** + * Return a list of all points in this geometry. + */ + getVertices(nodes: boolean): Array; + + /** + * Return whether or not the geometry is at the specified location + */ + atPoint(lonlat: LonLat, toleranceLon?: number, toleranceLat?: number): boolean; + + /** + * Returns the length of the collection by summing its parts + */ + getLength(): number; + + /** + * Returns the area of the collection by summing its parts + */ + getArea(): number; + + /** + * Returns a text representation of the geometry. If the WKT format is + * included in a build, this will be the Well-Known Text + * representation. + */ + toString(): string; + + /** + * Calculate the centroid of this geometry. This method is defined in subclasses. + */ + getCentroid(): Geometry.Point; + + static CLASS_NAME: string; + } + + export class Projection { + /** + * This class offers several methods for interacting with a wrapped pro4js projection object. + */ + constructor(projCode: string, options?: any); + + /** + * Get the string SRS code. + */ + getCode(): string; + + /** + * Get the units string for the projection -- returns null if proj4js is not available. + */ + getUnits(): string; + + /** + * Set a custom transform method between two projections. Use this method in cases where the proj4js lib is not available or where custom projections need to be handled. + */ + addTransform(from: string, to: string, method: () => void); + + /** + * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. + */ + transform(point: Geometry.Point, source: Projection, dest: OpenLayers.Projection): Object; + + /** + * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. + */ + transform(point: Object, source: Projection, dest: OpenLayers.Projection): Object; + + /** + * A null transformation useful for defining projection aliases when proj4js is not available: + */ + nullTransform(point: Object): Function; + } + + export class Bounds { + /** + * Minimum horizontal coordinate. + */ + left: number; + + /** + * Minimum vertical coordinate. + */ + bottom: number; + + /** + * Maximum horizontal coordinate. + */ + right: number; + + /** + * Maximum vertical coordinate. + */ + top: number; + + /** + * Construct a new bounds object. Coordinates can either be passed as four + * arguments, or as a single argument. + */ + constructor(left: number, bottom: number, right: number, top: number); + + /** + * Construct a new bounds object. Coordinates can either be passed as four + * arguments, or as a single argument. + */ + constructor(bounds: number[]); + + /** + * Create a cloned instance of this bounds. + */ + clone(): Bounds; + + /** + * Test a two bounds for equivalence. + */ + equals(bounds: Bounds): boolean; + + /** + * Returns a string representation of the bounds object. + */ + toString(): string; + + /** + * Returns an array representation of the bounds object. + */ + toArray(reverseAxisOrder?: boolean): number[]; + + /** + * Returns a boundingbox-string representation of the bounds object. + */ + toBBOX(decimal?: number, reverseAxisOrder?: boolean): string; + + /** + * Create a new polygon geometry based on this bounds. + */ + toGeometry(): OpenLayers.Geometry.Polygon; + + /** + * Returns the width of the bounds. + */ + getWidth(): number; + + /** + * Returns the height of the bounds. + */ + getHeight(): number; + + /** + * + */ + getSize(): Size; + + /** + * Returns the Pixel object which represents the center of the bounds. + */ + getCenterPixel(): Pixel; + + /** + * Returns the LonLat object which represents the center of the bounds. + */ + getCenterLonLat(): LonLat; + + /** + * Scales the bounds around a pixel or lonlat. Note that the new + * bounds may return non-integer properties, even if a pixel + * is passed. + */ + scale(ratio: number, origin?: Pixel); + + /** + * Scales the bounds around a pixel or lonlat. Note that the new + * bounds may return non-integer properties, even if a pixel + * is passed. + */ + scale(ratio: number, origin?: LonLat); + + /** + * Shifts the coordinates of the bound by the given horizontal and vertical + * deltas. + */ + add(x: number, y: number): Bounds; + + /** + * Extend the bounds. + */ + extend(object: LonLat): void; + + /** + * Extend the bounds. + */ + extend(object: Geometry.Point): void; + + /** + * Extend the bounds. + */ + extend(object: Bounds): void; + + /** + * + */ + extendXY(x: number, y: number): void; + + /** + * Returns whether the bounds object contains the given . + */ + containsLonLat(ll: LonLat, options: BoundsOptions); + + /** + * Returns whether the bounds object contains the given . + */ + containsLonLat(ll: Object, options: BoundsOptions); + + /** + * Returns whether the bounds object contains the given . + */ + containsPixel(px: Pixel, inclusive: boolean): boolean; + + /** + * Returns whether the bounds object contains the given x and y. + */ + contains(x: number, y: number, inclusive?: boolean): boolean; + + /** + * Determine whether the target bounds intersects this bounds. Bounds are + * considered intersecting if any of their edges intersect or if one + * bounds contains the other. + */ + intersectsBounds(bounds: Bounds, options: BoundsOptions): boolean; + + /** + * Returns whether the bounds object contains the given . + */ + containsBounds(bounds: Bounds, partial: boolean, inclusive: boolean): boolean; + + /** + * Returns the the quadrant ("br", "tr", "tl", "bl") in which the given + * lies. + */ + determineQuadrant(lonlat: LonLat): string; + + /** + * Transform the Bounds object from source to dest. + */ + transform(source: Projection, dest: Projection): Bounds; + + /** + * Wraps the bounds object around the dateline. + */ + wrapDateLine(maxExtent: Bounds, options: WrapDateLineOptions): Bounds; + + static CLASS_NAME: string; + + /** + * Alternative constructor that builds a new OpenLayers.Bounds from a + * parameter string. + */ + static fromString(str: string, reverseAxisOrder: boolean): Bounds; + + /** + * Alternative constructor that builds a new OpenLayers.Bounds from an array. + */ + static fromArray(bbox: number[], reverseAxisOrder: boolean): Bounds; + + /** + * Alternative constructor that builds a new OpenLayers.Bounds from a size. + */ + static fromSize(size: Size): Bounds; + + /** + * Get the opposite quadrant for a given quadrant string. + */ + static oppositeQuadrant(quadrant: string): string; + } + + export class LonLat { + /** + * Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. + */ + constructor(lon: number, lat: number); + + /** + * Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. + */ + constructor(lonlat: number[]); + + /** + * Shortened String representation of OpenLayers.LonLat object. + */ + toShortString(): string; + + /** + * New OpenLayers.LonLat object with the same lon and lat values + */ + clone(): LonLat; + + /** + * A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. + */ + add(lon: number, lat: number): LonLat; + + /** + * Boolean value indicating whether the passed-in OpenLayers.LonLat object has the same lon and lat components as this. Note: if ll passed in is null, returns false. + */ + equals(ll: LonLat): boolean; + + /** + * Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first. + */ + transform(source: Projection, dest: Projection): LonLat; + + /** + * Returns a copy of this lonlat, but wrapped around the "dateline" (as specified by the borders of maxExtent). + */ + wrapDateLine(maxExtend: Bounds): LonLat; + } + + export class Map { + /** + * Unique identifier for the map + */ + id: string; + + /** + * For a base layer that supports it, allow the map resolution + * to be set to a value between one of the values in the resolutions + * array. Default is false. + */ + fractionalZoom: boolean; + + /** + * An events object that handles all + * events on the map + */ + events: Events; + + /** + * Allow the map to function with "overlays" only. Defaults to + * false. If true, the lowest layer in the draw order will act as + * the base layer. In addition, if set to true, all layers will + * have isBaseLayer set to false when they are added to the map. + */ + allOverlays: boolean; + + /** + * The element that contains the map (or an id for that element). + */ + div: Object; + + /** + * The map is currently being dragged. + */ + dragging: boolean; + + /** + * Size of the main div (this.div) + */ + size: Size; + + /** + * The element that represents the map viewport + */ + viewPortDiv: HTMLDivElement; + + /** + * The lonlat at which the later container was re-initialized (on-zoom) + */ + layerContainerOrigin: LonLat; + + /** + * The element that contains the layers. + */ + layerContainerDiv: HTMLDivElement; + + /** + * Ordered list of layers in the map + */ + layers: Layer[]; + + /** + * List of controls associated with the map. + */ + controls: Control[]; + + /** + * List of popups associated with the map + */ + popups: Popup[]; + + /** + * The currently selected base layer. This determines + * min/max zoom level, projection, etc. + */ + baseLayer: Layer; + + /** + * The current center of the map + */ + center: LonLat; + + /** + * The resolution of the map. + */ + resolution: number; + + /** + * The current zoom level of the map + */ + zoom: number; + + /** + * The ratio of the current extent within which panning will tween. + */ + panRatio: number; + + /** + * The options object passed to the class constructor. Read-only. + */ + options: Object; + + /** + * Set in the map options to override the default tile size for this map. + */ + tileSize: Size; + + /** + * Set in the map options to specify the default projection + * for layers added to this map. When using a projection other than EPSG:4326 + * (CRS:84, Geographic) or EPSG:3857 (EPSG:900913, Web Mercator), + * also set maxExtent, maxResolution or resolutions. Default is "EPSG:4326". + * Note that the projection of the map is usually determined + * by that of the current baseLayer (see and ). + */ + projection: string; + + /** + * The map units. Possible values are 'degrees' (or 'dd'), 'm', + * 'ft', 'km', 'mi', 'inches'. Normally taken from the projection. + * Only required if both map and layers do not define a projection, + * or if they define a projection which does not define units + */ + units: string; + + /** + * A list of map resolutions (map units per pixel) in + * descending order. If this is not set in the layer constructor, it + * will be set based on other resolution related properties + * (maxExtent, maxResolution, maxScale, etc.). + */ + resolutions: number[]; + + /** + * Required if you are not displaying the whole world on a tile + * with the size specified in . + */ + maxResolution: number; + + + + + constructor(id: HTMLElement, options?: MapOptions); + + constructor(id: string, options?: MapOptions); + + /** + * + */ + addLayer(layer: Layer): boolean; + + /** + * Set the map center (and optionally, the zoom level). + */ + setCenter(lonlat: LonLat, zoom?: number, dragging?: boolean, forceZoomChange?: boolean): void; + + /** + * Set the map center (and optionally, the zoom level). + */ + setCenter(lonlat: number[], zoom?: number, dragging?: boolean, forceZoomChange?: boolean): void; + + /** + * + */ + prop: string; + } + + export class Class { + + } + + export class Date { + + } + + export class Element { + + } + + export class Pixel { + + } + + export class Size { + + } + + module Geometry { + + export class Collection extends Geometry { + /** + * The component parts of this geometry + */ + components: Geometry[]; + + /** + * An array of class names representing the types of + * components that the collection can include. A null value means the + * component types are not restricted. + */ + componentTypes: string[]; + + /** + * Creates a Geometry Collection -- a list of geoms. + */ + constructor(components: Geometry[]); + + /** + * Destroy this geometry. + */ + destroy(): void; + + /** + * Clone this geometry. + */ + clone(): Collection; + + /** + * Get a string representing the components for this collection + */ + getComponentsString(): string; + + /** + * Recalculate the bounds by iterating through the components and + * calling calling extendBounds() on each item. + */ + calculateBounds(); + + /** + * Add components to this geometry. + */ + addComponents(components: Geometry[]); + + /** + * Add a new component (geometry) to the collection. If this.componentTypes + * is set, then the component class name must be in the componentTypes array. + */ + addComponent(component: Geometry, index: number): boolean; + + /** + * Remove components from this geometry. + */ + removeComponents(components: Geometry[]): boolean; + + /** + * Remove a component from this geometry. + */ + removeComponent(component: Geometry): boolean; + + /** + * Calculate the length of this geometry + */ + getLength(): number; + + /** + * Calculate the area of this geometry. Note how this function is overridden + * in . + */ + getArea(): number; + + /** + * Calculate the approximate area of the polygon were it projected onto + * the earth. + */ + getGeodesicArea(projection: Projection): number; + + /** + * Compute the centroid for this geometry collection. + */ + getCentroid(weighted?: boolean): Point; + + /** + * Calculate the approximate length of the geometry were it projected onto + * the earth. + */ + getGeodesicLength(projection: Projection): number; + + /** + * Moves a geometry by the given displacement along positive x and y axes. + * This modifies the position of the geometry and clears the cached + * bounds. + */ + move(x: number, y: number): void; + + /** + * Rotate a geometry around some origin + */ + rotate(angle: number, origin: Point); + + /** + * Resize a geometry relative to some origin. Use this method to apply + * a uniform scaling to a geometry. + */ + resize(scale: number, origin: Point, ratio: number): Geometry; + + /** + * Calculate the closest distance between two geometries (on the x-y plane). + */ + distanceTo(geometry: Geometry, options: DistanceOptions): Object; + + /** + * Determine whether another geometry is equivalent to this one. Geometries + * are considered equivalent if all components have the same coordinates. + */ + equals(geometry: Geometry): boolean; + + /** + * Reproject the components geometry from source to dest. + */ + transform(source: Projection, dest: Projection): Geometry; + + /** + * Determine if the input geometry intersects this one. + */ + intersects(geometry: Geometry): boolean; + + /** + * Return a list of all points in this geometry. + */ + getVertices(nodes: boolean): Array; + + static CLASS_NAME: string; + } + + export class Point extends Geometry { + + x: number; + + y: number; + + /** + * Construct a point geometry. + */ + constructor(x: number, y: number); + + /** + * Create a clone of this geometry. + */ + clone(): Geometry; + + /** + * An exact clone of this OpenLayers.Geometry.Point + */ + clone(obj: Point): Point; + + /** + * Calculate the closest distance between two geometries (on the x-y plane). + */ + distanceTo(geometry: Geometry, options: DistanceOptions): Object; + + /** + * Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates. + */ + equals(geom: Point): boolean; + + /** + * Moves a geometry by the given displacement along positive x and y axes. This modifies the position of the geometry and clears the cached bounds. + */ + move(x: number, y: number): void; + + /** + * Rotate a point around another. + */ + rotate(angle: number, origin: Point); + + /** + * Resize a point relative to some origin. For points, this has the effect of scaling a vector (from the origin to the point). This method is more useful on geometry collection subclasses. + */ + resize(scale: number, origin: Point, ratio: number): Geometry; + + /** + * Determine if the input geometry intersects this one. + */ + intersects(geometry: Geometry): boolean; + + /** + * Translate the x,y properties of the point from source to dest. + */ + transform(source: Projection, dest: Projection): Geometry; + + /** + * Return a list of all points in this geometry. + */ + getVertices(nodes: boolean): Array; + } + + export class Curve extends Geometry.MultiPoint { + + } + + export class LineString extends Geometry.Curve { + + } + + export class LinearRing extends Geometry.LineString { + + } + + export class MultiLineString extends Geometry.Collection { + + } + + export class MultiPoint extends Geometry.Collection { + + } + + export class MultiPolygon extends Geometry.Collection { + + } + + export class Polygon extends Geometry.Collection { + + } + } + + module Control { + export class ArgParser { + + } + + export class Attribution { + + } + + export class Button { + + } + + export class CacheRead { + + } + + export class CacheWrite { + + } + + export class DragFeature { + + } + + export class DragPan { + + } + + export class DrawFeature { + + } + + export class EditingToolbar { + + } + + export class Geolocate { + + } + + export class GetFeature { + + } + + export class Graticule { + + } + + export class KeyboardDefaults { + + } + + export class LayerSwitcher { + + } + + export class Measure { + + } + + export class ModifyFeature { + + } + + export class MousePosition { + + } + + export class NavToolbar { + + } + + export class Navigation { + + } + + export class NavigationHistory { + + } + + export class OverviewMap { + + } + + export class Pan { + + } + + export class PanPanel { + + } + + export class PanZoom { + + } + + export class PanZoomBar { + + } + + export class Panel { + + } + + export class Permalink { + + } + + export class PinchZoom { + + } + + export class SLDSelect { + + } + + export class Scale { + + } + + export class ScaleLine { + + } + + export class SelectFeature { + + } + + export class Snapping { + + } + + export class Split { + + } + + export class TextButtonPanel { + + } + + export class TouchNavigation { + + } + + export class TransformFeature { + + } + + export class UTFGrid { + + } + + export class WMSGetFeatureInfo { + + } + + export class WMTSGetFeatureInfo { + + } + + export class Zoom { + + } + + export class ZoomBox { + + } + + export class ZoomIn { + + } + + export class ZoomOut { + + } + + export class ZoomPanel { + + } + + export class ZoomToMaxExtent { + + } + } + + module Events { + export class buttonclick extends OpenLayers.Class { + + } + + export class featureclick extends OpenLayers.Class { + + } + } + + module Feature { + export class Vector { + + } + } + + module Filter { + export class Comparison { + + } + + export class FeatureId { + + } + + export class Function { + + } + + export class Logical { + + } + + export class Spatial { + + } + } + + module Format { + export class ArcXML { + constructor(); + } + + export class Atom { + + } + + export class CQL { + + } + + export class CSWGetDomain { + + } + + export class CSWGetRecords { + + } + + export class Context { } + export class EncodedPolyline { } + export class Filter { } + export class GML { } + export class GPX { } + export class GeoJSON { } + export class GeoRSS { } + export class JSON { } + export class KML { } + export class OGCExceptionReport { } + export class OSM { } + export class OWSCommon { } + export class OWSContext { } + export class QueryStringFilter { } + export class SLD { } + export class SOSCapabilities { } + export class SOSGetFeatureOfInterest { } + export class SOSGetObservation { } + export class TMSCapabilities { } + export class Text { } + export class WCSCapabilities { } + export class WCSDescribeCoverage { } + export class WCSGetCoverage { } + export class WFS { } + export class WFSCapabilities { } + export class WFSDescribeFeatureType { } + export class WFST { } + export class WKT { } + export class WMC { } + export class WMSCapabilities { } + export class WMSDescribeLayer { } + export class WMSGetFeatureInfo { } + export class WMTSCapabilities { } + export class WPSCapabilities { } + export class WPSDescribeProcess { } + export class WPSExecute { } + export class XLS { } + export class XML { } + + module ArcXML { + export class Features extends OpenLayers.Class { + + } + } + + module CSWGetDomain { + export class v2_0_2 { } + } + + module CSWGetRecords { + export class v2_0_2 { } + } + + module Filter { + + } + + module GML { + + } + + module OWSCommon { + + } + + module OWSContext { + + } + + module SLD { + + } + + module SOSCapabilities { + + } + + module WCSCapabilities { + + } + + module WCSDescribeCoverage { + + } + + module WFSCapabilities { + + } + + module WFST { + + } + + module WMC { + + } + + module WMSCapabilities { + + + } + + module WMSDescribeLayer { + + } + + module WMTSCapabilities { + + } + + module WPSCapabilities { + + } + + module XLS { + + } + + module XML { + + } + } + + module Handler { + export class Box { + + } + + export class Click { + + } + + export class Drag { + + } + + export class Feature { + + } + + export class Hover { + + } + + export class Keyboard { + + } + + export class MouseWheel { + + } + + export class Path { + + } + + export class Pinch { + + } + + export class Point { + + } + + export class Polygon { + + } + + export class RegularPolygon { + + } + } + + module Lang { + + } + + module Layer { + export interface WMSGetMapParams { + version?: string; + exceptions?: string; + transparent?: string; + format?: string; + styles?: string; + layers: string; + service?: string; + } + + export interface WMSOptions { + opacity?: number; + singleTile?: boolean; + isBaseLayer?: boolean; + encodeBBOX?: boolean; + noMagic?: boolean; + yx?: Object; + } + + export interface TileOptions { + crossOriginKeyword?: string; + } + + export class ArcGIS93Rest { } + export class ArcGISCache { } + export class ArcIMS { } + export class Bing { } + export class Boxes { } + export class EventPane { } + export class FixedZoomLevels { } + export class GeoRSS { } + export class Google { } + export class Grid { } + export class HTTPRequest { } + export class Image { } + export class KaMap { } + export class KaMapCache { } + export class MapGuide { } + export class MapServer { } + export class Markers { } + + export class OSM extends Layer.XYZ { + /** + * The layer name. Defaults to "OpenStreetMap" if the first + * argument to the constructor is null or undefined. + */ + name: string; + + /** + * The tileset URL scheme. Defaults to + * : http://[a|b|c].tile.openstreetmap.org/${z}/${x}/${y}.png + * (the official OSM tileset) if the second argument to the constructor + * is null or undefined. To use another tileset you can have something + * like this: + * new OpenLayers.Layer.OSM("OpenCycleMap", + * ["http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", + * "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", + * "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"]); + */ + url: string[]; + + /** + * The layer attribution. + */ + attribution: string; + + sphericalMercator: boolean; + + wrapDateLine: boolean; + + /** + * optional configuration options for instances + * created by this Layer. + */ + tileOptions: TileOptions; + + constructor(); + + constructor(name: string, url: string, options: TileOptions); + + /** + * Create a clone of this layer + */ + clone(): Layer.WMS; + + static CLASS_NAME: string; + } + + export class PointGrid { } + export class PointTrack { } + export class SphericalMercator { } + export class TMS { } + export class Text { } + export class TileCache { } + export class UTFGrid { } + export class Vector { } + + export class WMS { + /** + * Default is true for WMS layer + */ + isBaseLayer: boolean; + + /** + * Should the BBOX commas be encoded? The WMS spec says 'no', + * but some services want it that way. Default false. + */ + encodeBBOX: boolean; + + /** + * If true, the image format will not be automagicaly switched + * from image/jpeg to image/png or image/gif when using + * TRANSPARENT=TRUE. Also isBaseLayer will not changed by the + * constructor. Default false. + */ + noMagic: boolean; + + /** + * Keys in this object are EPSG codes for which the axis order + * is to be reversed (yx instead of xy, LatLon instead of LonLat), with + * true as value. This is only relevant for WMS versions >= 1.3.0, and + * only if yx is not set in for the + * used projection. + */ + yx: Object; + + /** + * Constructor: OpenLayers.Layer.WMS + * Create a new WMS layer object + * + * Examples: + * + * The code below creates a simple WMS layer using the image/jpeg format. + * (code) + * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic", + * "http://wms.jpl.nasa.gov/wms.cgi", + * {layers: "modis,global_mosaic"}); + * (end) + * Note the 3rd argument (params). Properties added to this object will be + * added to the WMS GetMap requests used for this layer's tiles. The only + * mandatory parameter is "layers". Other common WMS params include + * "transparent", "styles" and "format". Note that the "srs" param will + * always be ignored. Instead, it will be derived from the baseLayer's or + * map's projection. + * + * The code below creates a transparent WMS layer with additional options. + * (code) + * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic", + * "http://wms.jpl.nasa.gov/wms.cgi", + * { + * layers: "modis,global_mosaic", + * transparent: true + * }, { + * opacity: 0.5, + * singleTile: true + * }); + * (end) + * Note that by default, a WMS layer is configured as baseLayer. Setting + * the "transparent" param to true will apply some magic (see ). + * The default image format changes from image/jpeg to image/png, and the + * layer is not configured as baseLayer. + * + * Parameters: + * name - {String} A name for the layer + * url - {String} Base url for the WMS + * (e.g. http://wms.jpl.nasa.gov/wms.cgi) + * params - {Object} An object with key/value pairs representing the + * GetMap query string parameters and parameter values. + * options - {Object} Hashtable of extra options to tag onto the layer. + * These options include all properties listed above, plus the ones + * inherited from superclasses. + */ + constructor(name: string, url: string, params: WMSGetMapParams, options: WMSOptions); + + /** + * Create a clone of this layer + */ + clone(): Layer.WMS; + + /** + * Returns true if the axis order is reversed for the WMS version and + * projection of the layer. + */ + reverseAxisOrder(): boolean; + + /** + * Return a GetMap query string for this layer + */ + getURL(bounds: Bounds): string; + + /** + * Catch changeParams and uppercase the new params to be merged in + * before calling changeParams on the super class. + * Once params have been changed, the tiles will be reloaded with + * the new parameters. + */ + mergeNewParams(newParams): void; + + /** + * Combine the layer's url with its params and these newParams. + * + * Add the SRS parameter from projection -- this is probably + * more eloquently done via a setProjection() method, but this + * works for now and always. + */ + getFullRequestString(newParams: Object, altUrl: string): string; + + static CLASS_NAME: string; + } + + export class WMTS { } + export class WorldWind { } + export class XYZ { } + export class Zoomify { } + + module Google { + export class v3 { } + } + + module Vector { + export class RootContainer { } + } + } + + module Marker { + export class Box { } + } + + module Popup { + export class Anchored { } + export class Framed { } + export class FramedCloud { } + } + + module Protocol { + export class CSW { } + export class HTTP { } + export class SOS { } + export class Script { } + export class WFS { } + + module CSW { + export class v2_0_2 { } + } + + module SOS { + export class v1_0_0 { } + } + + module WFS { + export class v2_0_0 { } + } + } + + module Renderer { + export class Canvas { } + export class Elements { } + export class SVG { } + export class VML { } + } + + module Request { + export class XMLHttpRequest { } + } + + module Strategy { + export class BBOX { } + export class Cluster { } + export class Filter { } + export class Fixed { } + export class Paging { } + export class Refresh { } + export class Save { } + } + + module Symbolizer { + export class Line { } + export class Point { } + export class Polygon { } + export class Raster { } + export class Text { } + } + + module Tile { + export class Image { } + export class UTFGrid { } + + module Image { + export class IFrame { } + } + } + + module Util { + export class vendorPrefix { } + } +} + From 842cb25dd1a8afdf08a2f0cd722fad71c62b30b5 Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Thu, 31 Oct 2013 12:11:05 +0400 Subject: [PATCH 141/150] fix OpenLayers definitions --- openlayers/openlayers.d.ts | 469 +++++++++++++++++++++++++++++++++++++ 1 file changed, 469 insertions(+) diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index 7d4d3858a0..1a4e70d658 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -16,34 +16,57 @@ declare module OpenLayers { export interface DistanceOptions { /** +<<<<<<< HEAD * Return details from the distance calculation. Default is false. +======= + *Return details from the distance calculation. Default is false. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ details?: boolean; /** +<<<<<<< HEAD * Calculate the distance from this geometry to the nearest edge of the target geometry. Default is true. If true, calling distanceTo from a geometry that is wholly contained within the target will result in a non-zero distance. If false, whenever geometries intersect, calling distanceTo will return 0. If false, details cannot be returned. +======= + *Calculate the distance from this geometry to the nearest edge of the target geometry. Default is true. If true, calling distanceTo from a geometry that is wholly contained within the target will result in a non-zero distance. If false, whenever geometries intersect, calling distanceTo will return 0. If false, details cannot be returned. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ edge?: boolean; } export interface BoundsOptions { /** +<<<<<<< HEAD * Whether or not to include the border. Default is true. +======= + *Whether or not to include the border. Default is true. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ inclusive?: boolean; /** +<<<<<<< HEAD * If a worldBounds is provided, the * ll will be considered as contained if it exceeds the world bounds, * but can be wrapped around the dateline so it is contained by this * bounds. +======= + *If a worldBounds is provided, the + *ll will be considered as contained if it exceeds the world bounds, + *but can be wrapped around the dateline so it is contained by this + *bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ worldBounds?: Bounds; } export interface WrapDateLineOptions { /** +<<<<<<< HEAD * Allow for a margin of error +======= + *Allow for a margin of error +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * with the 'left' value of this * bound. * Default is 0. @@ -51,7 +74,11 @@ declare module OpenLayers { leftTolerance?: number; /** +<<<<<<< HEAD * Allow for a margin of error +======= + *Allow for a margin of error +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * with the 'right' value of this * bound. * Default is 0. @@ -205,91 +232,161 @@ declare module OpenLayers { export class Geometry { /** +<<<<<<< HEAD * A unique identifier for this geometry. +======= + *A unique identifier for this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ id: string; /** +<<<<<<< HEAD * This is set when a Geometry is added as component * of another geometry +======= + *This is set when a Geometry is added as component + *of another geometry +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ parent: Geometry; /** +<<<<<<< HEAD * The bounds of this geometry +======= + *The bounds of this geometry +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ bounds: Bounds; /** +<<<<<<< HEAD * A Geometry is a description of a geographic object. +======= + *A Geometry is a description of a geographic object. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(); /** +<<<<<<< HEAD * Destroy this geometry. +======= + *Destroy this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ destroy(): void; /** +<<<<<<< HEAD * Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry. +======= + *Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Geometry; /** +<<<<<<< HEAD * Set the bounds for this Geometry. +======= + *Set the bounds for this Geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ setBounds(bounds: Bounds): void; /** +<<<<<<< HEAD * Nullify this components bounds and that of its parent as well. +======= + *Nullify this components bounds and that of its parent as well. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clearBounds(): void; /** +<<<<<<< HEAD * Extend the existing bounds to include the new bounds. * If geometry's bounds is not yet set, then set a new Bounds. +======= + *Extend the existing bounds to include the new bounds. + *If geometry's bounds is not yet set, then set a new Bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extendBounds(newBounds: Bounds): void; /** +<<<<<<< HEAD * Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster. +======= + *Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getBounds(): Bounds; /** +<<<<<<< HEAD * Calculate the closest distance between two geometries (on the x-y plane). +======= + *Calculate the closest distance between two geometries (on the x-y plane). +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ distanceTo(geometry: Geometry, options: Object): Object; /** +<<<<<<< HEAD * Return a list of all points in this geometry. +======= + *Return a list of all points in this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getVertices(nodes: boolean): Array; /** +<<<<<<< HEAD * Return whether or not the geometry is at the specified location +======= + *Return whether or not the geometry is at the specified location +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ atPoint(lonlat: LonLat, toleranceLon?: number, toleranceLat?: number): boolean; /** +<<<<<<< HEAD * Returns the length of the collection by summing its parts +======= + *Returns the length of the collection by summing its parts +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getLength(): number; /** +<<<<<<< HEAD * Returns the area of the collection by summing its parts +======= + *Returns the area of the collection by summing its parts +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getArea(): number; /** +<<<<<<< HEAD * Returns a text representation of the geometry. If the WKT format is +======= + *Returns a text representation of the geometry. If the WKT format is +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * included in a build, this will be the Well-Known Text * representation. */ toString(): string; /** +<<<<<<< HEAD * Calculate the centroid of this geometry. This method is defined in subclasses. +======= + *Calculate the centroid of this geometry. This method is defined in subclasses. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCentroid(): Geometry.Point; @@ -298,111 +395,195 @@ declare module OpenLayers { export class Projection { /** +<<<<<<< HEAD * This class offers several methods for interacting with a wrapped pro4js projection object. +======= + *This class offers several methods for interacting with a wrapped pro4js projection object. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(projCode: string, options?: any); /** +<<<<<<< HEAD * Get the string SRS code. +======= + *Get the string SRS code. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCode(): string; /** +<<<<<<< HEAD * Get the units string for the projection -- returns null if proj4js is not available. +======= + *Get the units string for the projection -- returns null if proj4js is not available. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getUnits(): string; /** +<<<<<<< HEAD * Set a custom transform method between two projections. Use this method in cases where the proj4js lib is not available or where custom projections need to be handled. +======= + *Set a custom transform method between two projections. Use this method in cases where the proj4js lib is not available or where custom projections need to be handled. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ addTransform(from: string, to: string, method: () => void); /** +<<<<<<< HEAD * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. +======= + *Transform a point coordinate from one projection to another. Note that the input point is transformed in place. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(point: Geometry.Point, source: Projection, dest: OpenLayers.Projection): Object; /** +<<<<<<< HEAD * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. +======= + *Transform a point coordinate from one projection to another. Note that the input point is transformed in place. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(point: Object, source: Projection, dest: OpenLayers.Projection): Object; /** +<<<<<<< HEAD * A null transformation useful for defining projection aliases when proj4js is not available: +======= + *A null transformation useful for defining projection aliases when proj4js is not available: +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ nullTransform(point: Object): Function; } export class Bounds { /** +<<<<<<< HEAD * Minimum horizontal coordinate. +======= + *Minimum horizontal coordinate. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ left: number; /** +<<<<<<< HEAD * Minimum vertical coordinate. +======= + *Minimum vertical coordinate. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ bottom: number; /** +<<<<<<< HEAD * Maximum horizontal coordinate. +======= + *Maximum horizontal coordinate. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ right: number; /** +<<<<<<< HEAD * Maximum vertical coordinate. +======= + *Maximum vertical coordinate. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ top: number; /** +<<<<<<< HEAD * Construct a new bounds object. Coordinates can either be passed as four +======= + *Construct a new bounds object. Coordinates can either be passed as four +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * arguments, or as a single argument. */ constructor(left: number, bottom: number, right: number, top: number); /** +<<<<<<< HEAD * Construct a new bounds object. Coordinates can either be passed as four +======= + *Construct a new bounds object. Coordinates can either be passed as four +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * arguments, or as a single argument. */ constructor(bounds: number[]); /** +<<<<<<< HEAD * Create a cloned instance of this bounds. +======= + *Create a cloned instance of this bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Bounds; /** +<<<<<<< HEAD * Test a two bounds for equivalence. +======= + *Test a two bounds for equivalence. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(bounds: Bounds): boolean; /** +<<<<<<< HEAD * Returns a string representation of the bounds object. +======= + *Returns a string representation of the bounds object. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toString(): string; /** +<<<<<<< HEAD * Returns an array representation of the bounds object. +======= + *Returns an array representation of the bounds object. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toArray(reverseAxisOrder?: boolean): number[]; /** +<<<<<<< HEAD * Returns a boundingbox-string representation of the bounds object. +======= + *Returns a boundingbox-string representation of the bounds object. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toBBOX(decimal?: number, reverseAxisOrder?: boolean): string; /** +<<<<<<< HEAD * Create a new polygon geometry based on this bounds. +======= + *Create a new polygon geometry based on this bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toGeometry(): OpenLayers.Geometry.Polygon; /** +<<<<<<< HEAD * Returns the width of the bounds. +======= + *Returns the width of the bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getWidth(): number; /** +<<<<<<< HEAD * Returns the height of the bounds. +======= + *Returns the height of the bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getHeight(): number; @@ -417,42 +598,74 @@ declare module OpenLayers { getCenterPixel(): Pixel; /** +<<<<<<< HEAD * Returns the LonLat object which represents the center of the bounds. +======= + *Returns the LonLat object which represents the center of the bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCenterLonLat(): LonLat; /** +<<<<<<< HEAD * Scales the bounds around a pixel or lonlat. Note that the new * bounds may return non-integer properties, even if a pixel * is passed. +======= + *Scales the bounds around a pixel or lonlat. Note that the new + *bounds may return non-integer properties, even if a pixel + *is passed. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ scale(ratio: number, origin?: Pixel); /** +<<<<<<< HEAD * Scales the bounds around a pixel or lonlat. Note that the new * bounds may return non-integer properties, even if a pixel * is passed. +======= + *Scales the bounds around a pixel or lonlat. Note that the new + *bounds may return non-integer properties, even if a pixel + *is passed. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ scale(ratio: number, origin?: LonLat); /** +<<<<<<< HEAD * Shifts the coordinates of the bound by the given horizontal and vertical +======= + *Shifts the coordinates of the bound by the given horizontal and vertical +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * deltas. */ add(x: number, y: number): Bounds; /** +<<<<<<< HEAD * Extend the bounds. +======= + *Extend the bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extend(object: LonLat): void; /** +<<<<<<< HEAD * Extend the bounds. +======= + *Extend the bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extend(object: Geometry.Point): void; /** +<<<<<<< HEAD * Extend the bounds. +======= + *Extend the bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extend(object: Bounds): void; @@ -462,120 +675,208 @@ declare module OpenLayers { extendXY(x: number, y: number): void; /** +<<<<<<< HEAD * Returns whether the bounds object contains the given . +======= + *Returns whether the bounds object contains the given . +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsLonLat(ll: LonLat, options: BoundsOptions); /** +<<<<<<< HEAD * Returns whether the bounds object contains the given . +======= + *Returns whether the bounds object contains the given . +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsLonLat(ll: Object, options: BoundsOptions); /** +<<<<<<< HEAD * Returns whether the bounds object contains the given . +======= + *Returns whether the bounds object contains the given . +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsPixel(px: Pixel, inclusive: boolean): boolean; /** +<<<<<<< HEAD * Returns whether the bounds object contains the given x and y. +======= + *Returns whether the bounds object contains the given x and y. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ contains(x: number, y: number, inclusive?: boolean): boolean; /** +<<<<<<< HEAD * Determine whether the target bounds intersects this bounds. Bounds are * considered intersecting if any of their edges intersect or if one * bounds contains the other. +======= + *Determine whether the target bounds intersects this bounds. Bounds are + *considered intersecting if any of their edges intersect or if one + *bounds contains the other. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ intersectsBounds(bounds: Bounds, options: BoundsOptions): boolean; /** +<<<<<<< HEAD * Returns whether the bounds object contains the given . +======= + *Returns whether the bounds object contains the given . +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsBounds(bounds: Bounds, partial: boolean, inclusive: boolean): boolean; /** +<<<<<<< HEAD * Returns the the quadrant ("br", "tr", "tl", "bl") in which the given +======= + *Returns the the quadrant ("br", "tr", "tl", "bl") in which the given +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * lies. */ determineQuadrant(lonlat: LonLat): string; /** +<<<<<<< HEAD * Transform the Bounds object from source to dest. +======= + *Transform the Bounds object from source to dest. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): Bounds; /** +<<<<<<< HEAD * Wraps the bounds object around the dateline. +======= + *Wraps the bounds object around the dateline. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ wrapDateLine(maxExtent: Bounds, options: WrapDateLineOptions): Bounds; static CLASS_NAME: string; /** +<<<<<<< HEAD * Alternative constructor that builds a new OpenLayers.Bounds from a * parameter string. +======= + *Alternative constructor that builds a new OpenLayers.Bounds from a + *parameter string. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static fromString(str: string, reverseAxisOrder: boolean): Bounds; /** +<<<<<<< HEAD * Alternative constructor that builds a new OpenLayers.Bounds from an array. +======= + *Alternative constructor that builds a new OpenLayers.Bounds from an array. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static fromArray(bbox: number[], reverseAxisOrder: boolean): Bounds; /** +<<<<<<< HEAD * Alternative constructor that builds a new OpenLayers.Bounds from a size. +======= + *Alternative constructor that builds a new OpenLayers.Bounds from a size. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static fromSize(size: Size): Bounds; /** +<<<<<<< HEAD * Get the opposite quadrant for a given quadrant string. +======= + *Get the opposite quadrant for a given quadrant string. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static oppositeQuadrant(quadrant: string): string; } export class LonLat { /** +<<<<<<< HEAD * Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. +======= + *Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(lon: number, lat: number); /** +<<<<<<< HEAD * Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. +======= + *Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(lonlat: number[]); /** +<<<<<<< HEAD * Shortened String representation of OpenLayers.LonLat object. +======= + *Shortened String representation of OpenLayers.LonLat object. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toShortString(): string; /** +<<<<<<< HEAD * New OpenLayers.LonLat object with the same lon and lat values +======= + *New OpenLayers.LonLat object with the same lon and lat values +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): LonLat; /** +<<<<<<< HEAD * A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. +======= + *A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ add(lon: number, lat: number): LonLat; /** +<<<<<<< HEAD * Boolean value indicating whether the passed-in OpenLayers.LonLat object has the same lon and lat components as this. Note: if ll passed in is null, returns false. +======= + *Boolean value indicating whether the passed-in OpenLayers.LonLat object has the same lon and lat components as this. Note: if ll passed in is null, returns false. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(ll: LonLat): boolean; /** +<<<<<<< HEAD * Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first. +======= + *Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): LonLat; /** +<<<<<<< HEAD * Returns a copy of this lonlat, but wrapped around the "dateline" (as specified by the borders of maxExtent). +======= + *Returns a copy of this lonlat, but wrapped around the "dateline" (as specified by the borders of maxExtent). +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ wrapDateLine(maxExtend: Bounds): LonLat; } export class Map { +<<<<<<< HEAD /** * Unique identifier for the map */ @@ -717,10 +1018,13 @@ declare module OpenLayers { +======= +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 constructor(id: HTMLElement, options?: MapOptions); constructor(id: string, options?: MapOptions); +<<<<<<< HEAD /** * @@ -741,6 +1045,8 @@ declare module OpenLayers { * */ prop: string; +======= +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 } export class Class { @@ -767,133 +1073,240 @@ declare module OpenLayers { export class Collection extends Geometry { /** +<<<<<<< HEAD * The component parts of this geometry +======= + *The component parts of this geometry +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ components: Geometry[]; /** +<<<<<<< HEAD * An array of class names representing the types of * components that the collection can include. A null value means the * component types are not restricted. +======= + *An array of class names representing the types of + *components that the collection can include. A null value means the + *component types are not restricted. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ componentTypes: string[]; /** +<<<<<<< HEAD * Creates a Geometry Collection -- a list of geoms. +======= + *Creates a Geometry Collection -- a list of geoms. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(components: Geometry[]); /** +<<<<<<< HEAD * Destroy this geometry. +======= + *Destroy this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ destroy(): void; /** +<<<<<<< HEAD * Clone this geometry. +======= + *Clone this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Collection; /** +<<<<<<< HEAD * Get a string representing the components for this collection +======= + *Get a string representing the components for this collection +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getComponentsString(): string; /** +<<<<<<< HEAD * Recalculate the bounds by iterating through the components and * calling calling extendBounds() on each item. +======= + *Recalculate the bounds by iterating through the components and + *calling calling extendBounds() on each item. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ calculateBounds(); /** +<<<<<<< HEAD * Add components to this geometry. +======= + *Add components to this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ addComponents(components: Geometry[]); /** +<<<<<<< HEAD * Add a new component (geometry) to the collection. If this.componentTypes * is set, then the component class name must be in the componentTypes array. +======= + *Add a new component (geometry) to the collection. If this.componentTypes + *is set, then the component class name must be in the componentTypes array. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ addComponent(component: Geometry, index: number): boolean; /** +<<<<<<< HEAD * Remove components from this geometry. +======= + *Remove components from this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ removeComponents(components: Geometry[]): boolean; /** +<<<<<<< HEAD * Remove a component from this geometry. +======= + *Remove a component from this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ removeComponent(component: Geometry): boolean; /** +<<<<<<< HEAD * Calculate the length of this geometry +======= + *Calculate the length of this geometry +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getLength(): number; /** +<<<<<<< HEAD * Calculate the area of this geometry. Note how this function is overridden * in . +======= + *Calculate the area of this geometry. Note how this function is overridden + *in . +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getArea(): number; /** +<<<<<<< HEAD * Calculate the approximate area of the polygon were it projected onto * the earth. +======= + *Calculate the approximate area of the polygon were it projected onto + *the earth. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getGeodesicArea(projection: Projection): number; /** +<<<<<<< HEAD * Compute the centroid for this geometry collection. +======= + *Compute the centroid for this geometry collection. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCentroid(weighted?: boolean): Point; /** +<<<<<<< HEAD * Calculate the approximate length of the geometry were it projected onto * the earth. +======= + *Calculate the approximate length of the geometry were it projected onto + *the earth. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getGeodesicLength(projection: Projection): number; /** +<<<<<<< HEAD * Moves a geometry by the given displacement along positive x and y axes. * This modifies the position of the geometry and clears the cached * bounds. +======= + *Moves a geometry by the given displacement along positive x and y axes. + *This modifies the position of the geometry and clears the cached + *bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ move(x: number, y: number): void; /** +<<<<<<< HEAD * Rotate a geometry around some origin +======= + *Rotate a geometry around some origin +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ rotate(angle: number, origin: Point); /** +<<<<<<< HEAD * Resize a geometry relative to some origin. Use this method to apply * a uniform scaling to a geometry. +======= + *Resize a geometry relative to some origin. Use this method to apply + *a uniform scaling to a geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ resize(scale: number, origin: Point, ratio: number): Geometry; /** +<<<<<<< HEAD * Calculate the closest distance between two geometries (on the x-y plane). +======= + *Calculate the closest distance between two geometries (on the x-y plane). +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ distanceTo(geometry: Geometry, options: DistanceOptions): Object; /** +<<<<<<< HEAD * Determine whether another geometry is equivalent to this one. Geometries * are considered equivalent if all components have the same coordinates. +======= + *Determine whether another geometry is equivalent to this one. Geometries + *are considered equivalent if all components have the same coordinates. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(geometry: Geometry): boolean; /** +<<<<<<< HEAD * Reproject the components geometry from source to dest. +======= + *Reproject the components geometry from source to dest. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): Geometry; /** +<<<<<<< HEAD * Determine if the input geometry intersects this one. +======= + *Determine if the input geometry intersects this one. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ intersects(geometry: Geometry): boolean; /** +<<<<<<< HEAD * Return a list of all points in this geometry. +======= + *Return a list of all points in this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getVertices(nodes: boolean): Array; @@ -907,57 +1320,101 @@ declare module OpenLayers { y: number; /** +<<<<<<< HEAD * Construct a point geometry. +======= + *Construct a point geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(x: number, y: number); /** +<<<<<<< HEAD * Create a clone of this geometry. +======= + *Create a clone of this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Geometry; /** +<<<<<<< HEAD * An exact clone of this OpenLayers.Geometry.Point +======= + *An exact clone of this OpenLayers.Geometry.Point +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(obj: Point): Point; /** +<<<<<<< HEAD * Calculate the closest distance between two geometries (on the x-y plane). +======= + *Calculate the closest distance between two geometries (on the x-y plane). +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ distanceTo(geometry: Geometry, options: DistanceOptions): Object; /** +<<<<<<< HEAD * Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates. +======= + *Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(geom: Point): boolean; /** +<<<<<<< HEAD * Moves a geometry by the given displacement along positive x and y axes. This modifies the position of the geometry and clears the cached bounds. +======= + *Moves a geometry by the given displacement along positive x and y axes. This modifies the position of the geometry and clears the cached bounds. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ move(x: number, y: number): void; /** +<<<<<<< HEAD * Rotate a point around another. +======= + *Rotate a point around another. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ rotate(angle: number, origin: Point); /** +<<<<<<< HEAD * Resize a point relative to some origin. For points, this has the effect of scaling a vector (from the origin to the point). This method is more useful on geometry collection subclasses. +======= + *Resize a point relative to some origin. For points, this has the effect of scaling a vector (from the origin to the point). This method is more useful on geometry collection subclasses. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ resize(scale: number, origin: Point, ratio: number): Geometry; /** +<<<<<<< HEAD * Determine if the input geometry intersects this one. +======= + *Determine if the input geometry intersects this one. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ intersects(geometry: Geometry): boolean; /** +<<<<<<< HEAD * Translate the x,y properties of the point from source to dest. +======= + *Translate the x,y properties of the point from source to dest. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): Geometry; /** +<<<<<<< HEAD * Return a list of all points in this geometry. +======= + *Return a list of all points in this geometry. +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getVertices(nodes: boolean): Array; } @@ -1414,6 +1871,7 @@ declare module OpenLayers { } module Layer { +<<<<<<< HEAD export interface WMSGetMapParams { version?: string; exceptions?: string; @@ -1437,6 +1895,8 @@ declare module OpenLayers { crossOriginKeyword?: string; } +======= +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 export class ArcGIS93Rest { } export class ArcGISCache { } export class ArcIMS { } @@ -1454,6 +1914,7 @@ declare module OpenLayers { export class MapGuide { } export class MapServer { } export class Markers { } +<<<<<<< HEAD export class OSM extends Layer.XYZ { /** @@ -1502,6 +1963,9 @@ declare module OpenLayers { static CLASS_NAME: string; } +======= + export class OSM { } +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 export class PointGrid { } export class PointTrack { } export class SphericalMercator { } @@ -1509,6 +1973,7 @@ declare module OpenLayers { export class Text { } export class TileCache { } export class UTFGrid { } +<<<<<<< HEAD export class Vector { } export class WMS { @@ -1624,6 +2089,10 @@ declare module OpenLayers { static CLASS_NAME: string; } +======= + export class Vector { } + export class WMS { } +>>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 export class WMTS { } export class WorldWind { } export class XYZ { } From 793b8296f23973e02868b679e00303ae89e64b19 Mon Sep 17 00:00:00 2001 From: Georgios Diamantopoulos Date: Thu, 31 Oct 2013 15:59:20 +0200 Subject: [PATCH 142/150] Added args param to scope.$eval --- angularjs/angular.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 08f22481a6..f396593ef5 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -215,8 +215,8 @@ declare module ng { $emit(name: string, ...args: any[]): IAngularEvent; // Documentation says exp is optional, but actual implementaton counts on it - $eval(expression: string): any; - $eval(expression: (scope: IScope) => any): 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; From 2838400693d97cf347a66a1143d5b2057f72736a Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Fri, 1 Nov 2013 12:00:44 +0400 Subject: [PATCH 143/150] more definitions added --- openlayers/openlayers.d.ts | 3556 +++++++++++++++++++++++++++++------- 1 file changed, 2929 insertions(+), 627 deletions(-) diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index 1a4e70d658..8a7f5e741c 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -16,57 +16,34 @@ declare module OpenLayers { export interface DistanceOptions { /** -<<<<<<< HEAD * Return details from the distance calculation. Default is false. -======= - *Return details from the distance calculation. Default is false. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ details?: boolean; /** -<<<<<<< HEAD * Calculate the distance from this geometry to the nearest edge of the target geometry. Default is true. If true, calling distanceTo from a geometry that is wholly contained within the target will result in a non-zero distance. If false, whenever geometries intersect, calling distanceTo will return 0. If false, details cannot be returned. -======= - *Calculate the distance from this geometry to the nearest edge of the target geometry. Default is true. If true, calling distanceTo from a geometry that is wholly contained within the target will result in a non-zero distance. If false, whenever geometries intersect, calling distanceTo will return 0. If false, details cannot be returned. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ edge?: boolean; } export interface BoundsOptions { /** -<<<<<<< HEAD * Whether or not to include the border. Default is true. -======= - *Whether or not to include the border. Default is true. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ inclusive?: boolean; /** -<<<<<<< HEAD * If a worldBounds is provided, the * ll will be considered as contained if it exceeds the world bounds, * but can be wrapped around the dateline so it is contained by this * bounds. -======= - *If a worldBounds is provided, the - *ll will be considered as contained if it exceeds the world bounds, - *but can be wrapped around the dateline so it is contained by this - *bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ worldBounds?: Bounds; } export interface WrapDateLineOptions { /** -<<<<<<< HEAD * Allow for a margin of error -======= - *Allow for a margin of error ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * with the 'left' value of this * bound. * Default is 0. @@ -74,11 +51,7 @@ declare module OpenLayers { leftTolerance?: number; /** -<<<<<<< HEAD * Allow for a margin of error -======= - *Allow for a margin of error ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * with the 'right' value of this * bound. * Default is 0. @@ -86,6 +59,10 @@ declare module OpenLayers { rightTolerance?: number; } + export interface LayerOptions { + + } + export class Animation { // TODO } @@ -100,490 +77,991 @@ declare module OpenLayers { export class Function { // TODO - } + } export class Array { // TODO - } + } export class Console { // TODO - } + } export class Control { // TODO - } + } export class Event { // TODO - } + } export class Events { // TODO - } + } export class Feature { // TODO - } + } export class Filter { // TODO - } + } export class Format { // TODO - } + } export class Handler { // TODO - } + } export class Icon { // TODO - } + } export class Kinetic { // TODO - } + } export class Lang { // TODO - } + } export class Layer { - // TODO - } - - export class Marker { - // TODO - } - - export class Popup { - // TODO - } - - export class Protocol { - // TODO - } - - export class Renderer { - // TODO - } - - export class Request { - // TODO - } - - export class Rule { - // TODO - } - - export class SingleFile { - // TODO - } - - export class Spherical { - // TODO - } - - export class Strategy { - // TODO - } - - export class Style { - // TODO - } - - export class Style2 { - // TODO - } - - export class StyleMap { - // TODO - } - - export class Symbolizer { - // TODO - } - - export class Tile { - // TODO - } - - export class TileManager { - // TODO - } - - export class Tween { - // TODO - } - - export class Util { - // TODO - } - - export class WPSClient { - // TODO - } - - export class WPSProcess { - // TODO - } - - export class Geometry { /** -<<<<<<< HEAD - * A unique identifier for this geometry. -======= - *A unique identifier for this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 + * + */ + id: string; + + /** + * + */ + name: string; + + /** + * + */ + div: HTMLElement; + + /** + * The layer's opacity. Float number between 0.0 and 1.0. + */ + opacity: number; + + /** + * If a layer's display should not be scale-based, this should + * be set to true. This will cause the layer, as an overlay, to always + * be 'active', by always returning true from the calculateInRange() + * function. + * + * If not explicitly specified for a layer, its value will be + * determined on startup in initResolutions() based on whether or not + * any scale-specific properties have been set as options on the + * layer. If no scale-specific options have been set on the layer, we + * assume that it should always be in range. + */ + alwaysInRange: boolean; + + /** + * The properties that are used for calculating resolutions information. + */ + RESOLUTION_PROPERTIES: string[]; + + /** + * APIProperty: events + * {} + * + * Register a listener for a particular event with the following syntax: + * (code) + * layer.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * All event objects have at least the following properties: + * object - {Object} A reference to layer.events.object. + * element - {DOMElement} A reference to layer.events.element. + * + * Supported map event types: + * loadstart - Triggered when layer loading starts. When using a Vector + * layer with a Fixed or BBOX strategy, the event object includes + * a *filter* property holding the OpenLayers.Filter used when + * calling read on the protocol. + * loadend - Triggered when layer loading ends. When using a Vector layer + * with a Fixed or BBOX strategy, the event object includes a + * *response* property holding an OpenLayers.Protocol.Response object. + * visibilitychanged - Triggered when the layer's visibility property is + * changed, e.g. by turning the layer on or off in the layer switcher. + * Note that the actual visibility of the layer can also change if it + * gets out of range (see ). If you also want to catch + * these cases, register for the map's 'changelayer' event instead. + * move - Triggered when layer moves (triggered with every mousemove + * during a drag). + * moveend - Triggered when layer is done moving, object passed as + * argument has a zoomChanged boolean property which tells that the + * zoom has changed. + * added - Triggered after the layer is added to a map. Listeners will + * receive an object with a *map* property referencing the map and a + * *layer* property referencing the layer. + * removed - Triggered after the layer is removed from the map. Listeners + * will receive an object with a *map* property referencing the map and + * a *layer* property referencing the layer. + */ + events: Events; + + /** + * This variable is set when the layer is added to + * the map, via the accessor function setMap() + */ + map: Map; + + /** + * Whether or not the layer is a base layer. This should be set + * individually by all subclasses. Default is false + */ + isBaseLayer: boolean; + + /** + * The layer's images have an alpha channel. Default is false. + */ + alpha: boolean; + + /** + * Display the layer's name in the layer switcher. Default is true + */ + displayInLayerSwitcher: boolean; + + /** + * The layer should be displayed in the map. Default is true. + */ + visibility: boolean; + + /** + * Attribution string, displayed when an + * has been added to the map. + */ + attribution: string; + + /** + * The current map resolution is within the layer's min/max + * range. This is set in whenever the zoom + * changes. + */ + inRange: boolean; + + /** + * For layers with a gutter, the image is larger than + * the tile by twice the gutter in each dimension. + */ + imageSize: Size; + + /** + * An optional object whose properties will be set on the layer. + * Any of the layer properties can be set as a property of the options + * object and sent to the constructor when the layer is created. + */ + options: Object; + + /** + * An optional object whose properties will be set on the layer. + * Any of the layer properties can be set as a property of the options + * object and sent to the constructor when the layer is created. + */ + eventListeners: Object; + + /** + * Determines the width (in pixels) of the gutter around image + * tiles to ignore. By setting this property to a non-zero value, + * images will be requested that are wider and taller than the tile + * size by a value of 2 x gutter. This allows artifacts of rendering + * at tile edges to be ignored. Set a gutter value that is equal to + * half the size of the widest symbol that needs to be displayed. + * Defaults to zero. Non-tiled layers always have zero gutter. + */ + gutter: number; + + /** + * Specifies the projection of the layer. + * Can be set in the layer options. If not specified in the layer options, + * it is set to the default projection specified in the map, + * when the layer is added to the map. + * Projection along with default maxExtent and resolutions + * are set automatically with commercial baselayers in EPSG:3857, + * such as Google, Bing and OpenStreetMap, and do not need to be specified. + * Otherwise, if specifying projection, also set maxExtent, + * maxResolution or resolutions as appropriate. + * When using vector layers with strategies, layer projection should be set + * to the projection of the source data if that is different from the map default. + */ + projection: Projection; + + /** + * The layer map units. Defaults to null. Possible values + * are 'degrees' (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'. + * Normally taken from the projection. + * Only required if both map and layers do not define a projection, + * or if they define a projection which does not define units. + */ + units: string; + + /** + * An array of map scales in descending order. The values in the + * array correspond to the map scale denominator. Note that these + * values only make sense if the display (monitor) resolution of the + * client is correctly guessed by whomever is configuring the + * application. In addition, the units property must also be set. + * Use instead wherever possible. + */ + scales: Array; + + /** + * A list of map resolutions (map units per pixel) in descending + * order. If this is not set in the layer constructor, it will be set + * based on other resolution related properties (maxExtent, + * maxResolution, maxScale, etc.). + */ + resolutions: Array; + + /** + * The maximum extent for the layer. Defaults to null. + */ + maxExtent: Bounds; + + /** + * The minimum extent for the layer. Defaults to null. + */ + minExtent: Bounds; + + /** + * Default max is 360 deg / 256 px, which corresponds to + * zoom level 0 on gmaps. Specify a different value in the layer + * options if you are not using the default + * and displaying the whole world. + */ + maxResolution: number; + + /** + * + */ + minResolution: number; + + /** + * + */ + numZoomLevels: number; + + /** + * + */ + minScale: number; + + /** + * + */ + maxScale: number; + + /** + * Request map tiles that are completely outside of the max + * extent for this layer. Defaults to false. + */ + displayOutsideMaxExtent: boolean; + + /** + * Wraps the world at the international dateline, so the map can + * be panned infinitely in longitudinal direction. Only use this on the + * base layer, and only if the layer's maxExtent equals the world bounds. + */ + wrapDateLine: boolean; + + /** + * This object can be used to store additional information on a + * layer object. + */ + metadata: Object; + + /** + * Constructor: OpenLayers.Layer + * + * Parameters: + * name - {String} The layer name + * options - {Object} Hashtable of extra options to tag onto the layer + */ + constructor(name: string, options: LayerOptions); + + /** + * Method: destroy + * Destroy is a destructor: this is to alleviate cyclic references which + * the Javascript garbage cleaner can not take care of on its own. + * + * Parameters: + * setNewBaseLayer - {Boolean} Set a new base layer when this layer has + * been destroyed. Default is true. + */ + destroy(setNewBaseLayer?: boolean); + + /** + * Method: clone + * + * Parameters: + * obj - {} The layer to be cloned + * + * Returns: + * {} An exact clone of this + */ + clone(): Layer; + + /** + * Method: getOptions + * Extracts an object from the layer with the properties that were set as + * options, but updates them with the values currently set on the + * instance. + * + * Returns: + * {Object} the of the layer, representing the current state. + */ + private getOptions(): LayerOptions; + + /** + * APIMethod: setName + * Sets the new layer name for this layer. Can trigger a changelayer event + * on the map. + * + * Parameters: + * newName - {String} The new name. + */ + setName(newName: string): void; + + /** + * APIMethod: addOptions + * + * Parameters: + * newOptions - {Object} + * reinitialize - {Boolean} If set to true, and if resolution options of the + * current baseLayer were changed, the map will be recentered to make + * sure that it is displayed with a valid resolution, and a + * changebaselayer event will be triggered. + */ + addOptions(newOptions: LayerOptions, reinitialize: boolean): void; + + /** + * This function can be implemented by subclasses + */ + onMapResize(): void; + + /** + * APIMethod: redraw + * Redraws the layer. Returns true if the layer was redrawn, false if not. + * + * Returns: + * {Boolean} The layer was redrawn. + */ + redraw(): void; + + /** + * Method: moveTo + * + * Parameters: + * bounds - {} + * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to + * do some init work in that case. + * dragging - {Boolean} + */ + moveTo(bounds: Bounds, zoomChanged: boolean, dragging: boolean): void; + + /** + * Method: moveByPx + * Move the layer based on pixel vector. To be implemented by subclasses. + * + * Parameters: + * dx - {Number} The x coord of the displacement vector. + * dy - {Number} The y coord of the displacement vector. + */ + moveByPx(dx: number, dy: number): void; + + /** + * Method: setMap + * Set the map property for the layer. This is done through an accessor + * so that subclasses can override this and take special action once + * they have their map variable set. + * + * Here we take care to bring over any of the necessary default + * properties from the map. + * + * Parameters: + * map - {} + */ + setMap(map: Map): void; + + /** + * Method: afterAdd + * Called at the end of the map.addLayer sequence. At this point, the map + * will have a base layer. To be overridden by subclasses. + */ + private afterAdd(): void; + + /** + * APIMethod: removeMap + * Just as setMap() allows each layer the possibility to take a + * personalized action on being added to the map, removeMap() allows + * each layer to take a personalized action on being removed from it. + * For now, this will be mostly unused, except for the EventPane layer, + * which needs this hook so that it can remove the special invisible + * pane. + * + * Parameters: + * map - {} + */ + removeMap(map: Map): void; + + /** + * APIMethod: getImageSize + * + * Parameters: + * bounds - {} optional tile bounds, can be used + * by subclasses that have to deal with different tile sizes at the + * layer extent edges (e.g. Zoomify) + * + * Returns: + * {} The size that the image should be, taking into + * account gutters. + */ + getImageSize(bounds: Bounds): Size; + + /** + * APIMethod: setTileSize + * Set the tile size based on the map size. This also sets layer.imageSize + * or use by Tile.Image. + * + * Parameters: + * size - {} + */ + setTileSize(size: Size): void; + + /** + * APIMethod: getVisibility + * + * Returns: + * {Boolean} The layer should be displayed (if in range). + */ + getVisibility(): boolean; + + /** + * APIMethod: setVisibility + * Set the visibility flag for the layer and hide/show & redraw + * accordingly. Fire event unless otherwise specified + * + * Note that visibility is no longer simply whether or not the layer's + * style.display is set to "block". Now we store a 'visibility' state + * property on the layer class, this allows us to remember whether or + * not we *desire* for a layer to be visible. In the case where the + * map's resolution is out of the layer's range, this desire may be + * subverted. + * + * Parameters: + * visibility - {Boolean} Whether or not to display the layer (if in range) + */ + setVisibility(visibility: boolean): void; + + /** + * APIMethod: display + * Hide or show the Layer. This is designed to be used internally, and + * is not generally the way to enable or disable the layer. For that, + * use the setVisibility function instead.. + * + * Parameters: + * display - {Boolean} + */ + display(display: boolean): void; + + /** + * APIMethod: calculateInRange + * + * Returns: + * {Boolean} The layer is displayable at the current map's current + * resolution. Note that if 'alwaysInRange' is true for the layer, + * this function will always return true. + */ + calculateInRange(): boolean; + + /** + * APIMethod: setIsBaseLayer + * + * Parameters: + * isBaseLayer - {Boolean} + */ + setIsBaseLayer(isBaseLayer: boolean): void; + + /********************************************************/ + /* */ + /* Baselayer Functions */ + /* */ + /********************************************************/ + + /** + * Method: initResolutions + * This method's responsibility is to set up the 'resolutions' array + * for the layer -- this array is what the layer will use to interface + * between the zoom levels of the map and the resolution display + * of the layer. + * + * The user has several options that determine how the array is set up. + * + * For a detailed explanation, see the following wiki from the + * openlayers.org homepage: + * http://trac.openlayers.org/wiki/SettingZoomLevels + */ + private initResolutions(): void; + + /** + * Method: resolutionsFromScales + * Derive resolutions from scales. + * + * Parameters: + * scales - {Array(Number)} Scales + * + * Returns + * {Array(Number)} Resolutions + */ + private resolutionsFromScales(scales: number[]): number[]; + + /** + * Method: calculateResolutions + * Calculate resolutions based on the provided properties. + * + * Parameters: + * props - {Object} Properties + * + * Returns: + * {Array({Number})} Array of resolutions. + */ + private calculateResolutions(props: Object): number[]; + + /** + * APIMethod: getResolution + * + * Returns: + * {Float} The currently selected resolution of the map, taken from the + * resolutions array, indexed by current zoom level. + */ + getResolution(): number; + + /** + * APIMethod: getExtent + * + * Returns: + * {} A Bounds object which represents the lon/lat + * bounds of the current viewPort. + */ + getExtent(): Bounds; + + /** + * APIMethod: getZoomForExtent + * + * Parameters: + * extent - {} + * closest - {Boolean} Find the zoom level that most closely fits the + * specified bounds. Note that this may result in a zoom that does + * not exactly contain the entire extent. + * Default is false. + * + * Returns: + * {Integer} The index of the zoomLevel (entry in the resolutions array) + * for the passed-in extent. We do this by calculating the ideal + * resolution for the given extent (based on the map size) and then + * calling getZoomForResolution(), passing along the 'closest' + * parameter. + */ + getZoomForExtent(extent: Bounds, closest?: boolean): number; + + /** + * Method: getDataExtent + * Calculates the max extent which includes all of the data for the layer. + * This function is to be implemented by subclasses. + * + * Returns: + * {} + */ + private getDataExtent(): Bounds; + + /** + * APIMethod: getResolutionForZoom + * + * Parameters: + * zoom - {Float} + * + * Returns: + * {Float} A suitable resolution for the specified zoom. + */ + getResolutionForZoom(zoom: number): number; + + /** + * APIMethod: getZoomForResolution + * + * Parameters: + * resolution - {Float} + * closest - {Boolean} Find the zoom level that corresponds to the absolute + * closest resolution, which may result in a zoom whose corresponding + * resolution is actually smaller than we would have desired (if this + * is being called from a getZoomForExtent() call, then this means that + * the returned zoom index might not actually contain the entire + * extent specified... but it'll be close). + * Default is false. + * + * Returns: + * {Integer} The index of the zoomLevel (entry in the resolutions array) + * that corresponds to the best fit resolution given the passed in + * value and the 'closest' specification. + */ + getZoomForResolution(resolution: number, closest?: boolean): number; + + /** + * APIMethod: getLonLatFromViewPortPx + * + * Parameters: + * viewPortPx - {|Object} An OpenLayers.Pixel or + * an object with a 'x' + * and 'y' properties. + * + * Returns: + * {} An OpenLayers.LonLat which is the passed-in + * view port , translated into lon/lat by the layer. + */ + getLonLatFromViewPortPx(viewPortPx: Pixel): LonLat; + + /** + * APIMethod: getViewPortPxFromLonLat + * Returns a pixel location given a map location. This method will return + * fractional pixel values. + * + * Parameters: + * lonlat - {|Object} An OpenLayers.LonLat or + * an object with a 'lon' + * and 'lat' properties. + * + * Returns: + * {} An which is the passed-in + * lonlat translated into view port pixels. + */ + getViewPortPxFromLonLat(lonlat: LonLat, resolution: number): Pixel; + + /** + * APIMethod: setOpacity + * Sets the opacity for the entire layer (all images) + * + * Parameters: + * opacity - {Float} + */ + setOpacity(opacity: number): void; + + /** + * Method: getZIndex + * + * Returns: + * {Integer} the z-index of this layer + */ + private getZIndex(): number; + + /** + * Method: setZIndex + * + * Parameters: + * zIndex - {Integer} + */ + private setZIndex(zIndex: number): void; + + /** + * Method: adjustBounds + * This function will take a bounds, and if wrapDateLine option is set + * on the layer, it will return a bounds which is wrapped around the + * world. We do not wrap for bounds which *cross* the + * maxExtent.left/right, only bounds which are entirely to the left + * or entirely to the right. + * + * Parameters: + * bounds - {} + */ + private adjustBounds(bounds: Bounds): Bounds; + + static CLASS_NAME: string; + } + + export class Marker { + // TODO + } + + export class Popup { + // TODO + } + + export class Protocol { + // TODO + } + + export class Renderer { + // TODO + } + + export class Request { + // TODO + } + + export class Rule { + // TODO + } + + export class SingleFile { + // TODO + } + + export class Spherical { + // TODO + } + + export class Strategy { + // TODO + } + + export class Style { + // TODO + } + + export class Style2 { + // TODO + } + + export class StyleMap { + // TODO + } + + export class Symbolizer { + // TODO + } + + export class Tile { + // TODO + } + + export class TileManager { + // TODO + } + + export class Tween { + // TODO + } + + export class Util { + // TODO + } + + export class WPSClient { + // TODO + } + + export class WPSProcess { + // TODO + } + + export class Geometry { + /** + * A unique identifier for this geometry. */ id: string; /** -<<<<<<< HEAD * This is set when a Geometry is added as component * of another geometry -======= - *This is set when a Geometry is added as component - *of another geometry ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ parent: Geometry; /** -<<<<<<< HEAD * The bounds of this geometry -======= - *The bounds of this geometry ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ bounds: Bounds; /** -<<<<<<< HEAD * A Geometry is a description of a geographic object. -======= - *A Geometry is a description of a geographic object. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(); /** -<<<<<<< HEAD * Destroy this geometry. -======= - *Destroy this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ destroy(): void; /** -<<<<<<< HEAD * Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry. -======= - *Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Geometry; /** -<<<<<<< HEAD * Set the bounds for this Geometry. -======= - *Set the bounds for this Geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ setBounds(bounds: Bounds): void; /** -<<<<<<< HEAD * Nullify this components bounds and that of its parent as well. -======= - *Nullify this components bounds and that of its parent as well. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clearBounds(): void; /** -<<<<<<< HEAD * Extend the existing bounds to include the new bounds. * If geometry's bounds is not yet set, then set a new Bounds. -======= - *Extend the existing bounds to include the new bounds. - *If geometry's bounds is not yet set, then set a new Bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extendBounds(newBounds: Bounds): void; /** -<<<<<<< HEAD * Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster. -======= - *Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getBounds(): Bounds; /** -<<<<<<< HEAD * Calculate the closest distance between two geometries (on the x-y plane). -======= - *Calculate the closest distance between two geometries (on the x-y plane). ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ distanceTo(geometry: Geometry, options: Object): Object; /** -<<<<<<< HEAD * Return a list of all points in this geometry. -======= - *Return a list of all points in this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getVertices(nodes: boolean): Array; /** -<<<<<<< HEAD * Return whether or not the geometry is at the specified location -======= - *Return whether or not the geometry is at the specified location ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ atPoint(lonlat: LonLat, toleranceLon?: number, toleranceLat?: number): boolean; /** -<<<<<<< HEAD * Returns the length of the collection by summing its parts -======= - *Returns the length of the collection by summing its parts ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getLength(): number; /** -<<<<<<< HEAD * Returns the area of the collection by summing its parts -======= - *Returns the area of the collection by summing its parts ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getArea(): number; /** -<<<<<<< HEAD * Returns a text representation of the geometry. If the WKT format is -======= - *Returns a text representation of the geometry. If the WKT format is ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * included in a build, this will be the Well-Known Text * representation. */ toString(): string; /** -<<<<<<< HEAD * Calculate the centroid of this geometry. This method is defined in subclasses. -======= - *Calculate the centroid of this geometry. This method is defined in subclasses. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCentroid(): Geometry.Point; static CLASS_NAME: string; - } + } export class Projection { /** -<<<<<<< HEAD * This class offers several methods for interacting with a wrapped pro4js projection object. -======= - *This class offers several methods for interacting with a wrapped pro4js projection object. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(projCode: string, options?: any); /** -<<<<<<< HEAD * Get the string SRS code. -======= - *Get the string SRS code. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCode(): string; /** -<<<<<<< HEAD * Get the units string for the projection -- returns null if proj4js is not available. -======= - *Get the units string for the projection -- returns null if proj4js is not available. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getUnits(): string; /** -<<<<<<< HEAD * Set a custom transform method between two projections. Use this method in cases where the proj4js lib is not available or where custom projections need to be handled. -======= - *Set a custom transform method between two projections. Use this method in cases where the proj4js lib is not available or where custom projections need to be handled. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ addTransform(from: string, to: string, method: () => void); /** -<<<<<<< HEAD * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. -======= - *Transform a point coordinate from one projection to another. Note that the input point is transformed in place. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(point: Geometry.Point, source: Projection, dest: OpenLayers.Projection): Object; /** -<<<<<<< HEAD * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. -======= - *Transform a point coordinate from one projection to another. Note that the input point is transformed in place. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(point: Object, source: Projection, dest: OpenLayers.Projection): Object; /** -<<<<<<< HEAD * A null transformation useful for defining projection aliases when proj4js is not available: -======= - *A null transformation useful for defining projection aliases when proj4js is not available: ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ nullTransform(point: Object): Function; } export class Bounds { /** -<<<<<<< HEAD * Minimum horizontal coordinate. -======= - *Minimum horizontal coordinate. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ left: number; /** -<<<<<<< HEAD * Minimum vertical coordinate. -======= - *Minimum vertical coordinate. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ bottom: number; /** -<<<<<<< HEAD * Maximum horizontal coordinate. -======= - *Maximum horizontal coordinate. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ right: number; /** -<<<<<<< HEAD * Maximum vertical coordinate. -======= - *Maximum vertical coordinate. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ top: number; /** -<<<<<<< HEAD * Construct a new bounds object. Coordinates can either be passed as four -======= - *Construct a new bounds object. Coordinates can either be passed as four ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * arguments, or as a single argument. */ constructor(left: number, bottom: number, right: number, top: number); /** -<<<<<<< HEAD * Construct a new bounds object. Coordinates can either be passed as four -======= - *Construct a new bounds object. Coordinates can either be passed as four ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * arguments, or as a single argument. */ constructor(bounds: number[]); /** -<<<<<<< HEAD * Create a cloned instance of this bounds. -======= - *Create a cloned instance of this bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Bounds; /** -<<<<<<< HEAD * Test a two bounds for equivalence. -======= - *Test a two bounds for equivalence. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(bounds: Bounds): boolean; /** -<<<<<<< HEAD * Returns a string representation of the bounds object. -======= - *Returns a string representation of the bounds object. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toString(): string; /** -<<<<<<< HEAD * Returns an array representation of the bounds object. -======= - *Returns an array representation of the bounds object. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toArray(reverseAxisOrder?: boolean): number[]; /** -<<<<<<< HEAD * Returns a boundingbox-string representation of the bounds object. -======= - *Returns a boundingbox-string representation of the bounds object. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toBBOX(decimal?: number, reverseAxisOrder?: boolean): string; /** -<<<<<<< HEAD * Create a new polygon geometry based on this bounds. -======= - *Create a new polygon geometry based on this bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toGeometry(): OpenLayers.Geometry.Polygon; /** -<<<<<<< HEAD * Returns the width of the bounds. -======= - *Returns the width of the bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getWidth(): number; /** -<<<<<<< HEAD * Returns the height of the bounds. -======= - *Returns the height of the bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getHeight(): number; @@ -598,74 +1076,42 @@ declare module OpenLayers { getCenterPixel(): Pixel; /** -<<<<<<< HEAD * Returns the LonLat object which represents the center of the bounds. -======= - *Returns the LonLat object which represents the center of the bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCenterLonLat(): LonLat; /** -<<<<<<< HEAD * Scales the bounds around a pixel or lonlat. Note that the new * bounds may return non-integer properties, even if a pixel * is passed. -======= - *Scales the bounds around a pixel or lonlat. Note that the new - *bounds may return non-integer properties, even if a pixel - *is passed. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ scale(ratio: number, origin?: Pixel); /** -<<<<<<< HEAD * Scales the bounds around a pixel or lonlat. Note that the new * bounds may return non-integer properties, even if a pixel * is passed. -======= - *Scales the bounds around a pixel or lonlat. Note that the new - *bounds may return non-integer properties, even if a pixel - *is passed. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ scale(ratio: number, origin?: LonLat); /** -<<<<<<< HEAD * Shifts the coordinates of the bound by the given horizontal and vertical -======= - *Shifts the coordinates of the bound by the given horizontal and vertical ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * deltas. */ add(x: number, y: number): Bounds; /** -<<<<<<< HEAD * Extend the bounds. -======= - *Extend the bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extend(object: LonLat): void; /** -<<<<<<< HEAD * Extend the bounds. -======= - *Extend the bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extend(object: Geometry.Point): void; /** -<<<<<<< HEAD * Extend the bounds. -======= - *Extend the bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ extend(object: Bounds): void; @@ -675,208 +1121,120 @@ declare module OpenLayers { extendXY(x: number, y: number): void; /** -<<<<<<< HEAD * Returns whether the bounds object contains the given . -======= - *Returns whether the bounds object contains the given . ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsLonLat(ll: LonLat, options: BoundsOptions); /** -<<<<<<< HEAD * Returns whether the bounds object contains the given . -======= - *Returns whether the bounds object contains the given . ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsLonLat(ll: Object, options: BoundsOptions); /** -<<<<<<< HEAD * Returns whether the bounds object contains the given . -======= - *Returns whether the bounds object contains the given . ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsPixel(px: Pixel, inclusive: boolean): boolean; /** -<<<<<<< HEAD * Returns whether the bounds object contains the given x and y. -======= - *Returns whether the bounds object contains the given x and y. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ contains(x: number, y: number, inclusive?: boolean): boolean; /** -<<<<<<< HEAD * Determine whether the target bounds intersects this bounds. Bounds are * considered intersecting if any of their edges intersect or if one * bounds contains the other. -======= - *Determine whether the target bounds intersects this bounds. Bounds are - *considered intersecting if any of their edges intersect or if one - *bounds contains the other. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ intersectsBounds(bounds: Bounds, options: BoundsOptions): boolean; /** -<<<<<<< HEAD * Returns whether the bounds object contains the given . -======= - *Returns whether the bounds object contains the given . ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ containsBounds(bounds: Bounds, partial: boolean, inclusive: boolean): boolean; /** -<<<<<<< HEAD * Returns the the quadrant ("br", "tr", "tl", "bl") in which the given -======= - *Returns the the quadrant ("br", "tr", "tl", "bl") in which the given ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 * lies. */ determineQuadrant(lonlat: LonLat): string; /** -<<<<<<< HEAD * Transform the Bounds object from source to dest. -======= - *Transform the Bounds object from source to dest. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): Bounds; /** -<<<<<<< HEAD * Wraps the bounds object around the dateline. -======= - *Wraps the bounds object around the dateline. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ wrapDateLine(maxExtent: Bounds, options: WrapDateLineOptions): Bounds; static CLASS_NAME: string; /** -<<<<<<< HEAD * Alternative constructor that builds a new OpenLayers.Bounds from a * parameter string. -======= - *Alternative constructor that builds a new OpenLayers.Bounds from a - *parameter string. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static fromString(str: string, reverseAxisOrder: boolean): Bounds; /** -<<<<<<< HEAD * Alternative constructor that builds a new OpenLayers.Bounds from an array. -======= - *Alternative constructor that builds a new OpenLayers.Bounds from an array. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static fromArray(bbox: number[], reverseAxisOrder: boolean): Bounds; /** -<<<<<<< HEAD * Alternative constructor that builds a new OpenLayers.Bounds from a size. -======= - *Alternative constructor that builds a new OpenLayers.Bounds from a size. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static fromSize(size: Size): Bounds; /** -<<<<<<< HEAD * Get the opposite quadrant for a given quadrant string. -======= - *Get the opposite quadrant for a given quadrant string. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ static oppositeQuadrant(quadrant: string): string; } export class LonLat { /** -<<<<<<< HEAD * Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. -======= - *Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(lon: number, lat: number); /** -<<<<<<< HEAD * Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. -======= - *Create a new map location. Coordinates can be passed either as two arguments, or as a single argument. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(lonlat: number[]); /** -<<<<<<< HEAD * Shortened String representation of OpenLayers.LonLat object. -======= - *Shortened String representation of OpenLayers.LonLat object. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ toShortString(): string; /** -<<<<<<< HEAD * New OpenLayers.LonLat object with the same lon and lat values -======= - *New OpenLayers.LonLat object with the same lon and lat values ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): LonLat; /** -<<<<<<< HEAD * A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. -======= - *A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ add(lon: number, lat: number): LonLat; /** -<<<<<<< HEAD * Boolean value indicating whether the passed-in OpenLayers.LonLat object has the same lon and lat components as this. Note: if ll passed in is null, returns false. -======= - *Boolean value indicating whether the passed-in OpenLayers.LonLat object has the same lon and lat components as this. Note: if ll passed in is null, returns false. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(ll: LonLat): boolean; /** -<<<<<<< HEAD * Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first. -======= - *Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): LonLat; /** -<<<<<<< HEAD * Returns a copy of this lonlat, but wrapped around the "dateline" (as specified by the borders of maxExtent). -======= - *Returns a copy of this lonlat, but wrapped around the "dateline" (as specified by the borders of maxExtent). ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ wrapDateLine(maxExtend: Bounds): LonLat; } export class Map { -<<<<<<< HEAD /** * Unique identifier for the map */ @@ -1016,37 +1374,1043 @@ declare module OpenLayers { */ maxResolution: number; - - -======= ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 - - constructor(id: HTMLElement, options?: MapOptions); - - constructor(id: string, options?: MapOptions); -<<<<<<< HEAD + /** + * APIProperty: minResolution + * {Float} + */ + minResolution: number; /** + * APIProperty: maxScale + * {Float} + */ + maxScale: number; + + /** + * APIProperty: minScale + * {Float} + */ + minScale: number; + + /** + * APIProperty: maxExtent + * {|Array} If provided as an array, the array + * should consist of four values (left, bottom, right, top). + * The maximum extent for the map. + * Default depends on projection; if this is one of those defined in OpenLayers.Projection.defaults + * (EPSG:4326 or web mercator), maxExtent will be set to the value defined there; + * else, defaults to null. + * To restrict user panning and zooming of the map, use instead. + * The value for will change calculations for tile URLs. + */ + maxExtent: Bounds; + + /** + * APIProperty: minExtent + * {|Array} If provided as an array, the array + * should consist of four values (left, bottom, right, top). + * The minimum extent for the map. Defaults to null. + */ + minExtent: Bounds; + + /** + * APIProperty: restrictedExtent + * Limit map navigation to this extent where possible. + * If a non-null restrictedExtent is set, panning will be restricted + * to the given bounds. In addition, zooming to a resolution that + * displays more than the restricted extent will center the map + * on the restricted extent. If you wish to limit the zoom level + * or resolution, use maxResolution. + */ + restrictedExtent: Bounds; + + /** + * APIProperty: numZoomLevels + * {Integer} Number of zoom levels for the map. Defaults to 16. Set a + * different value in the map options if needed. + */ + numZoomLevels: number; + + /** + * APIProperty: theme + * {String} Relative path to a CSS file from which to load theme styles. + * Specify null in the map options (e.g. {theme: null}) if you + * want to get cascading style declarations - by putting links to + * stylesheets or style declarations directly in your page. + */ + theme: string; + + /** + * APIProperty: displayProjection + * {} Requires proj4js support for projections other + * than EPSG:4326 or EPSG:900913/EPSG:3857. Projection used by + * several controls to display data to user. If this property is set, + * it will be set on any control which has a null displayProjection + * property at the time the control is added to the map. + */ + displayProjection: Projection; + + /** + * APIProperty: fallThrough + * {Boolean} Should OpenLayers allow events on the map to fall through to + * other elements on the page, or should it swallow them? (#457) + * Default is to swallow. + */ + fallThrough: boolean; + + /** + * APIProperty: autoUpdateSize + * {Boolean} Should OpenLayers automatically update the size of the map + * when the resize event is fired. Default is true. + */ + autoUpdateSize: boolean; + + /** + * APIProperty: eventListeners + * {Object} If set as an option at construction, the eventListeners + * object will be registered with . Object + * structure must be a listeners object as shown in the example for + * the events.on method. + */ + eventListeners: Object; + + /** + * Property: panTween + * {} Animated panning tween object, see panTo() + */ + panTween: Tween; + + /** + * APIProperty: panMethod + * {Function} The Easing function to be used for tweening. Default is + * OpenLayers.Easing.Expo.easeOut. Setting this to 'null' turns off + * animated panning. + */ + panMethod: () => void; + + /** + * Property: panDuration + * {Integer} The number of steps to be passed to the + * OpenLayers.Tween.start() method when the map is + * panned. + * Default is 50. + */ + panDuration: number; + + /** + * Property: zoomTween + * {} Animated zooming tween object, see zoomTo() + */ + zoomTween: Tween; + + /** + * APIProperty: zoomMethod + * {Function} The Easing function to be used for tweening. Default is + * OpenLayers.Easing.Quad.easeOut. Setting this to 'null' turns off + * animated zooming. + */ + zoomMethod: () => void; + + /** + * Property: zoomDuration + * {Integer} The number of steps to be passed to the + * OpenLayers.Tween.start() method when the map is zoomed. + * Default is 20. + */ + zoomDuration: number; + + /** + * Property: paddingForPopups + * {} Outside margin of the popup. Used to prevent + * the popup from getting too close to the map border. + */ + paddingForPopups: Bounds; + + /** + * Property: layerContainerOriginPx + * {Object} Cached object representing the layer container origin (in pixels). + */ + layerContainerOriginPx: Object; + + /** + * Property: minPx + * {Object} An object with a 'x' and 'y' values that is the lower + * left of maxExtent in viewport pixel space. + * Used to verify in moveByPx that the new location we're moving to + * is valid. It is also used in the getLonLatFromViewPortPx function + * of Layer. + */ + minPx: { x: number; y: number }; + + /** + * Property: maxPx + * {Object} An object with a 'x' and 'y' values that is the top + * right of maxExtent in viewport pixel space. + * Used to verify in moveByPx that the new location we're moving to + * is valid. + */ + maxPx: { x: number; y: number }; + + /** + * Constructor: OpenLayers.Map + * Constructor for a new OpenLayers.Map instance. There are two possible + * ways to call the map constructor. See the examples below. * + * Parameters: + * div - {DOMElement|String} The element or id of an element in your page + * that will contain the map. May be omitted if the
option is + * provided or if you intend to call the method later. + * options - {Object} Optional object with properties to tag onto the map. + * + * Valid options (in addition to the listed API properties): + * center - {|Array} The default initial center of the map. + * If provided as array, the first value is the x coordinate, + * and the 2nd value is the y coordinate. + * Only specify if is provided. + * Note that if an ArgParser/Permalink control is present, + * and the querystring contains coordinates, center will be set + * by that, and this option will be ignored. + * zoom - {Number} The initial zoom level for the map. Only specify if + * is provided. + * Note that if an ArgParser/Permalink control is present, + * and the querystring contains a zoom level, zoom will be set + * by that, and this option will be ignored. + * + * Examples: + * (code) + * // create a map with default options in an element with the id "map1" + * var map = new OpenLayers.Map("map1"); + * + * // create a map with non-default options in an element with id "map2" + * var options = { + * projection: "EPSG:3857", + * maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000), + * center: new OpenLayers.LonLat(-12356463.476333, 5621521.4854095) + * }; + * var map = new OpenLayers.Map("map2", options); + * + * // map with non-default options - same as above but with a single argument, + * // a restricted extent, and using arrays for bounds and center + * var map = new OpenLayers.Map({ + * div: "map_id", + * projection: "EPSG:3857", + * maxExtent: [-18924313.432222, -15538711.094146, 18924313.432222, 15538711.094146], + * restrictedExtent: [-13358338.893333, -9608371.5085962, 13358338.893333, 9608371.5085962], + * center: [-12356463.476333, 5621521.4854095] + * }); + * + * // create a map without a reference to a container - call render later + * var map = new OpenLayers.Map({ + * projection: "EPSG:3857", + * maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000) + * }); + * (end) + */ + constructor(id: HTMLElement, options?: MapOptions); + constructor(id: string, options?: MapOptions); + + /** + * APIMethod: getViewport + * Get the DOMElement representing the view port. + * + * Returns: + * {DOMElement} + */ + getViewport(): HTMLElement; + + /** + * APIMethod: render + * Render the map to a specified container. + * + * Parameters: + * div - {String|DOMElement} The container that the map should be rendered + * to. If different than the current container, the map viewport + * will be moved from the current to the new container. + */ + render(div: string): void; + render(div: HTMLElement): void; + + /** + * Method: unloadDestroy + * Function that is called to destroy the map on page unload. stored here + * so that if map is manually destroyed, we can unregister this. + */ + private unloadDestroy(): () => void; + + /** + * Method: updateSizeDestroy + * When the map is destroyed, we need to stop listening to updateSize + * events: this method stores the function we need to unregister in + * non-IE browsers. + */ + private updateSizeDestroy: () => void; + + /** + * APIMethod: destroy + * Destroy this map. + * Note that if you are using an application which removes a container + * of the map from the DOM, you need to ensure that you destroy the + * map *before* this happens; otherwise, the page unload handler + * will fail because the DOM elements that map.destroy() wants + * to clean up will be gone. (See + * http://trac.osgeo.org/openlayers/ticket/2277 for more information). + * This will apply to GeoExt and also to other applications which + * modify the DOM of the container of the OpenLayers Map. + */ + destroy(): void; + + /** + * APIMethod: setOptions + * Change the map options + * + * Parameters: + * options - {Object} Hashtable of options to tag to the map + */ + setOptions(options: {}); + + /** + * APIMethod: getTileSize + * Get the tile size for the map + * + * Returns: + * {} + */ + getTileSize(): Size; + + /** + * APIMethod: getBy + * Get a list of objects given a property and a match item. + * + * Parameters: + * array - {String} A property on the map whose value is an array. + * property - {String} A property on each item of the given array. + * match - {String | Object} A string to match. Can also be a regular + * expression literal or object. In addition, it can be any object + * with a method named test. For reqular expressions or other, if + * match.test(map[array][i][property]) evaluates to true, the item will + * be included in the array returned. If no items are found, an empty + * array is returned. + * + * Returns: + * {Array} An array of items where the given property matches the given + * criteria. + */ + getBy(array: string, property: string, match: string): Array; + getBy(array: string, property: string, match: Object): Array; + + /** + * APIMethod: getLayersBy + * Get a list of layers with properties matching the given criteria. + * + * Parameters: + * property - {String} A layer property to be matched. + * match - {String | Object} A string to match. Can also be a regular + * expression literal or object. In addition, it can be any object + * with a method named test. For reqular expressions or other, if + * match.test(layer[property]) evaluates to true, the layer will be + * included in the array returned. If no layers are found, an empty + * array is returned. + * + * Returns: + * {Array()} A list of layers matching the given criteria. + * An empty array is returned if no matches are found. + */ + getLayersBy(property: string, match: string): Layer[]; + getLayersBy(property: string, match: Object): Layer[]; + + /** + * APIMethod: getLayersByName + * Get a list of layers with names matching the given name. + * + * Parameters: + * match - {String | Object} A layer name. The name can also be a regular + * expression literal or object. In addition, it can be any object + * with a method named test. For reqular expressions or other, if + * name.test(layer.name) evaluates to true, the layer will be included + * in the list of layers returned. If no layers are found, an empty + * array is returned. + * + * Returns: + * {Array()} A list of layers matching the given name. + * An empty array is returned if no matches are found. + */ + getLayersByName(match: string): Layer[]; + getLayersByName(match: Object): Layer[]; + + /** + * APIMethod: getLayersByClass + * Get a list of layers of a given class (CLASS_NAME). + * + * Parameters: + * match - {String | Object} A layer class name. The match can also be a + * regular expression literal or object. In addition, it can be any + * object with a method named test. For reqular expressions or other, + * if type.test(layer.CLASS_NAME) evaluates to true, the layer will + * be included in the list of layers returned. If no layers are + * found, an empty array is returned. + * + * Returns: + * {Array()} A list of layers matching the given class. + * An empty array is returned if no matches are found. + */ + getLayersByClass(match: string): Layer[]; + getLayersByClass(match: Object): Layer[]; + + /** + * APIMethod: getControlsBy + * Get a list of controls with properties matching the given criteria. + * + * Parameters: + * property - {String} A control property to be matched. + * match - {String | Object} A string to match. Can also be a regular + * expression literal or object. In addition, it can be any object + * with a method named test. For reqular expressions or other, if + * match.test(layer[property]) evaluates to true, the layer will be + * included in the array returned. If no layers are found, an empty + * array is returned. + * + * Returns: + * {Array()} A list of controls matching the given + * criteria. An empty array is returned if no matches are found. + */ + getControlsBy(property: string, match: string): Control[]; + getControlsBy(property: string, match: Object): Control[]; + + /** + * APIMethod: getControlsByClass + * Get a list of controls of a given class (CLASS_NAME). + * + * Parameters: + * match - {String | Object} A control class name. The match can also be a + * regular expression literal or object. In addition, it can be any + * object with a method named test. For reqular expressions or other, + * if type.test(control.CLASS_NAME) evaluates to true, the control will + * be included in the list of controls returned. If no controls are + * found, an empty array is returned. + * + * Returns: + * {Array()} A list of controls matching the given class. + * An empty array is returned if no matches are found. + */ + getControlsByClass(match: string): Control[]; + getControlsByClass(match: Object): Control[]; + + /** + * APIMethod: getLayer + * Get a layer based on its id + * + * Parameters: + * id - {String} A layer id + * + * Returns: + * {} The Layer with the corresponding id from the map's + * layer collection, or null if not found. + */ + getLayer(id: string): Layer; + + /** + * Method: setLayerZIndex + * + * Parameters: + * layer - {} + * zIdx - {int} + */ + private setLayerZIndex(layer: Layer, zIdx: number): void; + + /** + * Method: resetLayersZIndex + * Reset each layer's z-index based on layer's array index + */ + private resetLayersZIndex(): void; + + /** + * APIMethod: addLayer + * + * Parameters: + * layer - {} + * + * Returns: + * {Boolean} True if the layer has been added to the map. */ addLayer(layer: Layer): boolean; /** - * Set the map center (and optionally, the zoom level). + * APIMethod: addLayers + * + * Parameters: + * layers - {Array()} */ - setCenter(lonlat: LonLat, zoom?: number, dragging?: boolean, forceZoomChange?: boolean): void; + addLayers(layers: Layer[]): void; /** - * Set the map center (and optionally, the zoom level). + * APIMethod: removeLayer + * Removes a layer from the map by removing its visual element (the + * layer.div property), then removing it from the map's internal list + * of layers, setting the layer's map property to null. + * + * a "removelayer" event is triggered. + * + * very worthy of mention is that simply removing a layer from a map + * will not cause the removal of any popups which may have been created + * by the layer. this is due to the fact that it was decided at some + * point that popups would not belong to layers. thus there is no way + * for us to know here to which layer the popup belongs. + * + * A simple solution to this is simply to call destroy() on the layer. + * the default OpenLayers.Layer class's destroy() function + * automatically takes care to remove itself from whatever map it has + * been attached to. + * + * The correct solution is for the layer itself to register an + * event-handler on "removelayer" and when it is called, if it + * recognizes itself as the layer being removed, then it cycles through + * its own personal list of popups, removing them from the map. + * + * Parameters: + * layer - {} + * setNewBaseLayer - {Boolean} Default is true */ + removeLayer(layer: Layer, setNewBaseLayer?: boolean): void; + + /** + * APIMethod: getNumLayers + * + * Returns: + * {Int} The number of layers attached to the map. + */ + getNumLayers(): number; + + /** + * APIMethod: getLayerIndex + * + * Parameters: + * layer - {} + * + * Returns: + * {Integer} The current (zero-based) index of the given layer in the map's + * layer stack. Returns -1 if the layer isn't on the map. + */ + getLayerIndex(layer: Layer): number; + + /** + * APIMethod: setLayerIndex + * Move the given layer to the specified (zero-based) index in the layer + * list, changing its z-index in the map display. Use + * map.getLayerIndex() to find out the current index of a layer. Note + * that this cannot (or at least should not) be effectively used to + * raise base layers above overlays. + * + * Parameters: + * layer - {} + * idx - {int} + */ + setLayerIndex(layer: Layer, idx: number): void; + + /** + * APIMethod: raiseLayer + * Change the index of the given layer by delta. If delta is positive, + * the layer is moved up the map's layer stack; if delta is negative, + * the layer is moved down. Again, note that this cannot (or at least + * should not) be effectively used to raise base layers above overlays. + * + * Paremeters: + * layer - {} + * delta - {int} + */ + raiseLayer(layer: Layer, delta: number): void; + + /** + * APIMethod: setBaseLayer + * Allows user to specify one of the currently-loaded layers as the Map's + * new base layer. + * + * Parameters: + * newBaseLayer - {} + */ + setBaseLayer(newBaseLayer): void; + + /** + * APIMethod: addControl + * Add the passed over control to the map. Optionally + * position the control at the given pixel. + * + * Parameters: + * control - {} + * px - {} + */ + addControl(control: Control, px: Pixel); + + /** + * APIMethod: addControls + * Add all of the passed over controls to the map. + * You can pass over an optional second array + * with pixel-objects to position the controls. + * The indices of the two arrays should match and + * you can add null as pixel for those controls + * you want to be autopositioned. + * + * Parameters: + * controls - {Array()} + * pixels - {Array()} + */ + addControls(controls: Control[], pixels: Pixel[]): void; + + /** + * Method: addControlToMap + * + * Parameters: + * + * control - {} + * px - {} + */ + private addControlToMap(control: Control, px: Pixel): void; + + /** + * APIMethod: getControl + * + * Parameters: + * id - {String} ID of the control to return. + * + * Returns: + * {} The control from the map's list of controls + * which has a matching 'id'. If none found, + * returns null. + */ + getControl(id: string): Control; + + /** + * APIMethod: removeControl + * Remove a control from the map. Removes the control both from the map + * object's internal array of controls, as well as from the map's + * viewPort (assuming the control was not added outsideViewport) + * + * Parameters: + * control - {} The control to remove. + */ + removeControl(control: Control): void; + + /** + * APIMethod: addPopup + * + * Parameters: + * popup - {} + * exclusive - {Boolean} If true, closes all other popups first + */ + addPopup(popup: Popup, exclusive: boolean); + + /** + * APIMethod: removePopup + * + * Parameters: + * popup - {} + */ + removePopup(popup: Popup): void; + + /** + * APIMethod: getSize + * + * Returns: + * {} An object that represents the + * size, in pixels, of the div into which OpenLayers + * has been loaded. + * Note - A clone() of this locally cached variable is + * returned, so as not to allow users to modify it. + */ + getSize(): Size; + + /** + * APIMethod: updateSize + * This function should be called by any external code which dynamically + * changes the size of the map div (because mozilla wont let us catch + * the "onresize" for an element) + */ + updateSize(): void; + + /** + * Method: getCurrentSize + * + * Returns: + * {} A new object with the dimensions + * of the map div + */ + private getCurrentSize(): Size; + + /** + * Method: calculateBounds + * + * Parameters: + * center - {} Default is this.getCenter() + * resolution - {float} Default is this.getResolution() + * + * Returns: + * {} A bounds based on resolution, center, and + * current mapsize. + */ + calculateBounds(center?: LonLat, resolution?: number): Bounds; + + /** + * APIMethod: getCenter + * + * Returns: + * {} + */ + getCenter(): LonLat; + + /** + * APIMethod: getZoom + * + * Returns: + * {Integer} + */ + getZoom(): number; + + /** + * APIMethod: pan + * Allows user to pan by a value of screen pixels + * + * Parameters: + * dx - {Integer} + * dy - {Integer} + * options - {Object} Options to configure panning: + * - *animate* {Boolean} Use panTo instead of setCenter. Default is true. + * - *dragging* {Boolean} Call setCenter with dragging true. Default is + * false. + */ + pan(dx: number, dy: number, options?: { animate?: boolean; dragging?: boolean }): void; + + /** + * APIMethod: panTo + * Allows user to pan to a new lonlat + * If the new lonlat is in the current extent the map will slide smoothly + * + * Parameters: + * lonlat - {} + */ + panTo(lonlat: LonLat): void; + + /** + * APIMethod: setCenter + * Set the map center (and optionally, the zoom level). + * + * Parameters: + * lonlat - {|Array} The new center location. + * If provided as array, the first value is the x coordinate, + * and the 2nd value is the y coordinate. + * zoom - {Integer} Optional zoom level. + * dragging - {Boolean} Specifies whether or not to trigger + * movestart/end events + * forceZoomChange - {Boolean} Specifies whether or not to trigger zoom + * change events (needed on baseLayer change) + */ + setCenter(lonlat: LonLat, zoom?: number, dragging?: boolean, forceZoomChange?: boolean): void; setCenter(lonlat: number[], zoom?: number, dragging?: boolean, forceZoomChange?: boolean): void; /** + * APIMethod: getMinZoom + * Returns the minimum zoom level for the current map view. If the base + * layer is configured with set to true, this will be the + * first zoom level that shows no more than one world width in the current + * map viewport. Components that rely on this value (e.g. zoom sliders) + * should also listen to the map's "updatesize" event and call this method + * in the "updatesize" listener. + * + * Returns: + * {Number} Minimum zoom level that shows a map not wider than its + * 's maxExtent. This is an Integer value, unless the map is + * configured with set to true. + */ + getMinZoom(): number; + + /** + * APIMethod: getProjection + * This method returns a string representing the projection. In + * the case of projection support, this will be the srsCode which + * is loaded -- otherwise it will simply be the string value that + * was passed to the projection at startup. + * + * Returns: + * {String} The Projection string from the base layer or null. + */ + getProjection(): string; + + /** + * APIMethod: getProjectionObject + * Returns the projection obect from the baselayer. + * + * Returns: + * {} The Projection of the base layer. + */ + getProjectionObject(): Projection; + + /** + * APIMethod: getMaxResolution + * + * Returns: + * {String} The Map's Maximum Resolution + */ + getMaxResolution(): string; + + /** + * APIMethod: getMaxExtent + * + * Parameters: + * options - {Object} + * + * Allowed Options: + * restricted - {Boolean} If true, returns restricted extent (if it is + * available.) + * + * Returns: + * {} The maxExtent property as set on the current + * baselayer, unless the 'restricted' option is set, in which case + * the 'restrictedExtent' option from the map is returned (if it + * is set). + */ + getMaxExtent(options: { restricted: boolean }): Bounds; + + /** + * APIMethod: getNumZoomLevels + * + * Returns: + * {Integer} The total number of zoom levels that can be displayed by the + * current baseLayer. + */ + getNumZoomLevels(): number; + + /** + * APIMethod: getExtent + * + * Returns: + * {} A Bounds object which represents the lon/lat + * bounds of the current viewPort. + * If no baselayer is set, returns null. + */ + getExtent(): Bounds; + + /** + * APIMethod: getResolution + * + * Returns: + * {Float} The current resolution of the map. + * If no baselayer is set, returns null. + */ + getResolution(): number; + + /** + * APIMethod: getUnits + * + * Returns: + * {Float} The current units of the map. + * If no baselayer is set, returns null. + */ + getUnits(): number; + + /** + * APIMethod: getScale + * + * Returns: + * {Float} The current scale denominator of the map. + * If no baselayer is set, returns null. + */ + getScale(): number; + + /** + * APIMethod: getZoomForExtent + * + * Parameters: + * bounds - {} + * closest - {Boolean} Find the zoom level that most closely fits the + * specified bounds. Note that this may result in a zoom that does + * not exactly contain the entire extent. + * Default is false. + * + * Returns: + * {Integer} A suitable zoom level for the specified bounds. + * If no baselayer is set, returns null. + */ + getZoomForExtent(bounds: Bounds, closest?: boolean): number; + + /** + * APIMethod: getResolutionForZoom + * + * Parameters: + * zoom - {Float} + * + * Returns: + * {Float} A suitable resolution for the specified zoom. If no baselayer + * is set, returns null. + */ + getResolutionForZoom(zoom: number): number; + + /** + * APIMethod: getZoomForResolution + * + * Parameters: + * resolution - {Float} + * closest - {Boolean} Find the zoom level that corresponds to the absolute + * closest resolution, which may result in a zoom whose corresponding + * resolution is actually smaller than we would have desired (if this + * is being called from a getZoomForExtent() call, then this means that + * the returned zoom index might not actually contain the entire + * extent specified... but it'll be close). + * Default is false. + * + * Returns: + * {Integer} A suitable zoom level for the specified resolution. + * If no baselayer is set, returns null. + */ + getZoomForResolution(resolution: number, closest?: boolean): number; + + /** + * APIMethod: zoomTo + * Zoom to a specific zoom level. Zooming will be animated unless the map + * is configured with {zoomMethod: null}. To zoom without animation, use + * without a lonlat argument. + * + * Parameters: + * zoom - {Integer} + */ + zoomTo(zoom: number, px: Pixel): void; + + /** + * APIMethod: zoomIn * */ - prop: string; -======= ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 + zoomIn(): void; + + /** + * APIMethod: zoomOut + * + */ + zoomOut(): void; + + /** + * APIMethod: zoomToExtent + * Zoom to the passed in bounds, recenter + * + * Parameters: + * bounds - {|Array} If provided as an array, the array + * should consist of four values (left, bottom, right, top). + * closest - {Boolean} Find the zoom level that most closely fits the + * specified bounds. Note that this may result in a zoom that does + * not exactly contain the entire extent. + * Default is false. + * + */ + zoomToExtent(bounds: Bounds, closest?: boolean): void; + zoomToExtent(bounds: number[], closest?: boolean): void; + + /** + * APIMethod: zoomToMaxExtent + * Zoom to the full extent and recenter. + * + * Parameters: + * options - {Object} + * + * Allowed Options: + * restricted - {Boolean} True to zoom to restricted extent if it is + * set. Defaults to true. + */ + zoomToMaxExtent(options?: { restricted: boolean }): void; + + /** + * APIMethod: zoomToScale + * Zoom to a specified scale + * + * Parameters: + * scale - {float} + * closest - {Boolean} Find the zoom level that most closely fits the + * specified scale. Note that this may result in a zoom that does + * not exactly contain the entire extent. + * Default is false. + * + */ + zoomToScale(scale: number, closest: boolean): void; + + /** + * APIMethod: getViewPortPxFromLonLat + * + * Parameters: + * lonlat - {} + * + * Returns: + * {} An OpenLayers.Pixel which is the passed-in + * , translated into view port + * pixels by the current base layer. + */ + getViewPortPxFromLonLat(lonlat: LonLat): Pixel; + + /** + * APIMethod: getLonLatFromPixel + * + * Parameters: + * px - {|Object} An OpenLayers.Pixel or an object with + * a 'x' and 'y' properties. + * + * Returns: + * {} An OpenLayers.LonLat corresponding to the given + * OpenLayers.Pixel, translated into lon/lat by the + * current base layer + */ + getLonLatFromPixel(px: Pixel): LonLat; + getLonLatFromPixel(px: { x: number; y: number }): LonLat; + + /** + * APIMethod: getPixelFromLonLat + * Returns a pixel location given a map location. The map location is + * translated to an integer pixel location (in viewport pixel + * coordinates) by the current base layer. + * + * Parameters: + * lonlat - {} A map location. + * + * Returns: + * {} An OpenLayers.Pixel corresponding to the + * translated into view port pixels by the current + * base layer. + */ + getPixelFromLonLat(lonlat: LonLat): Pixel; + + /** + * APIMethod: getViewPortPxFromLayerPx + * + * Parameters: + * layerPx - {} + * + * Returns: + * {} Layer Pixel translated into ViewPort Pixel + * coordinates + */ + getViewPortPxFromLayerPx(layerPx: Pixel): Pixel; + + /** + * APIMethod: getLayerPxFromViewPortPx + * + * Parameters: + * viewPortPx - {} + * + * Returns: + * {} ViewPort Pixel translated into Layer Pixel + * coordinates + */ + getLayerPxFromViewPortPx(viewPortPx: Pixel): Pixel; + + /** + * APIMethod: getLayerPxFromLonLat + * + * Parameters: + * lonlat - {} lonlat + * + * Returns: + * {} An OpenLayers.Pixel which is the passed-in + * , translated into layer pixels + * by the current base layer + */ + getLayerPxFromLonLat(lonlat: LonLat): Pixel; + + static TILE_WIDTH: string; + + static TILE_HEIGHT: string; } export class Class { @@ -1054,259 +2418,452 @@ declare module OpenLayers { } export class Date { + /** + * APIProperty: dateRegEx + * The regex to be used for validating dates. You can provide your own + * regex for instance for adding support for years before BC. Default + * value is: /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/ + */ + dateRegEx: string; + /** + * APIMethod: toISOString + * Generates a string representing a date. The format of the string follows + * the profile of ISO 8601 for date and time on the Internet (see + * http://tools.ietf.org/html/rfc3339). If the toISOString method is + * available on the Date prototype, that is used. The toISOString + * method for Date instances is defined in ECMA-262. + * + * Parameters: + * date - {Date} A date object. + * + * Returns: + * {String} A string representing the date (e.g. + * "2010-08-07T16:58:23.123Z"). If the date does not have a valid time + * (i.e. isNaN(date.getTime())) this method returns the string "Invalid + * Date". The ECMA standard says the toISOString method should throw + * RangeError in this case, but Firefox returns a string instead. For + * best results, use isNaN(date.getTime()) to determine date validity + * before generating date strings. + */ + toISOString(date: Date): string; + + /** + * APIMethod: parse + * Generate a date object from a string. The format for the string follows + * the profile of ISO 8601 for date and time on the Internet (see + * http://tools.ietf.org/html/rfc3339). We don't call the native + * Date.parse because of inconsistency between implmentations. In + * Chrome, calling Date.parse with a string that doesn't contain any + * indication of the timezone (e.g. "2011"), the date is interpreted + * in local time. On Firefox, the assumption is UTC. + * + * Parameters: + * str - {String} A string representing the date (e.g. + * "2010", "2010-08", "2010-08-07", "2010-08-07T16:58:23.123Z", + * "2010-08-07T11:58:23.123-06"). + * + * Returns: + * {Date} A date object. If the string could not be parsed, an invalid + * date is returned (i.e. isNaN(date.getTime())). + */ + parse(str: string): Date; } export class Element { + /** + * APIFunction: visible + * + * Parameters: + * element - {DOMElement} + * + * Returns: + * {Boolean} Is the element visible? + */ + visible(element: HTMLElement): boolean; + /** + * APIFunction: toggle + * Toggle the visibility of element(s) passed in + * + * Parameters: + * element - {DOMElement} Actually user can pass any number of elements + */ + toggle(element: HTMLElement): void; + + /** + * APIFunction: remove + * Remove the specified element from the DOM. + * + * Parameters: + * element - {DOMElement} + */ + remove(element: HTMLElement): void; + + /** + * APIFunction: getHeight + * + * Parameters: + * element - {DOMElement} + * + * Returns: + * {Integer} The offset height of the element passed in + */ + getHeight(element: HTMLElement): number; + + /** + * Function: hasClass + * Tests if an element has the given CSS class name. + * + * Parameters: + * element - {DOMElement} A DOM element node. + * name - {String} The CSS class name to search for. + * + * Returns: + * {Boolean} The element has the given class name. + */ + hasClass(element: HTMLElement, name: string): boolean; + + /** + * Function: addClass + * Add a CSS class name to an element. Safe where element already has + * the class name. + * + * Parameters: + * element - {DOMElement} A DOM element node. + * name - {String} The CSS class name to add. + * + * Returns: + * {DOMElement} The element. + */ + addClass(element: HTMLElement, name: string): HTMLElement; + + /** + * Function: removeClass + * Remove a CSS class name from an element. Safe where element does not + * have the class name. + * + * Parameters: + * element - {DOMElement} A DOM element node. + * name - {String} The CSS class name to remove. + * + * Returns: + * {DOMElement} The element. + */ + removeClass(element: HTMLElement, name: string): HTMLElement; + + /** + * Function: toggleClass + * Remove a CSS class name from an element if it exists. Add the class name + * if it doesn't exist. + * + * Parameters: + * element - {DOMElement} A DOM element node. + * name - {String} The CSS class name to toggle. + * + * Returns: + * {DOMElement} The element. + */ + toggleClass(element: HTMLElement, name: string): HTMLElement; + + /** + * APIFunction: getStyle + * + * Parameters: + * element - {DOMElement} + * style - {?} + * + * Returns: + * {?} + */ + getStyle(element: HTMLElement, style: any): any; } export class Pixel { + /** + * APIProperty: x + * {Number} The x coordinate + */ + x: number; + /** + * APIProperty: y + * {Number} The y coordinate + */ + y: number; + + /** + * Constructor: OpenLayers.Pixel + * Create a new OpenLayers.Pixel instance + * + * Parameters: + * x - {Number} The x coordinate + * y - {Number} The y coordinate + * + * Returns: + * An instance of OpenLayers.Pixel + */ + constructor(x: number, y: number); + + /** + * APIMethod: clone + * Return a clone of this pixel object + * + * Returns: + * {} A clone pixel + */ + clone(): Pixel; + + /** + * APIMethod: equals + * Determine whether one pixel is equivalent to another + * + * Parameters: + * px - {|Object} An OpenLayers.Pixel or an object with + * a 'x' and 'y' properties. + * + * Returns: + * {Boolean} The point passed in as parameter is equal to this. Note that + * if px passed in is null, returns false. + */ + equals(px: Pixel): boolean; + equals(px: { x: number; y: number }): boolean; + + /** + * APIMethod: distanceTo + * Returns the distance to the pixel point passed in as a parameter. + * + * Parameters: + * px - {} + * + * Returns: + * {Float} The pixel point passed in as parameter to calculate the + * distance to. + */ + distanceTo(px: Pixel): number; + + /** + * APIMethod: add + * + * Parameters: + * x - {Integer} + * y - {Integer} + * + * Returns: + * {} A new Pixel with this pixel's x&y augmented by the + * values passed in. + */ + add(x: number, y: number): Pixel; + + /** + * APIMethod: offset + * + * Parameters + * px - {|Object} An OpenLayers.Pixel or an object with + * a 'x' and 'y' properties. + * + * Returns: + * {} A new Pixel with this pixel's x&y augmented by the + * x&y values of the pixel passed in. + */ + offset(px: Pixel): Pixel; + offset(px: { x: number; y: number }): Pixel; + + CLASS_NAME: string; } export class Size { + /** + * APIProperty: w + * {Number} width + */ + w: number; + /** + * APIProperty: h + * {Number} height + */ + h: number; + + /** + * Constructor: OpenLayers.Size + * Create an instance of OpenLayers.Size + * + * Parameters: + * w - {Number} width + * h - {Number} height + */ + constructor(w: number, h: number); + + /** + * Method: toString + * Return the string representation of a size object + * + * Returns: + * {String} The string representation of OpenLayers.Size object. + * (e.g. "w=55,h=66") + */ + toString(): string; + + /** + * APIMethod: clone + * Create a clone of this size object + * + * Returns: + * {} A new OpenLayers.Size object with the same w and h + * values + */ + clone(): Size; + + /** + * + * APIMethod: equals + * Determine where this size is equal to another + * + * Parameters: + * sz - {|Object} An OpenLayers.Size or an object with + * a 'w' and 'h' properties. + * + * Returns: + * {Boolean} The passed in size has the same h and w properties as this one. + * Note that if sz passed in is null, returns false. + */ + equals(sz: Size): boolean; + + CLASS_NAME: string; } module Geometry { export class Collection extends Geometry { /** -<<<<<<< HEAD * The component parts of this geometry -======= - *The component parts of this geometry ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ components: Geometry[]; /** -<<<<<<< HEAD * An array of class names representing the types of * components that the collection can include. A null value means the * component types are not restricted. -======= - *An array of class names representing the types of - *components that the collection can include. A null value means the - *component types are not restricted. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ componentTypes: string[]; /** -<<<<<<< HEAD * Creates a Geometry Collection -- a list of geoms. -======= - *Creates a Geometry Collection -- a list of geoms. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(components: Geometry[]); /** -<<<<<<< HEAD * Destroy this geometry. -======= - *Destroy this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ destroy(): void; /** -<<<<<<< HEAD * Clone this geometry. -======= - *Clone this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Collection; /** -<<<<<<< HEAD * Get a string representing the components for this collection -======= - *Get a string representing the components for this collection ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getComponentsString(): string; /** -<<<<<<< HEAD * Recalculate the bounds by iterating through the components and * calling calling extendBounds() on each item. -======= - *Recalculate the bounds by iterating through the components and - *calling calling extendBounds() on each item. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ calculateBounds(); /** -<<<<<<< HEAD * Add components to this geometry. -======= - *Add components to this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ addComponents(components: Geometry[]); /** -<<<<<<< HEAD * Add a new component (geometry) to the collection. If this.componentTypes * is set, then the component class name must be in the componentTypes array. -======= - *Add a new component (geometry) to the collection. If this.componentTypes - *is set, then the component class name must be in the componentTypes array. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ addComponent(component: Geometry, index: number): boolean; /** -<<<<<<< HEAD * Remove components from this geometry. -======= - *Remove components from this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ removeComponents(components: Geometry[]): boolean; /** -<<<<<<< HEAD * Remove a component from this geometry. -======= - *Remove a component from this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ removeComponent(component: Geometry): boolean; /** -<<<<<<< HEAD * Calculate the length of this geometry -======= - *Calculate the length of this geometry ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getLength(): number; /** -<<<<<<< HEAD * Calculate the area of this geometry. Note how this function is overridden * in . -======= - *Calculate the area of this geometry. Note how this function is overridden - *in . ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getArea(): number; /** -<<<<<<< HEAD * Calculate the approximate area of the polygon were it projected onto * the earth. -======= - *Calculate the approximate area of the polygon were it projected onto - *the earth. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getGeodesicArea(projection: Projection): number; /** -<<<<<<< HEAD * Compute the centroid for this geometry collection. -======= - *Compute the centroid for this geometry collection. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getCentroid(weighted?: boolean): Point; /** -<<<<<<< HEAD * Calculate the approximate length of the geometry were it projected onto * the earth. -======= - *Calculate the approximate length of the geometry were it projected onto - *the earth. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getGeodesicLength(projection: Projection): number; /** -<<<<<<< HEAD * Moves a geometry by the given displacement along positive x and y axes. * This modifies the position of the geometry and clears the cached * bounds. -======= - *Moves a geometry by the given displacement along positive x and y axes. - *This modifies the position of the geometry and clears the cached - *bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ move(x: number, y: number): void; /** -<<<<<<< HEAD * Rotate a geometry around some origin -======= - *Rotate a geometry around some origin ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ rotate(angle: number, origin: Point); /** -<<<<<<< HEAD * Resize a geometry relative to some origin. Use this method to apply * a uniform scaling to a geometry. -======= - *Resize a geometry relative to some origin. Use this method to apply - *a uniform scaling to a geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ resize(scale: number, origin: Point, ratio: number): Geometry; /** -<<<<<<< HEAD * Calculate the closest distance between two geometries (on the x-y plane). -======= - *Calculate the closest distance between two geometries (on the x-y plane). ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ distanceTo(geometry: Geometry, options: DistanceOptions): Object; /** -<<<<<<< HEAD * Determine whether another geometry is equivalent to this one. Geometries * are considered equivalent if all components have the same coordinates. -======= - *Determine whether another geometry is equivalent to this one. Geometries - *are considered equivalent if all components have the same coordinates. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(geometry: Geometry): boolean; /** -<<<<<<< HEAD * Reproject the components geometry from source to dest. -======= - *Reproject the components geometry from source to dest. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): Geometry; /** -<<<<<<< HEAD * Determine if the input geometry intersects this one. -======= - *Determine if the input geometry intersects this one. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ intersects(geometry: Geometry): boolean; /** -<<<<<<< HEAD * Return a list of all points in this geometry. -======= - *Return a list of all points in this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getVertices(nodes: boolean): Array; @@ -1320,101 +2877,57 @@ declare module OpenLayers { y: number; /** -<<<<<<< HEAD * Construct a point geometry. -======= - *Construct a point geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ constructor(x: number, y: number); /** -<<<<<<< HEAD * Create a clone of this geometry. -======= - *Create a clone of this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(): Geometry; /** -<<<<<<< HEAD * An exact clone of this OpenLayers.Geometry.Point -======= - *An exact clone of this OpenLayers.Geometry.Point ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ clone(obj: Point): Point; /** -<<<<<<< HEAD * Calculate the closest distance between two geometries (on the x-y plane). -======= - *Calculate the closest distance between two geometries (on the x-y plane). ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ distanceTo(geometry: Geometry, options: DistanceOptions): Object; /** -<<<<<<< HEAD * Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates. -======= - *Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ equals(geom: Point): boolean; /** -<<<<<<< HEAD * Moves a geometry by the given displacement along positive x and y axes. This modifies the position of the geometry and clears the cached bounds. -======= - *Moves a geometry by the given displacement along positive x and y axes. This modifies the position of the geometry and clears the cached bounds. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ move(x: number, y: number): void; /** -<<<<<<< HEAD * Rotate a point around another. -======= - *Rotate a point around another. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ rotate(angle: number, origin: Point); /** -<<<<<<< HEAD * Resize a point relative to some origin. For points, this has the effect of scaling a vector (from the origin to the point). This method is more useful on geometry collection subclasses. -======= - *Resize a point relative to some origin. For points, this has the effect of scaling a vector (from the origin to the point). This method is more useful on geometry collection subclasses. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ resize(scale: number, origin: Point, ratio: number): Geometry; /** -<<<<<<< HEAD * Determine if the input geometry intersects this one. -======= - *Determine if the input geometry intersects this one. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ intersects(geometry: Geometry): boolean; /** -<<<<<<< HEAD * Translate the x,y properties of the point from source to dest. -======= - *Translate the x,y properties of the point from source to dest. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ transform(source: Projection, dest: Projection): Geometry; /** -<<<<<<< HEAD * Return a list of all points in this geometry. -======= - *Return a list of all points in this geometry. ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 */ getVertices(nodes: boolean): Array; } @@ -1871,7 +3384,6 @@ declare module OpenLayers { } module Layer { -<<<<<<< HEAD export interface WMSGetMapParams { version?: string; exceptions?: string; @@ -1895,8 +3407,6 @@ declare module OpenLayers { crossOriginKeyword?: string; } -======= ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 export class ArcGIS93Rest { } export class ArcGISCache { } export class ArcIMS { } @@ -1906,15 +3416,712 @@ declare module OpenLayers { export class FixedZoomLevels { } export class GeoRSS { } export class Google { } - export class Grid { } - export class HTTPRequest { } + + export class Grid extends HTTPRequest { + /** + * APIProperty: tileSize + * {} + */ + tileSize: Size; + + /** + * Property: tileOriginCorner + * {String} If the property is not provided, the tile origin + * will be derived from the layer's . The corner of the + * used is determined by this property. Acceptable values + * are "tl" (top left), "tr" (top right), "bl" (bottom left), and "br" + * (bottom right). Default is "bl". + */ + tileOriginCorner: string; + + /** + * APIProperty: tileOrigin + * {} Optional origin for aligning the grid of tiles. + * If provided, requests for tiles at all resolutions will be aligned + * with this location (no tiles shall overlap this location). If + * not provided, the grid of tiles will be aligned with the layer's + * . Default is ``null``. + */ + tileOrigin: LonLat; + + /** APIProperty: tileOptions + * {Object} optional configuration options for instances + * created by this Layer, if supported by the tile class. + */ + tileOptions: Object; + + /** + * APIProperty: tileClass + * {} The tile class to use for this layer. + * Defaults is OpenLayers.Tile.Image. + */ + tileClass: OpenLayers.Tile; + + /** + * Property: grid + * {Array(Array())} This is an array of rows, each row is + * an array of tiles. + */ + grid: OpenLayers.Tile[][]; + + /** + * APIProperty: singleTile + * {Boolean} Moves the layer into single-tile mode, meaning that one tile + * will be loaded. The tile's size will be determined by the 'ratio' + * property. When the tile is dragged such that it does not cover the + * entire viewport, it is reloaded. + */ + singleTile: boolean; + + /** APIProperty: ratio + * {Float} Used only when in single-tile mode, this specifies the + * ratio of the size of the single tile to the size of the map. + * Default value is 1.5. + */ + ratio: number; + + /** + * APIProperty: buffer + * {Integer} Used only when in gridded mode, this specifies the number of + * extra rows and columns of tiles on each side which will + * surround the minimum grid tiles to cover the map. + * For very slow loading layers, a larger value may increase + * performance somewhat when dragging, but will increase bandwidth + * use significantly. + */ + buffer: number; + + /** + * APIProperty: transitionEffect + * {String} The transition effect to use when the map is zoomed. + * Two posible values: + * + * "resize" - Existing tiles are resized on zoom to provide a visual + * effect of the zoom having taken place immediately. As the + * new tiles become available, they are drawn on top of the + * resized tiles (this is the default setting). + * "map-resize" - Existing tiles are resized on zoom and placed below the + * base layer. New tiles for the base layer will cover existing tiles. + * This setting is recommended when having an overlay duplicated during + * the transition is undesirable (e.g. street labels or big transparent + * fills). + * null - No transition effect. + * + * Using "resize" on non-opaque layers can cause undesired visual + * effects. Set transitionEffect to null in this case. + */ + transitionEffect: string; + + /** + * APIProperty: numLoadingTiles + * {Integer} How many tiles are still loading? + */ + numLoadingTiles: number; + + /** + * Property: serverResolutions + * {Array(Number}} This property is documented in subclasses as + * an API property. + */ + serverResolutions: number[]; + + /** + * Property: loading + * {Boolean} Indicates if tiles are being loaded. + */ + loading: boolean; + + /** + * Property: backBuffer + * {DOMElement} The back buffer. + */ + backBuffer: HTMLElement; + + /** + * Property: gridResolution + * {Number} The resolution of the current grid. Used for backbuffer and + * client zoom. This property is updated every time the grid is + * initialized. + */ + gridResolution: number; + + /** + * Property: backBufferResolution + * {Number} The resolution of the current back buffer. This property is + * updated each time a back buffer is created. + */ + backBufferResolution: number; + + /** + * Property: backBufferLonLat + * {Object} The top-left corner of the current back buffer. Includes lon + * and lat properties. This object is updated each time a back buffer + * is created. + */ + backBufferLonLat: { lon: number; lat: number }; + + /** + * Property: backBufferTimerId + * {Number} The id of the back buffer timer. This timer is used to + * delay the removal of the back buffer, thereby preventing + * flash effects caused by tile animation. + */ + backBufferTimerId: number; + + /** + * APIProperty: removeBackBufferDelay + * {Number} Delay for removing the backbuffer when all tiles have finished + * loading. Can be set to 0 when no css opacity transitions for the + * olTileImage class are used. Default is 0 for layers, + * 2500 for tiled layers. See for more information on + * tile animation. + */ + removeBackBufferDelay: number; + + /** + * APIProperty: className + * {String} Name of the class added to the layer div. If not set in the + * options passed to the constructor then className defaults to + * "olLayerGridSingleTile" for single tile layers (see ), + * and "olLayerGrid" for non single tile layers. + * + * Note: + * + * The displaying of tiles is not animated by default for single tile + * layers - OpenLayers' default theme (style.css) includes this: + * (code) + * .olLayerGrid .olTileImage { + * -webkit-transition: opacity 0.2s linear; + * -moz-transition: opacity 0.2s linear; + * -o-transition: opacity 0.2s linear; + * transition: opacity 0.2s linear; + * } + * (end) + * To animate tile displaying for any grid layer the following + * CSS rule can be used: + * (code) + * .olTileImage { + * -webkit-transition: opacity 0.2s linear; + * -moz-transition: opacity 0.2s linear; + * -o-transition: opacity 0.2s linear; + * transition: opacity 0.2s linear; + * } + * (end) + * In that case, to avoid flash effects, + * should not be zero. + */ + className: string; + + /** + * Property: gridLayout + * {Object} Object containing properties tilelon, tilelat, startcol, + * startrow + */ + gridLayout: { tilelon: number; tilelat: number; startcol: number; startrow: number; }; + + /** + * Property: rowSign + * {Number} 1 for grids starting at the top, -1 for grids starting at the + * bottom. This is used for several grid index and offset calculations. + */ + rowSign: number; + + /** + * Property: transitionendEvents + * {Array} Event names for transitionend + */ + transitionendEvents: string[]; + + /** + * Constructor: OpenLayers.Layer.Grid + * Create a new grid layer + * + * Parameters: + * name - {String} + * url - {String} + * params - {Object} + * options - {Object} Hashtable of extra options to tag onto the layer + */ + constructor(name: string, url: string, params: {}, options: {}); + + /** + * Method: initProperties + * Set any properties that depend on the value of singleTile. + * Currently sets removeBackBufferDelay and className + */ + private initProperties(): void; + + /** + * Method: setMap + * + * Parameters: + * map - {} The map. + */ + setMap(map: Map): void; + + /** + * Method: removeMap + * Called when the layer is removed from the map. + * + * Parameters: + * map - {} The map. + */ + removeMap(map: Map): void; + + /** + * APIMethod: destroy + * Deconstruct the layer and clear the grid. + */ + destroy(): void; + + /** + * Method: clearGrid + * Go through and remove all tiles from the grid, calling + * destroy() on each of them to kill circular references + */ + private clearGrid(): void; + + /** + * APIMethod: addOptions + * + * Parameters: + * newOptions - {Object} + * reinitialize - {Boolean} If set to true, and if resolution options of the + * current baseLayer were changed, the map will be recentered to make + * sure that it is displayed with a valid resolution, and a + * changebaselayer event will be triggered. + */ + addOptions(newOptions: {}, reinitialize: boolean): void; + + /** + * APIMethod: clone + * Create a clone of this layer + * + * Parameters: + * obj - {Object} Is this ever used? + * + * Returns: + * {} An exact clone of this OpenLayers.Layer.Grid + */ + clone(obj?: Object): Layer.Grid; + + /** + * Method: moveTo + * This function is called whenever the map is moved. All the moving + * of actual 'tiles' is done by the map, but moveTo's role is to accept + * a bounds and make sure the data that that bounds requires is pre-loaded. + * + * Parameters: + * bounds - {} + * zoomChanged - {Boolean} + * dragging - {Boolean} + */ + moveTo(bounds: Bounds, zoomChanged: boolean, dragging: boolean): void; + + /** + * Method: getTileData + * Given a map location, retrieve a tile and the pixel offset within that + * tile corresponding to the location. If there is not an existing + * tile in the grid that covers the given location, null will be + * returned. + * + * Parameters: + * loc - {} map location + * + * Returns: + * {Object} Object with the following properties: tile ({}), + * i ({Number} x-pixel offset from top left), and j ({Integer} y-pixel + * offset from top left). + */ + private getTileData(loc: LonLat): { tile: Tile; i: number; j: number }; + + /** + * Method: destroyTile + * + * Parameters: + * tile - {} + */ + private destroyTile(tile: Tile): void; + + /** + * Method: getServerResolution + * Return the closest server-supported resolution. + * + * Parameters: + * resolution - {Number} The base resolution. If undefined the + * map resolution is used. + * + * Returns: + * {Number} The closest server resolution value. + */ + private getServerResolution(resolution: number): number; + + /** + * Method: getServerZoom + * Return the zoom value corresponding to the best matching server + * resolution, taking into account and . + * + * Returns: + * {Number} The closest server supported zoom. This is not the map zoom + * level, but an index of the server's resolutions array. + */ + private getServerZoom(): number; + + /** + * Method: applyBackBuffer + * Create, insert, scale and position a back buffer for the layer. + * + * Parameters: + * resolution - {Number} The resolution to transition to. + */ + private applyBackBuffer(resolution: number): void; + + /** + * Method: createBackBuffer + * Create a back buffer. + * + * Returns: + * {DOMElement} The DOM element for the back buffer, undefined if the + * grid isn't initialized yet. + */ + private createBackBuffer(): HTMLElement; + + /** + * Method: removeBackBuffer + * Remove back buffer from DOM. + */ + private removeBackBuffer(): void; + + /** + * Method: moveByPx + * Move the layer based on pixel vector. + * + * Parameters: + * dx - {Number} + * dy - {Number} + */ + moveByPx(dx: number, dy: number): void; + + /** + * APIMethod: setTileSize + * Check if we are in singleTile mode and if so, set the size as a ratio + * of the map size (as specified by the layer's 'ratio' property). + * + * Parameters: + * size - {} + */ + setTileSize(size: Size): void; + + /** + * APIMethod: getTilesBounds + * Return the bounds of the tile grid. + * + * Returns: + * {} A Bounds object representing the bounds of all the + * currently loaded tiles (including those partially or not at all seen + * onscreen). + */ + getTilesBounds(): Bounds; + + /** + * Method: initSingleTile + * + * Parameters: + * bounds - {} + */ + private initSingleTile(bounds: Bounds); + + /** + * Method: calculateGridLayout + * Generate parameters for the grid layout. + * + * Parameters: + * bounds - {|Object} OpenLayers.Bounds or an + * object with a 'left' and 'top' properties. + * origin - {|Object} OpenLayers.LonLat or an + * object with a 'lon' and 'lat' properties. + * resolution - {Number} + * + * Returns: + * {Object} Object containing properties tilelon, tilelat, startcol, + * startrow + */ + private calculateGridLayout(bounds: Bounds, origin: LonLat, resolution: number): { tilelon: number; tilelat: number; startcol: number; startrow: number }; + + getImageSize(): Size; + + /** + * Method: getTileOrigin + * Determine the origin for aligning the grid of tiles. If a + * property is supplied, that will be returned. Otherwise, the origin + * will be derived from the layer's property. In this case, + * the tile origin will be the corner of the given by the + * property. + * + * Returns: + * {} The tile origin. + */ + private getTileOrigin(): LonLat; + + /** + * Method: getTileBoundsForGridIndex + * + * Parameters: + * row - {Number} The row of the grid + * col - {Number} The column of the grid + * + * Returns: + * {} The bounds for the tile at (row, col) + */ + private getTileBoundsForGridIndex(row: number, col: number): Bounds; + + /** + * Method: initGriddedTiles + * + * Parameters: + * bounds - {} + */ + private initGriddedTiles(bounds: Bounds): void; + + /** + * Method: getMaxExtent + * Get this layer's maximum extent. (Implemented as a getter for + * potential specific implementations in sub-classes.) + * + * Returns: + * {} + */ + private getMaxExtent(): Bounds; + + /** + * APIMethod: addTile + * Create a tile, initialize it, and add it to the layer div. + * + * Parameters + * bounds - {} + * position - {} + * + * Returns: + * {} The added OpenLayers.Tile + */ + addTile(bounds: Bounds, position: number): Tile; + + /** + * Method: addTileMonitoringHooks + * This function takes a tile as input and adds the appropriate hooks to + * the tile so that the layer can keep track of the loading tiles. + * + * Parameters: + * tile - {} + */ + private addTileMonitoringHooks(tile: Tile): void; + + /** + * Method: removeTileMonitoringHooks + * This function takes a tile as input and removes the tile hooks + * that were added in addTileMonitoringHooks() + * + * Parameters: + * tile - {} + */ + private removeTileMonitoringHooks(tile: Tile): void; + + /** + * Method: moveGriddedTiles + */ + private moveGriddedTiles(): void; + + /** + * Method: shiftRow + * Shifty grid work + * + * Parameters: + * prepend - {Boolean} if true, prepend to beginning. + * if false, then append to end + * tileSize - {Object} rendered tile size; object with w and h properties + */ + private shiftRow(prepend: boolean, tileSize: { w: number; h: number }): void; + + /** + * Method: shiftColumn + * Shift grid work in the other dimension + * + * Parameters: + * prepend - {Boolean} if true, prepend to beginning. + * if false, then append to end + * tileSize - {Object} rendered tile size; object with w and h properties + */ + private shiftColumn(prepend: boolean, tileSize: { w: number; h: number }): void; + + /** + * Method: removeExcessTiles + * When the size of the map or the buffer changes, we may need to + * remove some excess rows and columns. + * + * Parameters: + * rows - {Integer} Maximum number of rows we want our grid to have. + * columns - {Integer} Maximum number of columns we want our grid to have. + */ + private removeExcessTiles(rows: number, columns: number): void; + + /** + * Method: onMapResize + * For singleTile layers, this will set a new tile size according to the + * dimensions of the map pane. + */ + onMapResize(): void; + + /** + * APIMethod: getTileBounds + * Returns The tile bounds for a layer given a pixel location. + * + * Parameters: + * viewPortPx - {} The location in the viewport. + * + * Returns: + * {} Bounds of the tile at the given pixel location. + */ + getTileBounds(viewPortPx: Pixel): Bounds; + } + + export class HTTPRequest extends Layer { + /** + * Constant: URL_HASH_FACTOR + * {Float} Used to hash URL param strings for multi-WMS server selection. + * Set to the Golden Ratio per Knuth's recommendation. + */ + static URL_HASH_FACTOR: number; + + /** + * Property: url + * {Array(String) or String} This is either an array of url strings or + * a single url string. + */ + url: string[]; + + /** + * Property: params + * {Object} Hashtable of key/value parameters + */ + params: Object; + + /** + * APIProperty: reproject + * *Deprecated*. See http://docs.openlayers.org/library/spherical_mercator.html + * for information on the replacement for this functionality. + * {Boolean} Whether layer should reproject itself based on base layer + * locations. This allows reprojection onto commercial layers. + * Default is false: Most layers can't reproject, but layers + * which can create non-square geographic pixels can, like WMS. + */ + reproject: boolean; + + /** + * Constructor: OpenLayers.Layer.HTTPRequest + * + * Parameters: + * name - {String} + * url - {Array(String) or String} + * params - {Object} + * options - {Object} Hashtable of extra options to tag onto the layer + */ + constructor(name: string, url: string, params: Object, options: Object); + constructor(name: string, url: string[], params: Object, options: Object); + + /** + * APIMethod: destroy + */ + destroy(): void; + + /** + * APIMethod: clone + * + * Parameters: + * obj - {Object} + * + * Returns: + * {} An exact clone of this + * + */ + clone(obj?: Object): HTTPRequest; + + /** + * APIMethod: setUrl + * + * Parameters: + * newUrl - {String} + */ + setUrl(newUrl: string): void; + + /** + * APIMethod: mergeNewParams + * + * Parameters: + * newParams - {Object} + * + * Returns: + * redrawn: {Boolean} whether the layer was actually redrawn. + */ + mergeNewParams(newParams: Object): boolean; + + /** + * APIMethod: redraw + * Redraws the layer. Returns true if the layer was redrawn, false if not. + * + * Parameters: + * force - {Boolean} Force redraw by adding random parameter. + * + * Returns: + * {Boolean} The layer was redrawn. + */ + redraw(force?: boolean): boolean; + + /** + * Method: selectUrl + * selectUrl() implements the standard floating-point multiplicative + * hash function described by Knuth, and hashes the contents of the + * given param string into a float between 0 and 1. This float is then + * scaled to the size of the provided urls array, and used to select + * a URL. + * + * Parameters: + * paramString - {String} + * urls - {Array(String)} + * + * Returns: + * {String} An entry from the urls array, deterministically selected based + * on the paramString. + */ + private selectUrl(paramString: string, urls: string[]): string; + + /** + * Method: getFullRequestString + * Combine url with layer's params and these newParams. + * + * does checking on the serverPath variable, allowing for cases when it + * is supplied with trailing ? or &, as well as cases where not. + * + * return in formatted string like this: + * "server?key1=value1&key2=value2&key3=value3" + * + * WARNING: The altUrl parameter is deprecated and will be removed in 3.0. + * + * Parameters: + * newParams - {Object} + * altUrl - {String} Use this as the url instead of the layer's url + * + * Returns: + * {String} + */ + getFullRequestString(newParams: Object, altUrl: string): string; + } + export class Image { } export class KaMap { } export class KaMapCache { } export class MapGuide { } export class MapServer { } export class Markers { } -<<<<<<< HEAD export class OSM extends Layer.XYZ { /** @@ -1958,14 +4165,11 @@ declare module OpenLayers { /** * Create a clone of this layer */ - clone(): Layer.WMS; + clone(obj?: Object): Layer.OSM; static CLASS_NAME: string; } -======= - export class OSM { } ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 export class PointGrid { } export class PointTrack { } export class SphericalMercator { } @@ -1973,10 +4177,9 @@ declare module OpenLayers { export class Text { } export class TileCache { } export class UTFGrid { } -<<<<<<< HEAD - export class Vector { } + export class Vector { } - export class WMS { + export class WMS extends Layer.Grid { /** * Default is true for WMS layer */ @@ -2005,52 +4208,52 @@ declare module OpenLayers { */ yx: Object; - /** - * Constructor: OpenLayers.Layer.WMS - * Create a new WMS layer object - * - * Examples: - * - * The code below creates a simple WMS layer using the image/jpeg format. - * (code) - * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic", - * "http://wms.jpl.nasa.gov/wms.cgi", - * {layers: "modis,global_mosaic"}); - * (end) - * Note the 3rd argument (params). Properties added to this object will be - * added to the WMS GetMap requests used for this layer's tiles. The only - * mandatory parameter is "layers". Other common WMS params include - * "transparent", "styles" and "format". Note that the "srs" param will - * always be ignored. Instead, it will be derived from the baseLayer's or - * map's projection. - * - * The code below creates a transparent WMS layer with additional options. - * (code) - * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic", - * "http://wms.jpl.nasa.gov/wms.cgi", - * { - * layers: "modis,global_mosaic", - * transparent: true - * }, { - * opacity: 0.5, - * singleTile: true - * }); - * (end) - * Note that by default, a WMS layer is configured as baseLayer. Setting - * the "transparent" param to true will apply some magic (see ). - * The default image format changes from image/jpeg to image/png, and the - * layer is not configured as baseLayer. - * - * Parameters: - * name - {String} A name for the layer - * url - {String} Base url for the WMS - * (e.g. http://wms.jpl.nasa.gov/wms.cgi) - * params - {Object} An object with key/value pairs representing the - * GetMap query string parameters and parameter values. - * options - {Object} Hashtable of extra options to tag onto the layer. - * These options include all properties listed above, plus the ones - * inherited from superclasses. - */ + /** + * Constructor: OpenLayers.Layer.WMS + * Create a new WMS layer object + * + * Examples: + * + * The code below creates a simple WMS layer using the image/jpeg format. + * (code) + * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic", + * "http://wms.jpl.nasa.gov/wms.cgi", + * {layers: "modis,global_mosaic"}); + * (end) + * Note the 3rd argument (params). Properties added to this object will be + * added to the WMS GetMap requests used for this layer's tiles. The only + * mandatory parameter is "layers". Other common WMS params include + * "transparent", "styles" and "format". Note that the "srs" param will + * always be ignored. Instead, it will be derived from the baseLayer's or + * map's projection. + * + * The code below creates a transparent WMS layer with additional options. + * (code) + * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic", + * "http://wms.jpl.nasa.gov/wms.cgi", + * { + * layers: "modis,global_mosaic", + * transparent: true + * }, { + * opacity: 0.5, + * singleTile: true + * }); + * (end) + * Note that by default, a WMS layer is configured as baseLayer. Setting + * the "transparent" param to true will apply some magic (see ). + * The default image format changes from image/jpeg to image/png, and the + * layer is not configured as baseLayer. + * + * Parameters: + * name - {String} A name for the layer + * url - {String} Base url for the WMS + * (e.g. http://wms.jpl.nasa.gov/wms.cgi) + * params - {Object} An object with key/value pairs representing the + * GetMap query string parameters and parameter values. + * options - {Object} Hashtable of extra options to tag onto the layer. + * These options include all properties listed above, plus the ones + * inherited from superclasses. + */ constructor(name: string, url: string, params: WMSGetMapParams, options: WMSOptions); /** @@ -2075,7 +4278,7 @@ declare module OpenLayers { * Once params have been changed, the tiles will be reloaded with * the new parameters. */ - mergeNewParams(newParams): void; + mergeNewParams(newParams: Object): boolean; /** * Combine the layer's url with its params and these newParams. @@ -2089,13 +4292,112 @@ declare module OpenLayers { static CLASS_NAME: string; } -======= - export class Vector { } - export class WMS { } ->>>>>>> c19fb92cad220a320f0e717d542712c03c15b3c1 export class WMTS { } + export class WorldWind { } - export class XYZ { } + + export class XYZ extends Layer.Grid { + /** + * APIProperty: isBaseLayer + * Default is true, as this is designed to be a base tile source. + */ + isBaseLayer: boolean; + + /** + * APIProperty: sphericalMercator + * Whether the tile extents should be set to the defaults for + * spherical mercator. Useful for things like OpenStreetMap. + * Default is false, except for the OSM subclass. + */ + sphericalMercator: boolean; + + /** + * APIProperty: zoomOffset + * {Number} If your cache has more zoom levels than you want to provide + * access to with this layer, supply a zoomOffset. This zoom offset + * is added to the current map zoom level to determine the level + * for a requested tile. For example, if you supply a zoomOffset + * of 3, when the map is at the zoom 0, tiles will be requested from + * level 3 of your cache. Default is 0 (assumes cache level and map + * zoom are equivalent). Using is an alternative to + * setting if you only want to expose a subset + * of the server resolutions. + */ + zoomOffset: number; + + /** + * APIProperty: serverResolutions + * {Array} A list of all resolutions available on the server. Only set this + * property if the map resolutions differ from the server. This + * property serves two purposes. (a) can include + * resolutions that the server supports and that you don't want to + * provide with this layer; you can also look at , which is + * an alternative to for that specific purpose. + * (b) The map can work with resolutions that aren't supported by + * the server, i.e. that aren't in . When the + * map is displayed in such a resolution data for the closest + * server-supported resolution is loaded and the layer div is + * stretched as necessary. + */ + serverResolutions: number[]; + + /** + * Constructor: OpenLayers.Layer.XYZ + * + * Parameters: + * name - {String} + * url - {String} + * options - {Object} Hashtable of extra options to tag onto the layer + */ + constructor(name: number, url: string, options: {}); + + /** + * APIMethod: clone + * Create a clone of this layer + * + * Parameters: + * obj - {Object} Is this ever used? + * + * Returns: + * {} An exact clone of this OpenLayers.Layer.XYZ + */ + clone(obj?: Object): Layer.XYZ; + + /** + * Method: getURL + * + * Parameters: + * bounds - {} + * + * Returns: + * {String} A string with the layer's url and parameters and also the + * passed-in bounds and appropriate tile size specified as + * parameters + */ + private getURL(bounds: Bounds): string; + + /** + * Method: getXYZ + * Calculates x, y and z for the given bounds. + * + * Parameters: + * bounds - {} + * + * Returns: + * {Object} - an object with x, y and z properties. + */ + private getXYZ(bounds: Bounds): { x: number; y: number; z: number }; + + /* APIMethod: setMap + * When the layer is added to a map, then we can fetch our origin + * (if we don't have one.) + * + * Parameters: + * map - {} + */ + setMap(map: Map): void; + } + export class Zoomify { } module Google { From b5006a9086507c1d9e986dfe371370a201a79dc8 Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Fri, 1 Nov 2013 14:15:39 +0400 Subject: [PATCH 144/150] add TODO anchors to estimate amount of definitions to implement --- openlayers/openlayers.d.ts | 556 +++++++++++++++++++++++++++++++------ 1 file changed, 464 insertions(+), 92 deletions(-) diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index 8a7f5e741c..52ea254430 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -2934,144 +2934,214 @@ declare module OpenLayers { export class Curve extends Geometry.MultiPoint { + // TODO + } export class LineString extends Geometry.Curve { + // TODO + } export class LinearRing extends Geometry.LineString { + // TODO + } export class MultiLineString extends Geometry.Collection { + // TODO + } export class MultiPoint extends Geometry.Collection { } + // TODO + export class MultiPolygon extends Geometry.Collection { + // TODO + } export class Polygon extends Geometry.Collection { + // TODO + } } module Control { export class ArgParser { + // TODO + } export class Attribution { + // TODO + } export class Button { + // TODO + } export class CacheRead { + // TODO + } export class CacheWrite { + // TODO + } export class DragFeature { + // TODO + } export class DragPan { + // TODO + } export class DrawFeature { + // TODO + } export class EditingToolbar { + // TODO + } export class Geolocate { + // TODO + } export class GetFeature { + // TODO + } export class Graticule { + // TODO + } export class KeyboardDefaults { + // TODO + } export class LayerSwitcher { + // TODO + } export class Measure { + // TODO + } export class ModifyFeature { + // TODO + } export class MousePosition { + // TODO + } export class NavToolbar { + // TODO + } export class Navigation { + // TODO + } export class NavigationHistory { + // TODO + } export class OverviewMap { + // TODO + } export class Pan { + // TODO + } export class PanPanel { + // TODO + } export class PanZoom { + // TODO + } export class PanZoomBar { + // TODO + } export class Panel { + // TODO + } export class Permalink { + // TODO + } export class PinchZoom { + // TODO + } export class SLDSelect { @@ -3080,108 +3150,158 @@ declare module OpenLayers { export class Scale { + // TODO + } export class ScaleLine { + // TODO + } export class SelectFeature { + // TODO + } export class Snapping { + // TODO + } export class Split { + // TODO + } export class TextButtonPanel { + // TODO + } export class TouchNavigation { + // TODO + } export class TransformFeature { + // TODO + } export class UTFGrid { + // TODO + } export class WMSGetFeatureInfo { + // TODO + } export class WMTSGetFeatureInfo { + // TODO + } export class Zoom { + // TODO + } export class ZoomBox { + // TODO + } export class ZoomIn { + // TODO + } export class ZoomOut { + // TODO + } export class ZoomPanel { + // TODO + } export class ZoomToMaxExtent { + // TODO + } } module Events { export class buttonclick extends OpenLayers.Class { + // TODO + } export class featureclick extends OpenLayers.Class { + // TODO + } } module Feature { export class Vector { + // TODO + } } module Filter { export class Comparison { + // TODO + } export class FeatureId { + // TODO + } export class Function { + // TODO + } export class Logical { + // TODO + } export class Spatial { + // TODO + } } @@ -3192,190 +3312,338 @@ declare module OpenLayers { export class Atom { + // TODO + } export class CQL { + // TODO + } export class CSWGetDomain { + // TODO + } export class CSWGetRecords { + // TODO + } - export class Context { } - export class EncodedPolyline { } - export class Filter { } - export class GML { } - export class GPX { } - export class GeoJSON { } - export class GeoRSS { } - export class JSON { } - export class KML { } - export class OGCExceptionReport { } - export class OSM { } - export class OWSCommon { } - export class OWSContext { } - export class QueryStringFilter { } - export class SLD { } - export class SOSCapabilities { } - export class SOSGetFeatureOfInterest { } - export class SOSGetObservation { } - export class TMSCapabilities { } - export class Text { } - export class WCSCapabilities { } - export class WCSDescribeCoverage { } - export class WCSGetCoverage { } - export class WFS { } - export class WFSCapabilities { } - export class WFSDescribeFeatureType { } - export class WFST { } - export class WKT { } - export class WMC { } - export class WMSCapabilities { } - export class WMSDescribeLayer { } - export class WMSGetFeatureInfo { } - export class WMTSCapabilities { } - export class WPSCapabilities { } - export class WPSDescribeProcess { } - export class WPSExecute { } - export class XLS { } - export class XML { } + export class Context { + // TODO + } + export class EncodedPolyline { + // TODO + } + export class Filter { + // TODO + } + export class GML { + // TODO + } + export class GPX { + // TODO + } + export class GeoJSON { + // TODO + } + export class GeoRSS { + // TODO + } + export class JSON { + // TODO + } + export class KML { + // TODO + } + export class OGCExceptionReport { + // TODO + } + export class OSM { + // TODO + } + export class OWSCommon { + // TODO + } + export class OWSContext { + // TODO + } + export class QueryStringFilter { + // TODO + } + export class SLD { + // TODO + } + export class SOSCapabilities { + // TODO + } + export class SOSGetFeatureOfInterest { + // TODO + } + export class SOSGetObservation { + // TODO + } + export class TMSCapabilities { + // TODO + } + export class Text { + // TODO + } + export class WCSCapabilities { + // TODO + } + export class WCSDescribeCoverage { + // TODO + } + export class WCSGetCoverage { + // TODO + } + export class WFS { + // TODO + } + export class WFSCapabilities { + // TODO + } + export class WFSDescribeFeatureType { + // TODO + } + export class WFST { + // TODO + } + export class WKT { + // TODO + } + export class WMC { + // TODO + } + export class WMSCapabilities { + // TODO + } + export class WMSDescribeLayer { + // TODO + } + export class WMSGetFeatureInfo { + // TODO + } + export class WMTSCapabilities { + // TODO + } + export class WPSCapabilities { + // TODO + } + export class WPSDescribeProcess { + // TODO + } + export class WPSExecute { + // TODO + } + export class XLS { + // TODO + } + export class XML { + // TODO + } module ArcXML { export class Features extends OpenLayers.Class { + // TODO + } } module CSWGetDomain { - export class v2_0_2 { } + export class v2_0_2 { + // TODO + } } module CSWGetRecords { - export class v2_0_2 { } + export class v2_0_2 { + // TODO + } } module Filter { + // TODO + } module GML { + // TODO + } module OWSCommon { + // TODO + } module OWSContext { + // TODO + } module SLD { + // TODO + } module SOSCapabilities { + // TODO + } module WCSCapabilities { + // TODO + } module WCSDescribeCoverage { + // TODO + } module WFSCapabilities { + // TODO + } module WFST { + // TODO + } module WMC { + // TODO + } module WMSCapabilities { + // TODO + } module WMSDescribeLayer { + // TODO + } module WMTSCapabilities { + // TODO + } module WPSCapabilities { + // TODO + } module XLS { + // TODO + } module XML { + // TODO + } } module Handler { export class Box { + // TODO + } export class Click { + // TODO + } export class Drag { + // TODO + } export class Feature { + // TODO + } export class Hover { + // TODO + } export class Keyboard { + // TODO + } export class MouseWheel { + // TODO + } export class Path { + // TODO + } export class Pinch { + // TODO + } export class Point { + // TODO + } export class Polygon { + // TODO + } export class RegularPolygon { + // TODO + } } @@ -4116,12 +4384,24 @@ declare module OpenLayers { getFullRequestString(newParams: Object, altUrl: string): string; } - export class Image { } - export class KaMap { } - export class KaMapCache { } - export class MapGuide { } - export class MapServer { } - export class Markers { } + export class Image { + // TODO + } + export class KaMap { + // TODO + } + export class KaMapCache { + // TODO + } + export class MapGuide { + // TODO + } + export class MapServer { + // TODO + } + export class Markers { + // TODO + } export class OSM extends Layer.XYZ { /** @@ -4170,14 +4450,30 @@ declare module OpenLayers { static CLASS_NAME: string; } - export class PointGrid { } - export class PointTrack { } - export class SphericalMercator { } - export class TMS { } - export class Text { } - export class TileCache { } - export class UTFGrid { } - export class Vector { } + export class PointGrid { + // TODO + } + export class PointTrack { + // TODO + } + export class SphericalMercator { + // TODO + } + export class TMS { + // TODO + } + export class Text { + // TODO + } + export class TileCache { + // TODO + } + export class UTFGrid { + // TODO + } + export class Vector { + // TODO + } export class WMS extends Layer.Grid { /** @@ -4292,9 +4588,13 @@ declare module OpenLayers { static CLASS_NAME: string; } - export class WMTS { } + export class WMTS { + // TODO + } - export class WorldWind { } + export class WorldWind { + // TODO + } export class XYZ extends Layer.Grid { /** @@ -4398,87 +4698,159 @@ declare module OpenLayers { setMap(map: Map): void; } - export class Zoomify { } + export class Zoomify { + // TODO + } module Google { - export class v3 { } + export class v3 { + // TODO + } } module Vector { - export class RootContainer { } + export class RootContainer { + // TODO + } } } module Marker { - export class Box { } + export class Box { + // TODO + } } module Popup { - export class Anchored { } - export class Framed { } - export class FramedCloud { } + export class Anchored { + // TODO + } + export class Framed { + // TODO + } + export class FramedCloud { + // TODO + } } module Protocol { - export class CSW { } - export class HTTP { } - export class SOS { } - export class Script { } - export class WFS { } + export class CSW { + // TODO + } + export class HTTP { + // TODO + } + export class SOS { + // TODO + } + export class Script { + // TODO + } + export class WFS { + // TODO + } module CSW { - export class v2_0_2 { } + export class v2_0_2 { + // TODO + } } module SOS { - export class v1_0_0 { } + export class v1_0_0 { + // TODO + } } module WFS { - export class v2_0_0 { } + export class v2_0_0 { + // TODO + } } } module Renderer { - export class Canvas { } - export class Elements { } - export class SVG { } - export class VML { } + export class Canvas { + // TODO + } + export class Elements { + // TODO + } + export class SVG { + // TODO + } + export class VML { + // TODO + } } module Request { - export class XMLHttpRequest { } + export class XMLHttpRequest { + // TODO + } } module Strategy { - export class BBOX { } - export class Cluster { } - export class Filter { } - export class Fixed { } - export class Paging { } - export class Refresh { } - export class Save { } + export class BBOX { + // TODO + } + export class Cluster { + // TODO + } + export class Filter { + // TODO + } + export class Fixed { + // TODO + } + export class Paging { + // TODO + } + export class Refresh { + // TODO + } + export class Save { + // TODO + } } module Symbolizer { - export class Line { } - export class Point { } - export class Polygon { } - export class Raster { } - export class Text { } + export class Line { + // TODO + } + export class Point { + // TODO + } + export class Polygon { + // TODO + } + export class Raster { + // TODO + } + export class Text { + // TODO + } } module Tile { - export class Image { } - export class UTFGrid { } + export class Image { + // TODO + } + export class UTFGrid { + // TODO + } module Image { - export class IFrame { } + export class IFrame { + // TODO + } } } module Util { - export class vendorPrefix { } + export class vendorPrefix { + // TODO + } } } From 2bdd32b4a692f758e4ae6d167c2fa5e608401e4f Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Fri, 1 Nov 2013 15:26:47 +0400 Subject: [PATCH 145/150] fix file encoding --- openlayers/openlayers.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index 52ea254430..f4a21241b2 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -1,4 +1,4 @@ -// Type definitions for OpenLayers.js 2.10 +// Type definitions for OpenLayers.js 2.10 // Project: https://github.com/openlayers/openlayers // Definitions by: Ilya Bolkhovsky // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -1214,7 +1214,7 @@ declare module OpenLayers { clone(): LonLat; /** - * A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. + * A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s. */ add(lon: number, lat: number): LonLat; From 8b93d8b26db8f7a01abacaf28e72a4bf4f313230 Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Fri, 1 Nov 2013 15:27:12 +0400 Subject: [PATCH 146/150] add credentials --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5b2e26e789..5ebc5db2ee 100755 --- a/README.md +++ b/README.md @@ -172,6 +172,7 @@ List of Definitions * [node_zeromq](https://github.com/JustinTulloss/zeromq.node) (by [Dave McKeown](https://github.com/davemckeown)) * [node-sqlserver](https://github.com/WindowsAzure/node-sqlserver) (by [Boris Yankov](https://github.com/borisyankov)) * [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/)) +* [OpenLayers] (https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/)) * [Parallel.js](https://github.com/adambom/parallel.js) (by [Josh Baldwin](https://github.com/jbaldwin)) * [PDF.js](https://github.com/mozilla/pdf.js) (by [Josh Baldwin](https://github.com/jbaldwin)) * [Persona](http://www.mozilla.org/en-US/persona) (by [James Frasca](https://github.com/Nycto)) From d05a98b8817b9341898ac458c790c87d413a24e5 Mon Sep 17 00:00:00 2001 From: bolkhovsky Date: Fri, 1 Nov 2013 16:53:47 +0400 Subject: [PATCH 147/150] fix implicit annotations --- openlayers/openlayers.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index f4a21241b2..39355bb4e5 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -398,7 +398,7 @@ declare module OpenLayers { * setNewBaseLayer - {Boolean} Set a new base layer when this layer has * been destroyed. Default is true. */ - destroy(setNewBaseLayer?: boolean); + destroy(setNewBaseLayer?: boolean): void; /** * Method: clone @@ -974,7 +974,7 @@ declare module OpenLayers { /** * Set a custom transform method between two projections. Use this method in cases where the proj4js lib is not available or where custom projections need to be handled. */ - addTransform(from: string, to: string, method: () => void); + addTransform(from: string, to: string, method: () => void): void; /** * Transform a point coordinate from one projection to another. Note that the input point is transformed in place. @@ -1085,14 +1085,14 @@ declare module OpenLayers { * bounds may return non-integer properties, even if a pixel * is passed. */ - scale(ratio: number, origin?: Pixel); + scale(ratio: number, origin?: Pixel): void; /** * Scales the bounds around a pixel or lonlat. Note that the new * bounds may return non-integer properties, even if a pixel * is passed. */ - scale(ratio: number, origin?: LonLat); + scale(ratio: number, origin?: LonLat): void; /** * Shifts the coordinates of the bound by the given horizontal and vertical @@ -1123,12 +1123,12 @@ declare module OpenLayers { /** * Returns whether the bounds object contains the given . */ - containsLonLat(ll: LonLat, options: BoundsOptions); + containsLonLat(ll: LonLat, options: BoundsOptions): boolean; /** * Returns whether the bounds object contains the given . */ - containsLonLat(ll: Object, options: BoundsOptions); + containsLonLat(ll: Object, options: BoundsOptions): boolean; /** * Returns whether the bounds object contains the given . @@ -1666,7 +1666,7 @@ declare module OpenLayers { * Parameters: * options - {Object} Hashtable of options to tag to the map */ - setOptions(options: {}); + setOptions(options: {}): void; /** * APIMethod: getTileSize @@ -1927,7 +1927,7 @@ declare module OpenLayers { * Parameters: * newBaseLayer - {} */ - setBaseLayer(newBaseLayer): void; + setBaseLayer(newBaseLayer: Layer): void; /** * APIMethod: addControl @@ -1938,7 +1938,7 @@ declare module OpenLayers { * control - {} * px - {} */ - addControl(control: Control, px: Pixel); + addControl(control: Control, px: Pixel): void; /** * APIMethod: addControls @@ -1996,7 +1996,7 @@ declare module OpenLayers { * popup - {} * exclusive - {Boolean} If true, closes all other popups first */ - addPopup(popup: Popup, exclusive: boolean); + addPopup(popup: Popup, exclusive: boolean): void; /** * APIMethod: removePopup @@ -2772,12 +2772,12 @@ declare module OpenLayers { * Recalculate the bounds by iterating through the components and * calling calling extendBounds() on each item. */ - calculateBounds(); + calculateBounds(): void; /** * Add components to this geometry. */ - addComponents(components: Geometry[]); + addComponents(components: Geometry[]): void; /** * Add a new component (geometry) to the collection. If this.componentTypes @@ -2833,7 +2833,7 @@ declare module OpenLayers { /** * Rotate a geometry around some origin */ - rotate(angle: number, origin: Point); + rotate(angle: number, origin: Point): void; /** * Resize a geometry relative to some origin. Use this method to apply @@ -2909,7 +2909,7 @@ declare module OpenLayers { /** * Rotate a point around another. */ - rotate(angle: number, origin: Point); + rotate(angle: number, origin: Point): void; /** * Resize a point relative to some origin. For points, this has the effect of scaling a vector (from the origin to the point). This method is more useful on geometry collection subclasses. From 351747995ddcaad80e007f3eaf0536f1bfc6a5e6 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 1 Nov 2013 15:37:25 +0000 Subject: [PATCH 148/150] Modernizr: added autofocus support --- modernizr/modernizr-tests.ts | 4 ++++ modernizr/modernizr.d.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/modernizr/modernizr-tests.ts b/modernizr/modernizr-tests.ts index abb1752934..86355a3100 100644 --- a/modernizr/modernizr-tests.ts +++ b/modernizr/modernizr-tests.ts @@ -47,4 +47,8 @@ $(function () { var elem; Modernizr.hasEvent('gesturestart', elem); + + if (!Modernizr.autofocus) { + $("[autofocus]").focus(); + } }); diff --git a/modernizr/modernizr.d.ts b/modernizr/modernizr.d.ts index fd8f5291f6..ae02c0113a 100644 --- a/modernizr/modernizr.d.ts +++ b/modernizr/modernizr.d.ts @@ -47,6 +47,7 @@ interface InputTypesboolean { } interface ModernizrStatic { + autofocus: boolean; fontface: boolean; backgroundsize: boolean; borderimage: boolean; From 4157d2bf007bfe91ee61d179f7230a0a60f478b0 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswamy Date: Fri, 1 Nov 2013 14:56:56 -0400 Subject: [PATCH 149/150] type directive factory with Function type - the existing type fails with the stricter 0.9.5 compiler --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index f396593ef5..137f72fe15 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -94,7 +94,7 @@ declare module ng { controller(name: string, controllerConstructor: Function): IModule; controller(name: string, inlineAnnotadedConstructor: any[]): IModule; controller(object : Object): IModule; - directive(name: string, directiveFactory: (...params:any[])=> IDirective): IModule; + directive(name: string, directiveFactory: Function): IModule; directive(name: string, inlineAnnotadedFunction: any[]): IModule; directive(object: Object): IModule; factory(name: string, serviceFactoryFunction: Function): IModule; From e47fd7152b42c6d49311dff020d796533571c171 Mon Sep 17 00:00:00 2001 From: Ashwin Ramaswamy Date: Fri, 1 Nov 2013 16:33:04 -0400 Subject: [PATCH 150/150] mocha's run callback is optional --- mocha/mocha.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mocha/mocha.d.ts b/mocha/mocha.d.ts index cd4a06e464..5ea4237fc6 100644 --- a/mocha/mocha.d.ts +++ b/mocha/mocha.d.ts @@ -8,7 +8,7 @@ interface Mocha { setup(options: MochaSetupOptions): Mocha; //Run tests and invoke `fn()` when complete. - run(callback: () => void): void; + run(callback?: () => void): void; // Set reporter as function reporter(reporter: () => void): Mocha;