import { Observable } from 'rxjs' ; export const isPromise = ( obj ) : obj is Promise < any > => ! ! obj && typeof obj . then === 'function' ; export const isObservable = ( obj ) : obj is Observable < any > => ! ! obj && typeof obj . subscribe === 'function' ;