title: get is deprecated: from v4.0.0 use Type<T> or InjectionToken<T>
body: <p>After switching to Angular 5.2.3, and running <code>ng cli</code> with a linter rule of <code>"deprecation": true</code> i get the following error in many of my tests:</p>
  
  <pre><code>get is deprecated: from v4.0.0 use Type&lt;T&gt; or InjectionToken&lt;T&gt;
  </code></pre>
  
  <p>The line that complains is something like</p>
  
  <pre><code>fixture.debugElement.injector.get(MyService)
  </code></pre>
  
  <p>with <code>MyService</code> being a class used for dependency injection.</p>
  
  <p>I am at a loss to guess what the new syntax is supposed to be, as</p>
  
  <pre><code>fixture.debugElement.injector.get&lt;MyService&gt;(MyService)
  </code></pre>
  
  <p>gives a compile error that <code>Argument of type 'typeof MyService' is not assignable to parameter of type 'Type&lt;MyService&gt; | InjectionToken&lt;MyService&gt;'.</code></p>
  
  <p>What is the correct way to use the injector to avoid deprecation errors?</p>
  
  <p>Edit: See answer below, for Angular9 update.</p>
  
  <p>Edit: It seems to be related to MyService being an abstract class. If I use a non-abstract class, the <code>.get&lt;T&gt;(T)</code> syntax works. </p>
  
  <p>Edit: Fix is apparently pending some PR work - <a href="https://github.com/angular/angular/pull/25222" rel="noreferrer">https://github.com/angular/angular/pull/25222</a></p>