refactor(ivy): correct typings in instantiateAllDirectives (#33322)

PR Close #33322
This commit is contained in:
Pawel Kozlowski
2019-10-18 16:22:44 +02:00
committed by atscott
parent 1d141a8ab1
commit 3ff712a0f5
5 changed files with 21 additions and 16 deletions

View File

@ -10,7 +10,7 @@ import {InjectionToken} from '../../di/injection_token';
import {InjectFlags} from '../../di/interface/injector';
import {Type} from '../../interface/type';
import {TElementNode} from './node';
import {TDirectiveHostNode} from './node';
import {LView, TData} from './view';
export const TNODE = 8;
@ -230,7 +230,7 @@ export class NodeInjectorFactory {
/**
* The TNode of the same element injector.
*/
tNode: TElementNode) => any,
tNode: TDirectiveHostNode) => any,
/**
* Set to `true` if the token is declared in `viewProviders` (or if it is component).
*/

View File

@ -602,6 +602,11 @@ export interface TProjectionNode extends TNode {
projection: number;
}
/**
* An union type representing all TNode types that can host a directive.
*/
export type TDirectiveHostNode = TElementNode | TContainerNode | TElementContainerNode;
/**
* This mapping is necessary so we can set input properties and output listeners
* properly at runtime when property names are minified or aliased.