diff --git a/src/observable/bindCallback.ts b/src/observable/bindCallback.ts index 0a1d4543b8..9e310fd513 100644 --- a/src/observable/bindCallback.ts +++ b/src/observable/bindCallback.ts @@ -9,9 +9,75 @@ import {AsyncSubject} from '../subject/AsyncSubject'; export class BoundCallbackObservable extends Observable { subject: AsyncSubject; + static create(callbackFunc: (callback: (result: TResult) => any) => any ): () => Observable; + static create(callbackFunc: (v1: T, callback: (result: TResult) => any) => any ): (v1: T) => Observable; + static create(callbackFunc: (v1: T, v2: T2, callback: (result: TResult) => any) => any ): (v1: T, v2: T2) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, + callback: (result: TResult) => any) => any ): (v1: T, v2: T2, v3: T3) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, + callback: (result: TResult) => any) => any ): (v1: T, v2: T2, v3: T3, v4: T4) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, + callback: (result: TResult) => any) => any ): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, + callback: (result: TResult) => any) => any ): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => Observable; + static create(callbackFunc: (v1: T, callback: (result: TResult) => any) => any, + selector: void, + scheduler: Scheduler): (v1: T) => Observable; + static create(callbackFunc: (v1: T, v2: T2, callback: (result: TResult) => any) => any, + selector: void, + scheduler: Scheduler): (v1: T, v2: T2) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, callback: (result: TResult) => any) => any, + selector: void, + scheduler: Scheduler): (v1: T, v2: T2, v3: T3) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, callback: (result: TResult) => any) => any, + selector: void, + scheduler: Scheduler): (v1: T, v2: T2, v3: T3, v4: T4) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, callback: (result: TResult) => any) => any, + selector: void, + scheduler: Scheduler): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, + callback: (result: TResult) => any) => any, + selector: void, + scheduler: Scheduler): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => Observable; + static create(callbackFunc: (v1: T, callback: (...args: any[]) => any) => any): (v1: T) => Observable; + static create(callbackFunc: (v1: T, callback: (...args: any[]) => any) => any): (v1: T) => Observable; + static create(callbackFunc: (v1: T, v2: T2, callback: (...args: any[]) => any) => any): (v1: T, v2: T2) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, + callback: (...args: any[]) => any) => any): (v1: T, v2: T2, v3: T3) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, + callback: (...args: any[]) => any) => any): (v1: T, v2: T2, v3: T3, v4: T4) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, + callback: (...args: any[]) => any) => any): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, + callback: (...args: any[]) => any) => any): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => Observable; + static create(callbackFunc: (callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): () => Observable; + static create(callbackFunc: (v1: T, callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): (v1: T) => Observable; + static create(callbackFunc: (v1: T, v2: T2, callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): (v1: T, v2: T2) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): (v1: T, v2: T2, v3: T3) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): (v1: T, v2: T2, v3: T3, v4: T4) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => Observable; + static create(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, + callback: (...args: any[]) => any) => any, + selector: (...args: any[]) => TResult, + scheduler?: Scheduler): (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => Observable; + static create(callbackFunc: Function): (...args: any[]) => Observable; + static create(callbackFunc: Function, selector: void, scheduler: Scheduler): (...args: any[]) => Observable; + static create(callbackFunc: Function, selector?: (...args: any[]) => T, scheduler?: Scheduler): (...args: any[]) => Observable; static create(callbackFunc: Function, selector: Function = undefined, - scheduler?: Scheduler): Function { + scheduler?: Scheduler): (...args: any[]) => Observable { return (...args): Observable => { return new BoundCallbackObservable(callbackFunc, selector, args, scheduler); };