const { readFileSync, writeFileSync } = require('fs');

// does what typings package used to do
const main = () => {
  const typings = readFileSync('../../index.d.ts', { encoding: 'utf8' });
  const wrapped = `declare module 'react-geolocated' {
      ${typings}
      }`;
  writeFileSync('./index.d.ts', wrapped, { encoding: 'utf8' });
};

main();

const fs = require('fs');

// does what typings package used to do
const main = () => {
  const typings = fs.readFileSync('../../index.d.ts', { encoding: 'utf8' });
  const wrapped = `declare module 'react-geolocated' {
      ${typings}
      }`;
  fs.writeFileSync('./index.d.ts', wrapped, { encoding: 'utf8' });
};

main();

make the createTypings Node 4 compatible