Skip to content

Commit

Permalink
style(typings): added enhanced typings for bindCallback.create
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll committed Jan 9, 2016
1 parent 05ac8dd commit 77a7c52
Showing 1 changed file with 67 additions and 1 deletion.
68 changes: 67 additions & 1 deletion src/observable/bindCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,75 @@ import {AsyncSubject} from '../subject/AsyncSubject';
export class BoundCallbackObservable<T> extends Observable<T> {
subject: AsyncSubject<T>;

static create<TResult>(callbackFunc: (callback: (result: TResult) => any) => any ): () => Observable<TResult>;
static create<T, TResult>(callbackFunc: (v1: T, callback: (result: TResult) => any) => any ): (v1: T) => Observable<TResult>;
static create<T, T2, TResult>(callbackFunc: (v1: T, v2: T2, callback: (result: TResult) => any) => any ): (v1: T, v2: T2) => Observable<TResult>;
static create<T, T2, T3, TResult>(callbackFunc: (v1: T, v2: T2, v3: T3,
callback: (result: TResult) => any) => any ): (v1: T, v2: T2, v3: T3) => Observable<TResult>;
static create<T, T2, T3, T4, TResult>(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4,
callback: (result: TResult) => any) => any ): (v1: T, v2: T2, v3: T3, v4: T4) => Observable<TResult>;
static create<T, T2, T3, T4, T5, TResult>(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<TResult>;
static create<T, T2, T3, T4, T5, T6, TResult>(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<TResult>;
static create<T, TResult>(callbackFunc: (v1: T, callback: (result: TResult) => any) => any,
selector: void,
scheduler: Scheduler): (v1: T) => Observable<TResult>;
static create<T, T2, TResult>(callbackFunc: (v1: T, v2: T2, callback: (result: TResult) => any) => any,
selector: void,
scheduler: Scheduler): (v1: T, v2: T2) => Observable<TResult>;
static create<T, T2, T3, TResult>(callbackFunc: (v1: T, v2: T2, v3: T3, callback: (result: TResult) => any) => any,
selector: void,
scheduler: Scheduler): (v1: T, v2: T2, v3: T3) => Observable<TResult>;
static create<T, T2, T3, T4, TResult>(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<TResult>;
static create<T, T2, T3, T4, T5, TResult>(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<TResult>;
static create<T, T2, T3, T4, T5, T6, TResult>(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<TResult>;
static create<T>(callbackFunc: (v1: T, callback: (...args: any[]) => any) => any): (v1: T) => Observable<any[]>;
static create<T>(callbackFunc: (v1: T, callback: (...args: any[]) => any) => any): (v1: T) => Observable<any[]>;
static create<T, T2>(callbackFunc: (v1: T, v2: T2, callback: (...args: any[]) => any) => any): (v1: T, v2: T2) => Observable<any[]>;
static create<T, T2, T3>(callbackFunc: (v1: T, v2: T2, v3: T3,
callback: (...args: any[]) => any) => any): (v1: T, v2: T2, v3: T3) => Observable<any[]>;
static create<T, T2, T3, T4>(callbackFunc: (v1: T, v2: T2, v3: T3, v4: T4,
callback: (...args: any[]) => any) => any): (v1: T, v2: T2, v3: T3, v4: T4) => Observable<any[]>;
static create<T, T2, T3, T4, T5>(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<any[]>;
static create<T, T2, T3, T4, T5, T6>(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<any[]>;
static create<TResult>(callbackFunc: (callback: (...args: any[]) => any) => any,
selector: (...args: any[]) => TResult,
scheduler?: Scheduler): () => Observable<TResult>;
static create<T, TResult>(callbackFunc: (v1: T, callback: (...args: any[]) => any) => any,
selector: (...args: any[]) => TResult,
scheduler?: Scheduler): (v1: T) => Observable<TResult>;
static create<T, T2, TResult>(callbackFunc: (v1: T, v2: T2, callback: (...args: any[]) => any) => any,
selector: (...args: any[]) => TResult,
scheduler?: Scheduler): (v1: T, v2: T2) => Observable<TResult>;
static create<T, T2, T3, TResult>(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<TResult>;
static create<T, T2, T3, T4, TResult>(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<TResult>;
static create<T, T2, T3, T4, T5, TResult>(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<TResult>;
static create<T, T2, T3, T4, T5, T6, TResult>(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<TResult>;
static create<T>(callbackFunc: Function): (...args: any[]) => Observable<T>;
static create<T>(callbackFunc: Function, selector: void, scheduler: Scheduler): (...args: any[]) => Observable<T>;
static create<T>(callbackFunc: Function, selector?: (...args: any[]) => T, scheduler?: Scheduler): (...args: any[]) => Observable<T>;
static create<T>(callbackFunc: Function,
selector: Function = undefined,
scheduler?: Scheduler): Function {
scheduler?: Scheduler): (...args: any[]) => Observable<T> {
return (...args): Observable<T> => {
return new BoundCallbackObservable(callbackFunc, selector, args, scheduler);
};
Expand Down

0 comments on commit 77a7c52

Please sign in to comment.