Skip to content

Commit

Permalink
Merge pull request #28 from nonetallt/feature-support-generics
Browse files Browse the repository at this point in the history
Do not include generics in the generated named imports
  • Loading branch information
acidjazz authored Feb 24, 2023
2 parents 57cdc19 + a3c22a2 commit ba9be35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Actions/GenerateCliOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public function __invoke(Collection $models, bool $global = false, bool $plurals
collect($this->imports)
->unique()
->each(function ($import) {
$entry = "import { {$import['type']} } from '{$import['import']}'\n";
$importTypeWithoutGeneric = Str::before($import['type'], '<');
$entry = "import { {$importTypeWithoutGeneric} } from '{$import['import']}'\n";
$this->output = $entry . $this->output;
});

Expand Down

0 comments on commit ba9be35

Please sign in to comment.