Skip to content

Commit 96f3d50

Browse files
committed
chore(macros): remove isFunctionType
1 parent 4cfcc0d commit 96f3d50

File tree

1 file changed

+2
-6
lines changed
  • packages/macros/src/core/define-component

1 file changed

+2
-6
lines changed

packages/macros/src/core/define-component/await.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
import {
44
importHelperFn,
5+
isFunctionType,
56
walkAST,
67
type MagicStringAST,
78
} from '@vue-macros/common'
89
import type { FunctionalNode } from '..'
9-
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-
}
10+
import type { AwaitExpression, Node, Statement } from '@babel/types'
1511

1612
export function transformAwait(root: FunctionalNode, s: MagicStringAST): void {
1713
if (root.body.type !== 'BlockStatement') return

0 commit comments

Comments
 (0)