feat(compiler-sfc): <script setup> support (experimental)

This is the last commit for the feature which adds async/await detection.
This commit is contained in:
Evan You
2020-07-10 18:00:13 -04:00
parent 73bfce3706
commit 4c43d4e5b9
3 changed files with 80 additions and 14 deletions

View File

@@ -263,8 +263,9 @@ export function processExpression(
return ret
}
const isFunction = (node: Node): node is Function =>
/Function(Expression|Declaration)$/.test(node.type)
const isFunction = (node: Node): node is Function => {
return /Function(?:Expression|Declaration)$|Method$/.test(node.type)
}
const isStaticProperty = (node: Node): node is ObjectProperty =>
node &&