[messaging] Fix a couple of flow errors

This commit is contained in:
Chris Bianca 2018-03-08 10:42:35 +00:00
parent 168f3b948e
commit 68cfd24810
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ export default class Messaging extends ModuleBase {
onMessage(nextOrObserver: OnMessage | OnMessageObserver): () => any {
let listener: RemoteMessage => any;
if (isFunction(nextOrObserver)) {
// $FlowBug: Not coping with the overloaded method signature
// $FlowExpectedError: Not coping with the overloaded method signature
listener = nextOrObserver;
} else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
listener = nextOrObserver.next;
@ -96,7 +96,7 @@ export default class Messaging extends ModuleBase {
): () => any {
let listener: String => any;
if (isFunction(nextOrObserver)) {
// $FlowBug: Not coping with the overloaded method signature
// $FlowExpectedError: Not coping with the overloaded method signature
listener = nextOrObserver;
} else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
listener = nextOrObserver.next;