refactor(ivy): misc cleanup (#25369)

PR Close #25369
This commit is contained in:
Victor Berchet
2018-08-06 14:07:42 -07:00
committed by Ben Lesh
parent ecb5dc03f9
commit 85106375ac
12 changed files with 23 additions and 19 deletions

View File

@ -123,7 +123,6 @@ export function renderComponent<T>(
// Create directive instance with factory() and store at index 0 in directives array
component = baseDirectiveCreate(0, componentDef.factory() as T, componentDef);
rootContext.components.push(component);
(elementNode.data as LViewData)[CONTEXT] = component;
initChangeDetectorIfExisting(elementNode.nodeInjector, component, elementNode.data !);

View File

@ -16,7 +16,6 @@ import {Type} from '../type';
import {BaseDef, ComponentDefFeature, ComponentDefInternal, ComponentQuery, ComponentTemplate, ComponentType, DirectiveDefFeature, DirectiveDefInternal, DirectiveType, DirectiveTypesOrFactory, PipeDefInternal, PipeType, PipeTypesOrFactory} from './interfaces/definition';
import {CssSelectorList, SelectorFlags} from './interfaces/projection';
const EMPTY: {} = {};
const EMPTY_ARRAY: any[] = [];
if (typeof ngDevMode !== 'undefined' && ngDevMode) {

View File

@ -15,7 +15,6 @@
* it will be easy to implement such API.
*/
import {ViewEncapsulation} from '../../metadata/view';
import {RendererStyleFlags2, RendererType2} from '../../render/api';

View File

@ -104,7 +104,7 @@ export function patchComponentDefWithScope<C, M>(
* on modules with components that have not fully compiled yet, but the result should not be used
* until they have.
*/
export function transitiveScopesFor<T>(moduleType: Type<T>): NgModuleTransitiveScopes {
function transitiveScopesFor<T>(moduleType: Type<T>): NgModuleTransitiveScopes {
if (!isNgModule(moduleType)) {
throw new Error(`${moduleType.name} does not have an ngModuleDef`);
}
@ -139,7 +139,7 @@ export function transitiveScopesFor<T>(moduleType: Type<T>): NgModuleTransitiveS
});
def.imports.forEach(<I>(imported: Type<I>) => {
let importedTyped = imported as Type<I>& {
const importedTyped = imported as Type<I>& {
// If imported is an @NgModule:
ngModuleDef?: NgModuleDefInternal<I>;
};