Skip to content

Commit 660f214

Browse files
committed
fix(@angular-devkit/core): remove deprecated isObservable function
BREAKING CHANGE: Deprecated `isObservable` function removed. As an alternative, use `isObservable` from the `rxjs` package. NOTE: This change does not affect application development.
1 parent f9d5960 commit 660f214

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

etc/api/angular_devkit/core/src/_golden-api.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ export declare function isJsonArray(value: JsonValue): value is JsonArray;
308308

309309
export declare function isJsonObject(value: JsonValue): value is JsonObject;
310310

311-
export declare function isObservable(obj: any | Observable<any>): obj is Observable<any>;
312-
313311
export declare function isPromise(obj: any): obj is Promise<any>;
314312

315313
export declare function join(p1: Path, ...others: string[]): Path;

packages/angular_devkit/core/src/utils/lang.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
// Borrowed from @angular/core
9-
import { Observable } from 'rxjs';
109

1110
/**
1211
* Determine if the argument is shaped like a Promise
@@ -17,20 +16,3 @@ export function isPromise(obj: any): obj is Promise<any> {
1716
// It's up to the caller to ensure that obj.then conforms to the spec
1817
return !!obj && typeof obj.then === 'function';
1918
}
20-
21-
/**
22-
* Determine if the argument is an Observable
23-
* @deprecated as of 8.0; use rxjs' built-in version
24-
*/
25-
// tslint:disable-next-line:no-any
26-
export function isObservable(obj: any | Observable<any>): obj is Observable<any> {
27-
if (!obj || typeof obj !== 'object') {
28-
return false;
29-
}
30-
31-
if (Symbol.observable && Symbol.observable in obj) {
32-
return true;
33-
}
34-
35-
return typeof obj.subscribe === 'function';
36-
}

0 commit comments

Comments
 (0)