[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 {
|
onMessage(nextOrObserver: OnMessage | OnMessageObserver): () => any {
|
||||||
let listener: RemoteMessage => any;
|
let listener: RemoteMessage => any;
|
||||||
if (isFunction(nextOrObserver)) {
|
if (isFunction(nextOrObserver)) {
|
||||||
// $FlowBug: Not coping with the overloaded method signature
|
// $FlowExpectedError: Not coping with the overloaded method signature
|
||||||
listener = nextOrObserver;
|
listener = nextOrObserver;
|
||||||
} else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
|
} else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
|
||||||
listener = nextOrObserver.next;
|
listener = nextOrObserver.next;
|
||||||
@ -96,7 +96,7 @@ export default class Messaging extends ModuleBase {
|
|||||||
): () => any {
|
): () => any {
|
||||||
let listener: String => any;
|
let listener: String => any;
|
||||||
if (isFunction(nextOrObserver)) {
|
if (isFunction(nextOrObserver)) {
|
||||||
// $FlowBug: Not coping with the overloaded method signature
|
// $FlowExpectedError: Not coping with the overloaded method signature
|
||||||
listener = nextOrObserver;
|
listener = nextOrObserver;
|
||||||
} else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
|
} else if (isObject(nextOrObserver) && isFunction(nextOrObserver.next)) {
|
||||||
listener = nextOrObserver.next;
|
listener = nextOrObserver.next;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user