Skip to content

Commit

Permalink
fix(core): More precise return type for InjectableDecorator (angula…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery authored and IgorMinar committed Dec 5, 2018
1 parent faca8b1 commit 4b9948c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/di/injectable.ts
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/core/core.d.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 4b9948c

Please sign in to comment.