Skip to content

Commit fc37efa

Browse files
committed
fix: Update import statements in InstallCommand for correct TypeScript typings
1 parent 509c2b7 commit fc37efa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Commands/InstallCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,18 +395,18 @@ private function displayBootstrapSetup(): void
395395
$this->newLine();
396396
$this->line(' Add to <fg=yellow>resources/js/bootstrap.ts</>:');
397397
$this->newLine();
398-
$this->line(' <fg=cyan>import { translations } from \'@/lang\';</>');
398+
$this->line(' <fg=cyan>import * as translations from \'@/lang\';</>');
399399
$this->newLine();
400400
$this->line(' <fg=cyan>declare global {</>');
401401
$this->line(' <fg=cyan> interface Window {</>');
402402
$this->line(' <fg=cyan> localizer: {</>');
403-
$this->line(' <fg=cyan> translations: Record<string, Record<string, string>>;</>');
403+
$this->line(' <fg=cyan> translations: typeof translations;</>');
404404
$this->line(' <fg=cyan> };</>');
405405
$this->line(' <fg=cyan> }</>');
406406
$this->line(' <fg=cyan>}</>');
407407
$this->newLine();
408408
$this->line(' <fg=cyan>window.localizer = {</>');
409-
$this->line(' <fg=cyan> translations: translations,</>');
409+
$this->line(' <fg=cyan> translations,</>');
410410
$this->line(' <fg=cyan>};</>');
411411
$this->newLine();
412412
}

0 commit comments

Comments
 (0)