refactor(compiler): improve types, misc

This commit is contained in:
Victor Berchet
2016-10-07 17:36:08 -07:00
committed by Tobias Bosch
parent 79e1c7b807
commit bdcf46f82e
26 changed files with 115 additions and 119 deletions

View File

@ -61,7 +61,9 @@ class _AnimationBuilder implements AnimationAstVisitor {
}
ast.styles.forEach(entry => {
stylesArr.push(o.literalMap(Object.keys(entry).map(key => [key, o.literal(entry[key])])));
const entries =
Object.keys(entry).map((key): [string, o.Expression] => [key, o.literal(entry[key])]);
stylesArr.push(o.literalMap(entries));
});
return o.importExpr(resolveIdentifier(Identifiers.AnimationStyles)).instantiate([