Skip to content

Commit

Permalink
refactor(commands): type safe available builders list
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Jul 16, 2023
1 parent 27faa64 commit b262fad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/start.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ERROR_PREFIX, INFO_PREFIX } from '../lib/ui';
import { getRemainingFlags } from '../lib/utils/remaining-flags';
import { AbstractCommand } from './abstract.command';
import { Input } from './command.input';
import type { BuilderVariant } from '../lib/configuration';

export class StartCommand extends AbstractCommand {
public load(program: CommanderStatic): void {
Expand Down Expand Up @@ -79,7 +80,7 @@ export class StartCommand extends AbstractCommand {
!isWebpackEnabled,
});

const availableBuilders = ['tsc', 'webpack', 'swc'];
const availableBuilders: BuilderVariant[] = ['tsc', 'webpack', 'swc'];
if (command.builder && !availableBuilders.includes(command.builder)) {
console.error(
ERROR_PREFIX +
Expand Down

0 comments on commit b262fad

Please sign in to comment.