title: Typescript Typings in ANgular 2 library package
body: <p>Trying to build reusable Angular 2 library containing components and directives etc.. written in Typescript That can be used by other developers by NPM install. The library also has third party package dependencies that have Typescript definitions but are not written in Typescript. </p>
  
  <p>The problem I am having is that the application that is using the angular2 library must also have reference to the third party package that is a dependency of the library.</p>
  
  <p>Angular2 SPA [MyMainApp] uses a library of Angular2 components services and directives packages as an NPM package [MyLib]. MyLib uses third party NPM packages as well. Everything compiles but when I run MyMainApp I get 404 errors for the third party packages installed into MyLib. </p>
  
  <p>MyLib > npm install perfect-scrollbar</p>
  
  <p>MyMainApp > npm install MyLib</p>
  
  <p>When I run MyMainApp  i get:
  zone.js:101 GET <a href="http://localhost:3000/perfect-scrollbar" rel="nofollow">http://localhost:3000/perfect-scrollbar</a> 404 (Not Found)</p>
  
  <p>inside the directive that uses perfect-scrollbar</p>
  
  <pre><code>import { initialize, destroy } from 'perfect-scrollbar';
  </code></pre>