How to include untyped node modules with Typescript 1.8? : <blockquote>
  <p>Typescript 1.8 now supports untyped JS files. To enable this feature,
  just add the compiler flag --allowJs or add "allowJs": true to
  compilerOptions in tsconfig.json</p>
</blockquote>

<p>via <a href="https://blogs.msdn.microsoft.com/typescript/2016/01/28/announcing-typescript-1-8-beta/">https://blogs.msdn.microsoft.com/typescript/2016/01/28/announcing-typescript-1-8-beta/</a></p>

<p>I'm trying to import <a href="https://github.com/zilverline/react-tap-event-plugin">react-tap-event-plugin</a> which does not have a typings file.</p>

<pre><code>import * as injectTapEventPlugin from 'injectTapEventPlugin'; 
</code></pre>

<p>says module not found. So i tried:</p>

<pre><code>import * as injectTapEventPlugin from '../node_modules/react-tap-event-plugin/src/injectTapEventPlugin.js';
</code></pre>

<p>This says Module resolves to a non-module entity and cannot be imported using this construct. And then I tried:</p>

<pre><code>import injectTapEventPlugin = require('../node_modules/react-tap-event-plugin/src/injectTapEventPlugin.js');
</code></pre>

<p>It's crashing with <code>ERROR in ./scripts/index.tsx
Module build failed: TypeError: Cannot read property 'kind' of undefined</code> at <code>node_modules/typescript/lib/typescript.js:39567</code></p>

<p>My tsconfig:</p>

<pre><code>{
  "compilerOptions": {
  "target": "ES5",
  "removeComments": true,
  "jsx": "react",
  "module": "commonjs",
  "sourceMap": true,
  "allowJs": true
  },
  "exclude": [
    "node_modules"
  ]
}
</code></pre>

<p>I'm using webpack with ts-loader:</p>

<pre><code> {
   test: /\.tsx?$/,
   exclude: ['node_modules', 'tests'],
   loader: 'ts-loader'
 }
</code></pre>
