refactor(ivy): misc cleanup (#25291)

PR Close #25291
This commit is contained in:
Victor Berchet
2018-08-03 12:30:40 -07:00
committed by Kara Erickson
parent 1e7ca22078
commit aea8832243
11 changed files with 25 additions and 54 deletions

View File

@ -22,11 +22,9 @@ import {convertDependencies, reflectDependencies} from './util';
* Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
* `ngInjectableDef` onto the injectable type.
*/
export function compileInjectable(type: Type<any>, meta?: Injectable): void {
// TODO(alxhub): handle JIT of bare @Injectable().
if (!meta) {
return;
}
export function compileInjectable(type: Type<any>, srcMeta?: Injectable): void {
// Allow the compilation of a class with a `@Injectable()` decorator without parameters
const meta: Injectable = srcMeta || {providedIn: null};
let def: any = null;
Object.defineProperty(type, NG_INJECTABLE_DEF, {