File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- import type { CommandDef } from 'citty'
1+ import type { ArgsDef , CommandDef } from 'citty'
22import 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 ) {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { provider } from 'std-env'
88import { description , name , version } from '../package.json'
99import { commands } from './commands'
1010import { cwdArgs } from './commands/_shared'
11+ import { initCompletions } from './completions'
1112import { setupGlobalConsole } from './utils/console'
1213import { checkEngines } from './utils/engines'
1314import { logger } from './utils/logger'
@@ -73,8 +74,7 @@ export const main = defineCommand({
7374} )
7475
7576export 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}
You can’t perform that action at this time.
0 commit comments