types: improve typing

This commit is contained in:
Evan You
2019-10-08 12:43:13 -04:00
parent b68eb229c7
commit 8da5b007b1
13 changed files with 42 additions and 29 deletions

View File

@@ -183,7 +183,7 @@ export function processExpression(
// range is offset by -1 due to the wrapping parens when parsed
const start = id.start - 1
const end = id.end - 1
const last = ids[i - 1] as any
const last = ids[i - 1]
const leadingText = rawExp.slice(last ? last.end - 1 : 0, start)
if (leadingText.length || id.prefix) {
children.push(leadingText + (id.prefix || ``))