Skip to content

Commit 8d6cf79

Browse files
committed
refactor: import types
1 parent 36f8a4b commit 8d6cf79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/nuxt/src/auto-hmr-plugin.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import type { VariableDeclarator } from 'estree'
12
import type { Nuxt } from 'nuxt/schema'
3+
import type { Plugin } from 'vite'
24

3-
function getStoreDeclaration(nodes?: import('estree').VariableDeclarator[]) {
5+
function getStoreDeclaration(nodes?: VariableDeclarator[]) {
46
return nodes?.find(
57
(x) =>
68
x.init?.type === 'CallExpression' &&
@@ -9,7 +11,7 @@ function getStoreDeclaration(nodes?: import('estree').VariableDeclarator[]) {
911
)
1012
}
1113

12-
function nameFromDeclaration(node?: import('estree').VariableDeclarator) {
14+
function nameFromDeclaration(node?: VariableDeclarator) {
1315
return node?.id.type === 'Identifier' && node.id.name
1416
}
1517

@@ -62,5 +64,5 @@ export function autoRegisterHMRPlugin(
6264
}
6365
}
6466
},
65-
} satisfies import('vite').Plugin
67+
} satisfies Plugin
6668
}

0 commit comments

Comments
 (0)