Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions etc/api/angular_devkit/core/src/_golden-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ export declare function isJsonArray(value: JsonValue): value is JsonArray;

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

export declare function isObservable(obj: any | Observable<any>): obj is Observable<any>;

export declare function isPromise(obj: any): obj is Promise<any>;

export declare function join(p1: Path, ...others: string[]): Path;
Expand Down
18 changes: 0 additions & 18 deletions packages/angular_devkit/core/src/utils/lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
// Borrowed from @angular/core
import { Observable } from 'rxjs';

/**
* Determine if the argument is shaped like a Promise
Expand All @@ -17,20 +16,3 @@ export function isPromise(obj: any): obj is Promise<any> {
// It's up to the caller to ensure that obj.then conforms to the spec
return !!obj && typeof obj.then === 'function';
}

/**
* Determine if the argument is an Observable
* @deprecated as of 8.0; use rxjs' built-in version
*/
// tslint:disable-next-line:no-any
export function isObservable(obj: any | Observable<any>): obj is Observable<any> {
if (!obj || typeof obj !== 'object') {
return false;
}

if (Symbol.observable && Symbol.observable in obj) {
return true;
}

return typeof obj.subscribe === 'function';
}