Skip to content

Commit

Permalink
fix(ErrorObservable): Add generic error type for ErrorObservable. (#2071
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tetsuharuohzeki authored and benlesh committed Nov 5, 2016
1 parent 65ebf18 commit 9df86ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/observable/ErrorObservable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface DispatchArg {
* @extends {Ignored}
* @hide true
*/
export class ErrorObservable extends Observable<any> {
export class ErrorObservable<T> extends Observable<any> {

/**
* Creates an Observable that emits no items to the Observer and immediately
Expand Down Expand Up @@ -54,7 +54,7 @@ export class ErrorObservable extends Observable<any> {
* @name throw
* @owner Observable
*/
static create<T>(error: any, scheduler?: Scheduler) {
static create<T>(error: T, scheduler?: Scheduler): ErrorObservable<T> {
return new ErrorObservable(error, scheduler);
}

Expand All @@ -63,7 +63,7 @@ export class ErrorObservable extends Observable<any> {
subscriber.error(error);
}

constructor(public error: any, private scheduler?: Scheduler) {
constructor(public error: T, private scheduler?: Scheduler) {
super();
}

Expand Down

0 comments on commit 9df86ba

Please sign in to comment.