feat(ivy): provide groundwork for animations in core (#25234)

PR Close #25234
This commit is contained in:
Matias Niemelä
2018-08-28 16:49:52 -07:00
committed by Kara Erickson
parent a880686081
commit 82a14dc107
24 changed files with 2379 additions and 267 deletions

View File

@ -11,7 +11,6 @@ import {assertEqual} from './assert';
import {LElementNode, TNode, TNodeFlags} from './interfaces/node';
import {RElement} from './interfaces/renderer';
import {CONTEXT, DIRECTIVES, HEADER_OFFSET, LViewData, TVIEW} from './interfaces/view';
import {readElementValue} from './util';
/**
* This property will be monkey-patched on elements, components and directives
@ -401,3 +400,7 @@ function getDirectiveEndIndex(tNode: TNode, startIndex: number): number {
const count = tNode.flags & TNodeFlags.DirectiveCountMask;
return count ? (startIndex + count) : -1;
}
export function readElementValue(value: LElementNode | any[]): LElementNode {
return (Array.isArray(value) ? (value as any as any[])[0] : value) as LElementNode;
}