
committed by
Igor Minar

parent
d80e9304c6
commit
628303d2cb
@ -42,6 +42,9 @@ export const enum TNodeFlags {
|
||||
/** How far to shift the flags to get the number of directives on this node */
|
||||
SIZE_SHIFT = 1,
|
||||
|
||||
/** The amount to add to flags to increment size when each directive is added */
|
||||
SIZE_SKIP = 2,
|
||||
|
||||
/** Mask to get the number of directives on this node */
|
||||
SIZE_MASK = 0b00000000000000000001111111111110
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {LContainer} from './container';
|
||||
import {ComponentTemplate, DirectiveDefList, PipeDef, PipeDefList} from './definition';
|
||||
import {ComponentTemplate, DirectiveDef, DirectiveDefList, PipeDef, PipeDefList} from './definition';
|
||||
import {LElementNode, LViewNode, TNode} from './node';
|
||||
import {LQueries} from './query';
|
||||
import {Renderer3} from './renderer';
|
||||
@ -225,6 +225,24 @@ export interface TView {
|
||||
/** Static data equivalent of LView.data[]. Contains TNodes. */
|
||||
data: TData;
|
||||
|
||||
/**
|
||||
* Selector matches for a node are temporarily cached on the TView so the
|
||||
* DI system can eagerly instantiate directives on the same node if they are
|
||||
* created out of order. They are overwritten after each node.
|
||||
*
|
||||
* <div dirA dirB></div>
|
||||
*
|
||||
* e.g. DirA injects DirB, but DirA is created first. DI should instantiate
|
||||
* DirB when it finds that it's on the same node, but not yet created.
|
||||
*
|
||||
* Even indices: Directive defs
|
||||
* Odd indices:
|
||||
* - Null if the associated directive hasn't been instantiated yet
|
||||
* - Directive index, if associated directive has been created
|
||||
* - String, temporary 'CIRCULAR' token set while dependencies are being resolved
|
||||
*/
|
||||
currentMatches: CurrentMatchesList|null;
|
||||
|
||||
/**
|
||||
* Directive and component defs that have already been matched to nodes on
|
||||
* this view.
|
||||
@ -397,6 +415,9 @@ export const enum LifecycleStage {
|
||||
*/
|
||||
export type TData = (TNode | PipeDef<any>| null)[];
|
||||
|
||||
/** Type for TView.currentMatches */
|
||||
export type CurrentMatchesList = [DirectiveDef<any>, (string | number | null)];
|
||||
|
||||
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
||||
// failure based on types.
|
||||
export const unusedValueExportToPlacateAjd = 1;
|
||||
|
Reference in New Issue
Block a user