title: How to get rid of $injector type errors in TypeScript?
body: <p>I have the following in my AngularJS Code:</p>
  
  <pre><code>this.$injector.get('$state').current.name !== 'login'
  </code></pre>
  
  <p>However, it throws me an error of:</p>
  
  <blockquote>
    <p>error TS2339: Property 'current' does not exist on type '{}'.</p>
  </blockquote>
  
  <p>Do you have any idea how to fix this issue?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've tried this:</p>
  
  <pre><code>export namespace NewInjector extends angular.auto.IInjectorService {
      current: any;
  };
  </code></pre>
  
  <p>without any success.</p>