refactor(types): use stricter settings

fix #847
This commit is contained in:
Evan You
2020-03-23 11:08:22 -04:00
parent b3890a93e3
commit b8c1be18f3
27 changed files with 385 additions and 381 deletions

View File

@@ -1,5 +1,4 @@
import {
AttributeNode,
createSimpleExpression,
ExpressionNode,
NodeTransform,
@@ -42,7 +41,7 @@ export const transformAssetUrl: NodeTransform = (
if ((tag === '*' || node.tag === tag) && node.props.length) {
const attributes = options[tag]
attributes.forEach(item => {
node.props.forEach((attr: AttributeNode, index) => {
node.props.forEach((attr, index) => {
if (attr.type !== NodeTypes.ATTRIBUTE) return
if (attr.name !== item) return
if (!attr.value) return