Merge branch 'master' into switch-0.9.5

Conflicts:
	sencha_touch/SenchaTouch.d.ts
This commit is contained in:
Masahiro Wakame
2013-12-24 12:24:02 +09:00
11 changed files with 48954 additions and 2466 deletions
+2 -1
View File
@@ -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.
@@ -232,6 +232,7 @@ List of Definitions
* [TweenJS](http://www.createjs.com/#!/TweenJS) (by [Pedro Ferreira](https://bitbucket.org/drk4))
* [tween.js](https://github.com/sole/tween.js/) (by [Adam R. Smith](https://github.com/sunetos))
* [twitter-bootstrap-wizard](https://github.com/VinceG/twitter-bootstrap-wizard) (by [Blake Niemyjski](https://github.com/niemyjski))
* [Twitter Typeahead](http://twitter.github.io/typeahead.js) (by [Ivaylo Gochkov](https://github.com/igochkov))
* [Ubuntu Unity Web API](https://launchpad.net/libunity-webapps) (by [John Vrbanac](https://github.com/jmvrbanac))
* [Underscore.js](http://underscorejs.org/) (by [Boris Yankov](https://github.com/borisyankov))
* [Underscore.js (Typed)](http://underscorejs.org/) (by [Josh Baldwin](https://github.com/jbaldwin/))
+1 -1
View File
@@ -157,7 +157,7 @@ declare module JQueryUI {
setDefaults(defaults: DatepickerOptions): void;
formatDate(format: string, date: Date, settings?: DatepickerFormatDateOptions): string;
parseDate(format: string, date: string, settings?: DatepickerFormatDateOptions): Date;
iso8601Week(date: Date): void;
iso8601Week(date: Date): number;
noWeekends(): void;
}
+10 -10
View File
@@ -65,12 +65,12 @@ interface IMeteor {
* ServerConnections *
*********************/
status(): {
connected: boolean
connected: boolean;
status: string;
retryCount: number;
retryTime: number;
reason: string;
}
};
reconnect(): void;
disconnect(): void;
@@ -233,7 +233,7 @@ interface IMeteorManager {
rendered(callback: Function): void;
created(callback: Function): void;
destroyed(callback: Function): void;
events(eventMap: {[eventType: string]: Function}): void;
events(eventMap: {[eventType: string]: Function;}): void;
helpers(helpers: Object): any;
preserve(selector: Object): void;
}
@@ -284,7 +284,7 @@ interface IMeteorUser {
emails?: {
address: string;
verified: boolean;
}
};
profile?: any;
services?: any;
createdAt?: number;
@@ -312,7 +312,7 @@ interface IMeteorAccounts {
requestOfflineToken?: Object;
passwordSignupFields?: string;
});
}
};
validateNewUser(func: Function): void;
onCreateUser(func: Function): void;
createUser(options: {
@@ -324,7 +324,7 @@ interface IMeteorAccounts {
callback?: Function): void;
changePassword(oldPassword: string, newPassword: string, callback?: Function): void;
forgotPassword(options: {
email: string
email: string;
},
callback?: Function): void;
resetPassword(token: string, newPassword: string, callback?: Function): void;
@@ -339,12 +339,12 @@ interface IMeteorAccounts {
resetPassword: IMeteorEmailValues;
enrollAccount: IMeteorEmailValues;
verifyEmail: IMeteorEmailValues;
}
};
// DA: I didn't see the signature for this, but it appears in the examples
loginServiceConfiguration: {
remove(options: Object): void;
insert(options: Object): void;
}
};
}
interface IMeteorEmailValues {
@@ -373,7 +373,7 @@ interface IExternalServiceParams {
requestPermissions?: string[];
requestOfflineToken?: boolean;
forceApprovalPrompt?: boolean;
}
};
callback?: Function;
}
@@ -601,4 +601,4 @@ declare var Router: IMeteorRouter;
* Todo:
* Define "this.function" functions.
* Define the signatures of callback functions and other functions.
***/
***/
+1 -1
View File
@@ -100,7 +100,7 @@ jQuery(document).ready(function () {
// Another example: $(".royalSlider").royalSlider('goTo', 3);
// But it's recommended to get instance once if you have many calls:
var slider = $(".royalSlider").royalSlider();
var slider: RoyalSlider.RoyalSlider = $(".royalSlider").royalSlider().data('royalSlider');
slider.goTo(3); // go to slide with id
slider.next(); // next slide
+1 -1
View File
@@ -492,5 +492,5 @@ interface JQuery {
*
* @param options The options
*/
royalSlider(options?: RoyalSlider.RoyalSliderOptions): RoyalSlider.RoyalSlider;
royalSlider(options?: RoyalSlider.RoyalSliderOptions): JQuery;
}
+42741
View File
File diff suppressed because it is too large Load Diff
+5871 -2445
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1572,11 +1572,11 @@ declare module Slick {
}
export interface RefreshHints {
isFilterNarrowing: boolean;
isFilterExpanding: boolean;
isFilterUnchanged: boolean;
ignoreDiffsBefore: boolean;
ignoreDiffsAfter: boolean;
isFilterNarrowing?: boolean;
isFilterExpanding?: boolean;
isFilterUnchanged?: boolean;
ignoreDiffsBefore?: boolean;
ignoreDiffsAfter?: boolean;
}
export interface OnRowCountChangedEventData {
+3 -2
View File
@@ -55,11 +55,12 @@ interface SocketManager {
set(key: any, value: any): SocketManager;
enable(key: any): SocketManager;
disable(key: any): SocketManager;
enabled(key: any): boolean;
disabled(key: any): boolean;
enabled(key: any): boolean;
disabled(key: any): boolean;
configure(env: string, fn: Function): SocketManager;
configure(fn: Function): SocketManager;
of(nsp: string): SocketNamespace;
on(ns: string, fn: Function): SocketManager;
sockets: SocketNamespace;
}
+73
View File
@@ -0,0 +1,73 @@
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="typeahead.d.ts"/>
//
// Examples from http://twitter.github.com/typeahead.js/examples
//
declare var Hogan: any;
// Countries
// Prefetches data, stores it in localStorage, and searches it on the client
$('.example-countries .typeahead').typeahead({
name: 'countries',
prefetch: '../data/countries.json',
limit: 10
});
// Open Source Projects by Twitter
// Defines a custom template and template engine for rendering suggestions
$('.example-twitter-oss .typeahead').typeahead({
name: 'twitter-oss',
prefetch: '../data/repos.json',
template: [
'<p class="repo-language">{{language}}</p>',
'<p class="repo-name">{{name}}</p>',
'<p class="repo-description">{{description}}</p>'
].join(''),
engine: Hogan
});
// Arabic Phrases
// Hardcoded list showing Right - To - Left(RTL) support
$('.example-arabic .typeahead').typeahead({
name: 'arabic',
local: [
"الإنجليزية",
"نعم",
"لا",
"مرحبا",
"کيف الحال؟",
"أهلا",
"مع السلامة",
"لا أتكلم العربية",
"لا أفهم",
"أنا جائع"
]
});
// NBA and NHL Teams
// Two datasets that are prefetched, stored, and searched on the client
$('.example-sports .typeahead').typeahead([
{
name: 'nba-teams',
prefetch: '../data/nba.json',
header: '<h3 class="league-name">NBA Teams</h3>'
},
{
name: 'nhl-teams',
prefetch: '../data/nhl.json',
header: '<h3 class="league-name">NHL Teams</h3>'
}
]);
// Best Picture Winners
// Prefetches some data then relies on remote requests for suggestions when prefetched data is insufficient
$('.example-films .typeahead').typeahead([
{
name: 'best-picture-winners',
remote: '../data/films/queries/%QUERY.json',
prefetch: '../data/films/post_1960.json',
template: '<p><strong>{{value}}</strong> {{year}}</p>',
engine: Hogan
}
]);
+246
View File
@@ -0,0 +1,246 @@
// Type definitions for Twitter's typeahead.js 0.9.3
// Project: http://twitter.github.io/typeahead.js/
// Definitions by: Ivaylo Gochkov <https://github.com/igochkov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface JQuery {
/**
* Turns an input[type="text"] element into a typeahead.
*
* @constructor
* @param dataset Single dataset
*/
typeahead(dataset: Twitter.Typeahead.Dataset): JQuery;
/**
* Turns an input[type="text"] element into a typeahead.
*
* @constructor
* @param dataset Array of datasets
*/
typeahead(datasets: Twitter.Typeahead.Dataset[]): JQuery;
/**
* Destroys previously initialized typeaheads. This entails reverting
* DOM modifications and removing event handlers.
*
* @constructor
* @param methodName Method 'destroy'
*/
typeahead(methodName: 'destroy'): JQuery;
/**
* Sets the current query of the typeahead. This is always preferable to
* using $("input.typeahead").val(query), which will result in unexpected
* behavior. To clear the query, simply set it to an empty string.
*
* @constructor
* @param methodName Method 'setQuery'
* @param query The query to be set
*/
typeahead(methodName: 'setQuery', query: string): JQuery;
/**
* Accommodates the destroy and setQuery overloads.
*
* @constructor
* @param methodName Method name ('destroy' or 'setQuery')
* @param query The query to be set in case method 'setQuery' is used.
*/
typeahead(methodName: string, query: string): JQuery;
}
declare module Twitter.Typeahead {
/**
* A dataset is an object that defines a set of data that hydrates
* suggestions. Typeaheads can be backed by multiple datasets.
* Given a query, a typeahead instance will inspect its backing
* datasets and display relevant suggestions to the end-user.
*/
interface Dataset {
/**
* The string used to identify the dataset. Used by typeahead.js
* to cache intelligently.
*/
name: string;
/**
* The key used to access the value of the datum in the datum object.
* Defaults to value.
*/
valueKey?: string;
/**
* The max number of suggestions from the dataset to display
* for a given query. Defaults to 5.
*/
limit?: number;
/**
* The template used to render suggestions. Can be a string or
* a precompiled template. If not provided, suggestions will render
* as their value contained in a <p> element (i.e. <p>value</p>).
*/
template?: any;
/**
* The template engine used to compile/render template if it is a
* string. Any engine can use used as long as it adheres to the
* expected API. Required if template is a string.
*/
engine?: string;
/**
* The header rendered before suggestions in the dropdown menu.
* Can be either a DOM element or HTML.
*/
header?: any;
/**
* The footer rendered after suggestions in the dropdown menu.
* Can be either a DOM element or HTML.
*/
footer?: any;
/**
* An array of datums or strings.
*/
local?: any[];
/**
* Can be a URL to a JSON file containing an array of datums or,
* if more configurability is needed, a prefetch options object.
*/
prefetch?: any;
/**
* Can be a URL to fetch suggestions from when the data provided by
* local and prefetch is insufficient or, if more configurability is
* needed, a remote options object.
*/
remote?: any;
}
/**
* Prefetched data is fetched and processed on initialization.
* If the browser supports localStorage, the processed data will be cached
* there to prevent additional network requests on subsequent page loads.
*/
interface PrefetchOptions {
/**
* A URL to a JSON file containing an array of datums. Required.
*/
url: string;
/**
* The time (in milliseconds) the prefetched data should be cached
* in localStorage. Defaults to 86400000 (1 day).
*/
ttl?: number;
/**
* A function that transforms the response body into an array of datums.
*
* @param parsedResponse Response body
*/
filter?: (parsedResponse: any) => Datum[];
}
/**
* Remote data is only used when the data provided by local and prefetch
* is insufficient. In order to prevent an obscene number of requests
* being made to remote endpoint, typeahead.js rate-limits remote requests.
*/
interface RemoteOptions {
/**
* A URL to make requests to when the data provided by local and
* prefetch is insufficient. Required.
*/
url: string;
/**
* The type of data you're expecting from the server. Defaults to json.
* @see http://api.jquery.com/jQuery.ajax/ for more info.
*/
dataType?: string;
/**
* Determines whether or not the browser will cache responses.
* @see http://api.jquery.com/jQuery.ajax/ for more info.
*/
cache?: boolean;
/**
* Sets a timeout for requests.
* @see http://api.jquery.com/jQuery.ajax/ for more info.
*/
timeout?: number;
/**
* The pattern in url that will be replaced with the user's query
* when a request is made. Defaults to %QUERY.
*/
wildcard?: string;
/**
* Overrides the request URL. If set, no wildcard substitution will
* be performed on url.
*
* @param url Replacement URL
* @param uriEncodedQuery Encoded query
* @returns A valid URL
*/
replace?: (url: string, uriEncodedQuery: string) => string;
/**
* The function used for rate-limiting network requests.
* Can be either 'debounce' or 'throttle'. Defaults to 'debounce'.
*/
rateLimitFn?: string;
/**
* The time interval in milliseconds that will be used by rateLimitFn.
* Defaults to 300.
*/
rateLimitWait?: number;
/**
* The max number of parallel requests typeahead.js can have pending.
* Defaults to 6.
*/
maxParallelRequests?: number;
/**
* A pre-request callback. Can be used to set custom headers.
* @see http://api.jquery.com/jQuery.ajax/ for more info.
*/
beforeSend?: (jqXhr: JQueryXHR, settings: JQueryAjaxSettings) => void;
/**
* Transforms the response body into an array of datums.
*
* @param parsedResponse Response body
*/
filter?: (parsedResponse: any) => Datum[];
}
/**
* The individual units that compose datasets are called datums.
* The canonical form of a datum is an object with a value property and
* a tokens property.
*
* For ease of use, datums can also be represented as a string.
* Strings found in place of datum objects are implicitly converted
* to a datum object.
*
* When datums are rendered as suggestions, the datum object is the
* context passed to the template engine. This means if you include any
* arbitrary properties in datum objects, those properties will be
* available to the template used to render suggestions.
*/
interface Datum {
/**
* The string that represents the underlying value of the datum
*/
value: string;
/**
* A collection of single-word strings that aid typeahead.js in
* matching datums with a given query.
*/
tokens: string[];
}
}