Skip to content

Commit d2060fd

Browse files
committed
fix(types): properly export ModuleHooks
1 parent 6995d8c commit d2060fd

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

src/types/hooks.ts

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
// Declare module to extend Nuxt hooks
2-
declare module '@nuxt/schema' {
3-
interface NuxtHooks {
4-
/**
5-
* Add additional schema files to scan for database schema files.
6-
* @param paths - Array of schema file paths to include.
7-
* @returns void | Promise<void>
8-
*/
9-
'hub:db:schema:extend': ({ dialect, paths }: { dialect: string, paths: string[] }) => void | Promise<void>
10-
/**
11-
* Add additional directories to scan for database migration files.
12-
* @param dirs - Array of directory paths containing .sql migration files to include.
13-
* @returns void | Promise<void>
14-
*/
15-
'hub:db:migrations:dirs': (dirs: string[]) => void | Promise<void>
16-
/**
17-
* Add queries that are not tracked in the `_hub_migrations` table which are applied after the database migrations complete.
18-
* @param queries - The path of the SQL queries paths to add.
19-
* @returns void | Promise<void>
20-
*/
21-
'hub:db:queries:paths': (queries: string[], dialect: 'sqlite' | 'postgresql' | 'mysql') => void | Promise<void>
22-
}
2+
export interface ModuleHooks {
3+
/**
4+
* Add additional schema files to scan for database schema files.
5+
* @param paths - Array of schema file paths to include.
6+
* @returns void | Promise<void>
7+
*/
8+
'hub:db:schema:extend': ({ dialect, paths }: { dialect: string, paths: string[] }) => void | Promise<void>
9+
/**
10+
* Add additional directories to scan for database migration files.
11+
* @param dirs - Array of directory paths containing .sql migration files to include.
12+
* @returns void | Promise<void>
13+
*/
14+
'hub:db:migrations:dirs': (dirs: string[]) => void | Promise<void>
15+
/**
16+
* Add queries that are not tracked in the `_hub_migrations` table which are applied after the database migrations complete.
17+
* @param queries - The path of the SQL queries paths to add.
18+
* @returns void | Promise<void>
19+
*/
20+
'hub:db:queries:paths': (queries: string[], dialect: 'sqlite' | 'postgresql' | 'mysql') => void | Promise<void>
2321
}

0 commit comments

Comments
 (0)