Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ErrorObservable): clarify an error type E for ErrorObservable. #2071

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/observable/ErrorObservable.ts
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