title: Bunyan Logger typescript configuration Errror named logger cannot be named
body: <p>I am trying to configure my Bunyan Logger for NodeJS project. This configuration was working fine, until I started to convert my project to Typescript.</p>
  
  <p>Here is the configuration function for configuring my loggers in the file MyLogger.ts:</p>
  
  <pre><code>import { createWriteStream } from 'fs'
  import { stdSerializers, createLogger } from 'bunyan'
  const pkg = require('../../package.json')
  
  export default function (logLevel: string = 'debug', logFolder: string) {
    const logOptions = {
      serializers: stdSerializers,
      name: `${pkg.name}-${pkg.version}`,
      streams: [
        { level: 'error', stream: process.stderr },
        { level: logLevel, stream: process.stdout }
      ]
    }
  
    if (logFolder) {
      logOptions.streams.push(
        { level: logLevel, stream: createWriteStream(`${logFolder}/${pkg.name}.log`) })
    }
  
    const logger = createLogger ({
      name: logOptions.name,
      streams: logOptions.streams
    })
  
    return logger
  }
  </code></pre>
  
  <p>now when I compile the typescript, I get the following error:</p>
  
  <blockquote>
    <p>lib/config/MyLogger.ts(5,1): error TS4058: Return type of exported
    function has or is using name 'Logger' from external module
    "project-folder/node_modules/@types/bunyan/index"
    but cannot be named.</p>
  </blockquote>
  
  <p>I am using node version: 6.9.2
  Bunyan version: 1.8.5
  @types/bunyan": "0.0.35</p>
  
  <p>Any help understanding the error or how to solve this.. would be great.
  Thanks.</p>