Skip to content

Commit 3fab8fe

Browse files
committed
types
1 parent 0eeeb3a commit 3fab8fe

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/nuxi/src/completions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { CommandDef } from 'citty'
1+
import type { ArgsDef, CommandDef } from 'citty'
22
import tab from '@bomb.sh/tab/citty'
33

4-
export async function initCompletions(command: CommandDef) {
5-
const completion = await tab(command as any)
4+
export async function initCompletions<T extends ArgsDef = ArgsDef>(command: CommandDef<T>) {
5+
const completion = await tab(command)
66

77
const devCommand = completion.commands.get('dev')
88
if (devCommand) {

packages/nuxi/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { provider } from 'std-env'
88
import { description, name, version } from '../package.json'
99
import { commands } from './commands'
1010
import { cwdArgs } from './commands/_shared'
11+
import { initCompletions } from './completions'
1112
import { setupGlobalConsole } from './utils/console'
1213
import { checkEngines } from './utils/engines'
1314
import { logger } from './utils/logger'
@@ -73,8 +74,7 @@ export const main = defineCommand({
7374
})
7475

7576
export async function runMain() {
76-
const { initCompletions } = await import('./completions')
77-
await initCompletions(main as any)
77+
await initCompletions(main)
7878

7979
return _runMain(main)
8080
}

0 commit comments

Comments
 (0)