Code coverage report for src/util/isPromise.ts

Statements: 100% (3 / 3)      Branches: 100% (3 / 3)      Functions: 100% (1 / 1)      Lines: 100% (2 / 2)      Ignored: none     

All files » src/util/ » isPromise.ts
1 2 3 41 140    
export function isPromise<T>(value: any | Promise<T>): value is Promise<T> {
  return value && typeof (<any>value).subscribe !== 'function' && typeof (value as any).then === 'function';
}