fix(core): More precise return type for `InjectableDecorator` (#27360)

closes #26942

PR Close #27360
This commit is contained in:
Miško Hevery 2018-11-29 15:51:27 -08:00 committed by Igor Minar
parent faca8b1382
commit 4b9948c1be
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
import {compileInjectable as render3CompileInjectable} from '../render3/jit/injectable';
import {Type} from '../type';
import {makeDecorator} from '../util/decorators';
import {TypeDecorator, makeDecorator} from '../util/decorators';
import {InjectableDef, InjectableType, defineInjectable, getInjectableDef} from './defs';
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './provider';
@ -45,8 +45,8 @@ export interface InjectableDecorator {
* {@example core/di/ts/metadata_spec.ts region='InjectableThrows'}
*
*/
(): any;
(options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): any;
(): TypeDecorator;
(options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): TypeDecorator;
new (): Injectable;
new (options?: {providedIn: Type<any>| 'root' | null}&InjectableProvider): Injectable;
}

View File

@ -382,10 +382,10 @@ export interface Injectable {
export declare const Injectable: InjectableDecorator;
export interface InjectableDecorator {
(): any;
(): TypeDecorator;
(options?: {
providedIn: Type<any> | 'root' | null;
} & InjectableProvider): any;
} & InjectableProvider): TypeDecorator;
new (): Injectable;
new (options?: {
providedIn: Type<any> | 'root' | null;