title: Attempting to use country-data-list js lib in typescript
body: <p>I'm attempting to make use of <a href="https://www.npmjs.com/package/country-data-list" rel="nofollow noreferrer">this</a> lib in typescript.</p>
  
  <p>Example:</p>
  
  <pre><code>import { countries } from 'country-data-list';
  
  class TestClass {
  
    test(): void {
      console.log(countries.all);
    }
  
  }
  </code></pre>
  
  <p>First of all I'm getting the problem that there is no d.ts file for the project so I'm getting an error on line 1 </p>
  
  <blockquote>
    <p>"Could not find declaration file for module 'country-data-list'."</p>
  </blockquote>
  
  <p>in order to mitigate this I define a file '<strong>country-data-list.d.ts</strong>' with the following content:</p>
  
  <pre><code>declare module 'country-data-list' {
  
    const countries: any;
  
    export {
      countries
    };
  
  }
  </code></pre>
  
  <p>This fixes the declaration error but countries ref. is undefined in my code. Any suggestions as to why this does not work?</p>