We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cfcc0d commit 96f3d50Copy full SHA for 96f3d50
packages/macros/src/core/define-component/await.ts
@@ -2,16 +2,12 @@
2
3
import {
4
importHelperFn,
5
+ isFunctionType,
6
walkAST,
7
type MagicStringAST,
8
} from '@vue-macros/common'
9
import type { FunctionalNode } from '..'
-import type { AwaitExpression, Function, Node, Statement } from '@babel/types'
10
-
11
-// Copied from @vue/compiler-core
12
-export const isFunctionType = (node: Node): node is Function => {
13
- return /Function(?:Expression|Declaration)$|Method$/.test(node.type)
14
-}
+import type { AwaitExpression, Node, Statement } from '@babel/types'
15
16
export function transformAwait(root: FunctionalNode, s: MagicStringAST): void {
17
if (root.body.type !== 'BlockStatement') return
0 commit comments