[messaging] Fix a couple of flow errors
This commit is contained in:
parent
168f3b948e
commit
68cfd24810
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user