2
0
mirror of synced 2025-01-11 22:54:12 +00:00

Merge pull request #1002 from sibelius/patch-2

feat(flow): prefer string over String
This commit is contained in:
Michael Diarmid 2018-04-21 16:37:57 +01:00 committed by GitHub
commit dd7d961b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ type OnMessageObserver = {
next: OnMessage, next: OnMessage,
}; };
type OnTokenRefresh = String => any; type OnTokenRefresh = string => any;
type OnTokenRefreshObserver = { type OnTokenRefreshObserver = {
next: OnTokenRefresh, next: OnTokenRefresh,
@ -101,7 +101,7 @@ export default class Messaging extends ModuleBase {
onTokenRefresh( onTokenRefresh(
nextOrObserver: OnTokenRefresh | OnTokenRefreshObserver nextOrObserver: OnTokenRefresh | OnTokenRefreshObserver
): () => any { ): () => any {
let listener: String => any; let listener: string => any;
if (isFunction(nextOrObserver)) { if (isFunction(nextOrObserver)) {
// $FlowExpectedError: Not coping with the overloaded method signature // $FlowExpectedError: Not coping with the overloaded method signature
listener = nextOrObserver; listener = nextOrObserver;