interface Promise { as(b: B): Promise; tap(f: (t: T) => void): Promise; flatTap(f: (t: T) => Promise): Promise; tapError(e: (e: any) => void): Promise; flatTapError(e: (e: any) => Promise): Promise; }