mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #1392 from Igorbek/switch-0.9.5
Switch 0.9.5: fixes in knockout, signalr, rx.js, angularjs, async
This commit is contained in:
@@ -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<any>) {
|
||||
buffer.push({
|
||||
config: config,
|
||||
deferred: deferred
|
||||
|
||||
@@ -135,7 +135,7 @@ async.waterfall([
|
||||
], function (err, result) { });
|
||||
|
||||
|
||||
var q = async.queue(function (task, callback) {
|
||||
var q = async.queue(function (task: any, callback) {
|
||||
console.log('hello ' + task.name);
|
||||
callback();
|
||||
}, 2);
|
||||
|
||||
@@ -61,8 +61,8 @@ function test_computed() {
|
||||
return '$' + this.price().toFixed(2);
|
||||
},
|
||||
write: function (value) {
|
||||
value = parseFloat(value.replace(/[^\.\d]/g, ""));
|
||||
this.price(isNaN(value) ? 0 : value);
|
||||
var num = parseFloat(value.replace(/[^\.\d]/g, ""));
|
||||
this.price(isNaN(num) ? 0 : num);
|
||||
},
|
||||
owner: this
|
||||
});
|
||||
@@ -107,7 +107,7 @@ function testGetter() {
|
||||
}
|
||||
|
||||
function test_observableArrays() {
|
||||
var myObservableArray = ko.observableArray();
|
||||
var myObservableArray = ko.observableArray<any>();
|
||||
myObservableArray.push('Some value');
|
||||
var anotherObservableArray = ko.observableArray([
|
||||
{ name: "Bungle", type: "Bear" },
|
||||
@@ -180,8 +180,6 @@ function test_bindings() {
|
||||
init: function (element, valueAccessor) {
|
||||
var value = ko.utils.unwrapObservable(valueAccessor());
|
||||
$(element).toggle(value);
|
||||
},
|
||||
update: function (element, valueAccessor, allBindingsAccessor) {
|
||||
}
|
||||
};
|
||||
ko.bindingHandlers.hasFocus = {
|
||||
|
||||
Vendored
+13
-13
@@ -42,16 +42,16 @@ declare module Rx {
|
||||
timeout(dueTime: number, other?: IObservable<T>, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
delaySubscription(dueTime: number, scheduler?: IScheduler): IObservable<T>;
|
||||
delayWithSelector(delayDurationSelector: (T) => number): IObservable<T>;
|
||||
delayWithSelector(subscriptionDelay: number, delayDurationSelector: (T) => number): IObservable<T>;
|
||||
delayWithSelector(delayDurationSelector: (item: T) => number): IObservable<T>;
|
||||
delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): IObservable<T>;
|
||||
|
||||
timeoutWithSelector<TTimeout>(firstTimeout: IObservable<TTimeout>, timeoutdurationSelector?: (T) => IObservable<TTimeout>, other?: IObservable<T>): IObservable<T>;
|
||||
throttleWithSelector<TTimeout>(throttleDurationSelector: (T) => IObservable<TTimeout>): IObservable<T>;
|
||||
timeoutWithSelector<TTimeout>(firstTimeout: IObservable<TTimeout>, timeoutdurationSelector?: (item: T) => IObservable<TTimeout>, other?: IObservable<T>): IObservable<T>;
|
||||
throttleWithSelector<TTimeout>(throttleDurationSelector: (item: T) => IObservable<TTimeout>): IObservable<T>;
|
||||
|
||||
skipLastWithTime(duration: number, scheduler?: IScheduler): IObservable<T>;
|
||||
takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
takeLastBufferWithTime(duration: number, scheduler?: IScheduler): IObservable<Array>;
|
||||
takeLastBufferWithTime(duration: number, scheduler?: IScheduler): IObservable<T[]>;
|
||||
takeWithTime(duration: number, scheduler?: IScheduler): IObservable<T>;
|
||||
skipWithTime(duration: number, scheduler?: IScheduler): IObservable<T>;
|
||||
|
||||
@@ -69,18 +69,18 @@ declare module Rx {
|
||||
|
||||
generateWithAbsoluteTime<TState, TResult>(
|
||||
initialState: TState,
|
||||
condition: (TState) => boolean,
|
||||
iterate: (TState) => TState,
|
||||
resultSelector: (TState) => TResult,
|
||||
timeSelector: (TState) => Date,
|
||||
condition: (state: TState) => boolean,
|
||||
iterate: (state: TState) => TState,
|
||||
resultSelector: (state: TState) => TResult,
|
||||
timeSelector: (state: TState) => Date,
|
||||
scheduler?: IScheduler): IObservable<TResult>;
|
||||
|
||||
generateWithRelativeTime<TState, TResult>(
|
||||
initialState: TState,
|
||||
condition: (TState) => boolean,
|
||||
iterate: (TState) => TState,
|
||||
resultSelector: (TState) => TResult,
|
||||
timeSelector: (TState) => number,
|
||||
condition: (state: TState) => boolean,
|
||||
iterate: (state: TState) => TState,
|
||||
resultSelector: (state: TState) => TResult,
|
||||
timeSelector: (state: TState) => number,
|
||||
scheduler?: IScheduler): IObservable<TResult>;
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -51,17 +51,17 @@ function test_connection() {
|
||||
}
|
||||
|
||||
interface MyHubConnection extends HubConnection {
|
||||
someState: string;
|
||||
SomeFunction: Function;
|
||||
someState: string;
|
||||
SomeFunction: Function;
|
||||
|
||||
// My Hubs Client functions:
|
||||
client: {
|
||||
addMessage: (message: string) => void;
|
||||
}
|
||||
// My Hubs Server function:
|
||||
server: {
|
||||
send(message: string);
|
||||
}
|
||||
// My Hubs Client functions:
|
||||
client: {
|
||||
addMessage: (message: string) => void;
|
||||
};
|
||||
// My Hubs Server function:
|
||||
server: {
|
||||
send(message: string);
|
||||
};
|
||||
}
|
||||
|
||||
interface SignalR {
|
||||
@@ -110,7 +110,7 @@ function test_hubs() {
|
||||
.done(function (result) {
|
||||
console.log('The result is ' + result);
|
||||
});
|
||||
proxy.on('addMessage', function (msg) {
|
||||
proxy.on('addMessage', function (msg?) {
|
||||
console.log(msg);
|
||||
});
|
||||
var connection = $.hubConnection('http://localhost:8081/');
|
||||
|
||||
Reference in New Issue
Block a user