MCPcopy Index your code
hub / github.com/rx-angular/rx-angular / isPromiseGuard

Function isPromiseGuard

libs/state/selections/src/lib/utils/guards.ts:3–10  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1import { OperatorFunction } from 'rxjs';
2
3export function isPromiseGuard<T>(value: unknown): value is Promise<T> {
4 return (
5 value !== null &&
6 value !== undefined &&
7 typeof (<any>value).subscribe !== 'function' &&
8 typeof (value as any).then === 'function'
9 );
10}
11
12export function isOperateFnArrayGuard<T, R = T>(
13 op: any[],

Callers 1

typing.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected