title: How to import typeahead when working with typescript and webpack
body: <p>I ran <code>npm install typeahead</code> and <code>npm install @types/typeahead</code>, however I am 
  having trouble with importing <code>typeahead</code> into my <code>tsx</code> module:</p>
  
  <pre><code>import * as React from "react";
  import "typeahead";
  
  interface IReactTypeaheadInputProps {
      id: string,
      name: string,
      url: string,
      searchField: string,
  }
  
  export class ReactTypeaheadInput extends React.Component&lt;IReactTypeaheadInputProps, {}&gt;{
  
      componentDidMount(): void {
          .
          .
          .
          $("#" + this.props.id).typeahead&lt;string&gt;(typeaheadOptions, datasets);
      }
  
      render() {
          return (
              &lt;input id={this.props.id} name={this.props.name}/&gt;
          );
      }
  }
  </code></pre>
  
  <p>I've tried:</p>
  
  <ul>
  <li>various styles of import statements</li>
  <li><p>adding an alias to my webpack.config.js file, like this:</p>
  
  <p>resolve: {
      alias: {
          typeahead: 'typeahead.js'
      }
  }</p></li>
  </ul>
  
  <p>When I use <code>import "typeahead"</code>, I get</p>
  
  <blockquote>
    <p>Uncaught TypeError: $(...).typeahead is not a function</p>
  </blockquote>
  
  <p>When I use <code>import * as typeahead from "typeahead";</code>, I get </p>
  
  <blockquote>
    <p>Uncaught Error: Cannot find module "typeahead"</p>
  </blockquote>
  
  <p>I am getting intellisense for the whole <code>Twitter.Typeahead</code> namespace (I'm using VS 2017). However I suspect that the npm typeahead package is not official because it is an older version and the name of the file is <code>typeahead.js</code> instead of <code>index.js</code> in the <code>node_modules</code> folder.</p>
  
  <p>I've tried to include the newer version manually but I get the same results.</p>