File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1815,7 +1815,7 @@ export interface ServiceDecorator {
18151815 <T >(options : {
18161816 autoProvided? : true ;
18171817 factory: () => T ;
1818- }): <C extends Type <unknown >> (target : C ) => Type <T > ;
1818+ }): <C extends Type <unknown > | AbstractType < unknown >> (target : C ) => C extends Type <unknown > ? Type < T > : abstract new ( ... args : any []) => T ;
18191819 (options ? : {
18201820 autoProvided? : true ;
18211821 }): TypeDecorator ;
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.dev/license
77 */
88
9- import { Type } from '../interface/type' ;
9+ import { AbstractType , Type } from '../interface/type' ;
1010import { makeDecorator , TypeDecorator } from '../util/decorators' ;
1111import { compileService } from './jit/service' ;
1212
@@ -39,7 +39,9 @@ export interface ServiceDecorator {
3939 < T > ( options : {
4040 autoProvided ?: true ;
4141 factory : ( ) => T ;
42- } ) : < C extends Type < unknown > > ( target : C ) => Type < T > ;
42+ } ) : < C extends Type < unknown > | AbstractType < unknown > > (
43+ target : C ,
44+ ) => C extends Type < unknown > ? Type < T > : abstract new ( ...args : any [ ] ) => T ;
4345
4446 /**
4547 * Creates a service that is automatically provided.
You can’t perform that action at this time.
0 commit comments