fix(ivy): deduplicate directives in component scopes (#27462)

A previous fix to ngtsc opened the door for duplicate directives in
the 'directives' array of a component. This would happen if the directive
was declared in a module which was imported more than once within the
component's module.

This commit adds deduplication when the component's scope is materialized,
so declarations which arrive via more than one module import are coalesced.

PR Close #27462
This commit is contained in:
Alex Rickabaugh
2018-12-04 09:42:44 -08:00
committed by Igor Minar
parent b82f62a11d
commit dfdaaf6a0d
4 changed files with 74 additions and 23 deletions

View File

@ -60,4 +60,7 @@ export function forwardRef<T>(fn: () => T): T {
return fn();
}
export interface SimpleChanges { [propName: string]: any; }
export interface SimpleChanges { [propName: string]: any; }
export type ɵNgModuleDefWithMeta<ModuleT, DeclarationsT, ImportsT, ExportsT> = any;
export type ɵDirectiveDefWithMeta<DirT, SelectorT, ExportAsT, InputsT, OutputsT, QueriesT> = any;