Fix eslint warnings and errors

This commit is contained in:
uwap 2018-06-26 15:12:38 +02:00
parent 0a0af1cbf3
commit 24ab3990ad
7 changed files with 141 additions and 168 deletions

View file

@ -1,8 +1,8 @@
// @flow
import type { TopicType } from "config/flowtypes";
export const string: TopicType = msg => msg.toString();
export const string: TopicType = (msg) => msg.toString();
export const json = (path: string, innerType?: TopicType): TopicType => {
const parseAgain = innerType == null ? x => x : innerType;
return msg => parseAgain(JSON.parse(msg.toString())[path]);
const parseAgain = innerType == null ? (x) => x : innerType;
return (msg) => parseAgain(JSON.parse(msg.toString())[path]);
};