Skip to content

Commit

Permalink
refactor: remove useless type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Jul 22, 2023
1 parent 79e7cfc commit 519ecbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actions/new.action.ts
Expand Up @@ -109,10 +109,10 @@ const generateApplicationFiles = async (
args: CommandStorage,
options: CommandStorage,
) => {
const collectionName = options.get<string>('collection', true)?.value;
const collection: AbstractCollection = CollectionFactory.create(
(collectionName as Collection) || Collection.NESTJS,
);
const collectionName =
options.get<Collection>('collection')?.value || Collection.NESTJS;
const collection: AbstractCollection =
CollectionFactory.create(collectionName);

const argsAndOptionStorage = new CommandStorage();
argsAndOptionStorage.mergeWith(args);
Expand Down

0 comments on commit 519ecbf

Please sign in to comment.