refactor(core): unify setPreviousOrParentTNode and setIsParent into single setPreviousOrParentTNode (#30453)

PR Close #30453
This commit is contained in:
Misko Hevery
2019-05-14 21:47:11 -07:00
committed by Jason Aden
parent e122b44269
commit 2f336f15be
12 changed files with 48 additions and 57 deletions

View File

@ -303,8 +303,9 @@ export function getPreviousOrParentTNode(): TNode {
return previousOrParentTNode;
}
export function setPreviousOrParentTNode(tNode: TNode) {
export function setPreviousOrParentTNode(tNode: TNode, _isParent: boolean) {
previousOrParentTNode = tNode;
isParent = _isParent;
}
export function setTNodeAndViewData(tNode: TNode, view: LView) {
@ -325,8 +326,11 @@ export function getIsParent(): boolean {
return isParent;
}
export function setIsParent(value: boolean): void {
isParent = value;
export function setIsNotParent(): void {
isParent = false;
}
export function setIsParent(): void {
isParent = true;
}