feat(ivy): introduce "allocHostVars" instruction as a replacement for "hostVars" field (FW-692) (#27299)
PR Close #27299
This commit is contained in:

committed by
Igor Minar

parent
0df914e1e9
commit
a088b8c203
@ -8,6 +8,7 @@
|
||||
|
||||
import {assertDefined} from './assert';
|
||||
import {executeHooks} from './hooks';
|
||||
import {ComponentDef, DirectiveDef} from './interfaces/definition';
|
||||
import {TElementNode, TNode, TNodeFlags, TViewNode} from './interfaces/node';
|
||||
import {LQueries} from './interfaces/query';
|
||||
import {BINDING_INDEX, CONTEXT, DECLARATION_VIEW, FLAGS, HOST_NODE, LView, LViewFlags, OpaqueViewState, QUERIES, TVIEW} from './interfaces/view';
|
||||
@ -34,6 +35,17 @@ export function decreaseElementDepthCount() {
|
||||
elementDepthCount--;
|
||||
}
|
||||
|
||||
let currentDirectiveDef: DirectiveDef<any>|ComponentDef<any>|null = null;
|
||||
|
||||
export function getCurrentDirectiveDef(): DirectiveDef<any>|ComponentDef<any>|null {
|
||||
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
||||
return currentDirectiveDef;
|
||||
}
|
||||
|
||||
export function setCurrentDirectiveDef(def: DirectiveDef<any>| ComponentDef<any>| null): void {
|
||||
currentDirectiveDef = def;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores whether directives should be matched to elements.
|
||||
*
|
||||
|
Reference in New Issue
Block a user