Skip to content

Commit

Permalink
use BaseCommand in _useless.js
Browse files Browse the repository at this point in the history
  • Loading branch information
voxsim committed Mar 4, 2017
1 parent 9fd6224 commit b866205
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/cli/commands/_useless.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/* @flow */

import BaseCommand from './_base.js';
import {MessageError} from '../../errors.js';

export default function(message: string): { run: Function, useless: boolean } {
return {
useless: true,
run() {
export default function(message: string): Function {
return class extends BaseCommand {
useless: boolean = true;

static run(): Promise<void> {
throw new MessageError(message);
},
}
};
}

0 comments on commit b866205

Please sign in to comment.