title: Use globalDependencies (Typescript tsd files) from Angular2
body: <p>I'm trying to use typescript tsd's from DefinitelyTyped in an Angular2 project (RC.0), but global dependencies doesn't seem to load properly:</p>
  
  <pre><code>typings install --save dt~hellojs --global --save
  npm install --save hellojs
  </code></pre>
  
  <p>I've this configurations:</p>
  
  <p>typings.json:</p>
  
  <pre><code>"globalDependencies": {
    "hellojs": "registry:dt/hellojs#0.2.3+20160423145325"
  }
  </code></pre>
  
  <p>angular.cli.build.js:</p>
  
  <pre><code>module.exports = function(defaults) {
    return new Angular2App(defaults, {
      vendorNpmFiles: [
        'systemjs/dist/system-polyfills.js',
        'systemjs/dist/system.src.js',
        'zone.js/dist/**/*.+(js|js.map)',
        'es6-shim/es6-shim.js',
        'reflect-metadata/**/*.+(js|js.map)',
        'rxjs/**/*.+(js|js.map)',
        '@angular/**/*.+(js|js.map)',
        'angular2-moment/**/*.+(js|js.map)',
        'moment/**/*.+(js|js.map)',
        'hellojs/**/*.+(js|js.map)'
      ]
    });
  };
  </code></pre>
  
  <p>system-config.ts</p>
  
  <pre><code>/** Map relative paths to URLs. */
  const map: any = {
    'moment': 'vendor/moment',
    'angular2-moment': 'vendor/angular2-moment',
    'hellojs': 'vendor/hellojs/dist'
  };
  
  /** User packages configuration. */
  const packages: any = {
    'moment': { main: 'moment.js', defaultExtension: 'js' },
    'angular2-moment': { main: 'index.js', defaultExtension: 'js' },
    'hellojs': { main: 'hello.all.js' }
  };
  </code></pre>
  
  <p>but, if I use the new dependency from an angular module, like this:</p>
  
  <pre><code>import {Component} from "@angular/core";
  import {FormBuilder, ControlGroup} from "@angular/common";
  import {ROUTER_DIRECTIVES, Router} from "@angular/router";
  import {LoginResourceService} from "../shared/services/resources/login-resource.service";
  import {AuthService} from "../shared/services/auth.service";
  import {AppRoutes} from "../app-routes";
  
  @Component({
    moduleId: module.id,
    selector: 'app-login',
    templateUrl: 'login.component.html',
    directives: [ROUTER_DIRECTIVES],
    providers: [LoginResourceService],
    styleUrls: ['login.component.css']
  })
  export class LoginComponent {
  
    userForm:ControlGroup;
    errorMessage:string;
  
    constructor(formBuilder:FormBuilder, private _loginResource:LoginResourceService, public router:Router,
                private _auth:AuthService) {
      this.userForm = this.buildLoginForm(formBuilder);
    }
    // ...
    example() {
      hello.init({});
    }
  
  }
  </code></pre>
  
  <p>I'm getting compiler errors:</p>
  
  <pre><code>Error: Typescript found the following errors:
    /Users/fer2d2/dev/personal/web-projects/front-joinfinity/tmp/broccoli_type_script_compiler-input_base_path-xa8whw1k.tmp/0/src/app/+login/login.component.ts (62, 5): Cannot find name 'hello'.
  </code></pre>
  
  <p>If I try to import the module with <code>import * as hello from "hellojs"</code> or <code>import hello = require("hellojs")</code> the fail persists.</p>
  
  <p>How can I use a globalDependency from Angular2?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>With:
  <code>import {hello} from "hellojs"</code> or
  <code>import hello from "hellojs"</code> or
  <code>import hello = require("hellojs")</code></p>
  
  <p>I'm getting this error:</p>
  
  <pre><code>Error: Typescript found the following errors: /Users/fer2d2/dev/personal/web-projects/front-joinfinity/tmp/broccoli_type_scrip‌​t_compiler-input_base_path-tKuuBwei.tmp/0/src/app/+login/login.component.ts (7, 21): Cannot find module 'hellojs'.
  </code></pre>
  
  <p>It seems like Typescript or systemjs aren't loading globalDependencies tsd's propely.</p>