Skip to content

Commit aaa15af

Browse files
committed
refactor: import babel types
1 parent b06d4d5 commit aaa15af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import {
88
} from '@vue-macros/common'
99
import { type Options, resolveOption } from './core/options'
1010
import { resolveName } from './core/utils'
11-
import type { ExportDefaultDeclaration, Node } from '@babel/types'
11+
import type * as t from '@babel/types'
1212

13-
function getNodeStart(node: Node) {
13+
function getNodeStart(node: t.Node) {
1414
if (node.leadingComments && node.leadingComments.length > 0) {
1515
return node.leadingComments[0].start!
1616
}
@@ -35,7 +35,7 @@ export default createUnplugin<Options | undefined, false>((rawOptions = {}) => {
3535

3636
const program = babelParse(code, lang)
3737
const defaultExport = program.body.find(
38-
(node): node is ExportDefaultDeclaration =>
38+
(node): node is t.ExportDefaultDeclaration =>
3939
node.type === 'ExportDefaultDeclaration'
4040
)
4141
if (!defaultExport) return

0 commit comments

Comments
 (0)