/* @flow */
const Api = require('./api-telegram');
const { jsonStdin, readConfig } = require('./utils.js');

import type { Configuration, ReadConfiguration } from './types';

module.exports = {
  readConfig: async function(): Promise<Configuration> {
    return await readConfig(jsonStdin(), Api);
  }
};

@@ -73,16 +73,29 @@
 adConfig
+: _readConfig
  %7D = req
@@ -185,40 +185,45 @@
 ';%0A%0A
-module.exports = %7B%0A  readConfig:
+const readConfig: ReadConfiguration =
  asy
@@ -262,18 +262,16 @@
 tion%3E %7B%0A
-  
   return
@@ -277,16 +277,17 @@
 n await 
+_
 readConf
@@ -312,11 +312,43 @@
 i);%0A
-  %7D
+%7D;%0A%0Amodule.exports = %7B%0A  readConfig
 %0A%7D;%0A

add type to readConfig