Skip to content

Commit c988e7b

Browse files
committed
refactor: reorganize types to runtime/types/
1 parent 7a489cf commit c988e7b

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

src/module.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ export default defineNuxtModule<ModuleOptions>({
2020
const resolver = createResolver(import.meta.url)
2121

2222
addTypeTemplate({
23-
filename: 'types/nuxt-auto-form.d.ts',
24-
src: resolver.resolve('index.d.ts'),
23+
filename: 'runtime/types/nuxt-auto-form.d.ts',
24+
src: resolver.resolve('runtime/types/index.d.ts'),
25+
})
26+
addTypeTemplate({
27+
filename: 'runtime/types/nuxt-auto-form-zod.d.ts',
28+
src: resolver.resolve('runtime/types/zod.d.ts'),
2529
})
2630

2731
addComponent({
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
import type { ConcreteComponent } from '@vue/runtime-core'
1+
// Generated by Nuxt Auto Form
22

3-
declare module 'zod' {
4-
interface GlobalMeta {
5-
/** Configuration related to `nuxt-auto-form` Nuxt module */
6-
autoForm?: {
7-
/** Float input box to the right of the label */
8-
floatRight?: boolean
9-
}
10-
}
11-
}
3+
import type { ConcreteComponent } from '@vue/runtime-core'
124

135
interface AutoFormConfig {
146
/** Primary app color */

src/runtime/types/zod.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Generated by Nuxt Auto Form
2+
3+
declare module 'zod' {
4+
interface GlobalMeta {
5+
/** Configuration related to `nuxt-auto-form` Nuxt module */
6+
autoForm?: {
7+
/** Float input box to the right of the label */
8+
floatRight?: boolean
9+
}
10+
}
11+
}
12+
13+
export {}

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": "./.nuxt/tsconfig.json",
3+
"include": [
4+
"src/runtime/types/*.d.ts"
5+
],
36
"exclude": [
47
"dist",
58
"node_modules",

0 commit comments

Comments
 (0)