Skip to content

Commit 94f2f1d

Browse files
authored
Merge pull request DefinitelyTyped#15706 from alan-agius4/feature/commander
feat(commander): improve typyings and fix lint issues
2 parents 92b827b + 0c90377 commit 94f2f1d

File tree

2 files changed

+134
-268
lines changed

2 files changed

+134
-268
lines changed

types/commander/commander-tests.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ if (program['pineapple']) console.log(' - pineapple');
1515
if (program['bbq']) console.log(' - bbq');
1616
console.log(' - %s cheese', program['cheese']);
1717

18-
function range(val:string) {
18+
function range(val: string) {
1919
return val.split('..').map(Number);
2020
}
2121

22-
function list(val:string) {
22+
function list(val: string) {
2323
return val.split(',');
2424
}
2525

26-
function collect(val:string, memo:string[]) {
26+
function collect(val: string, memo: string[]) {
2727
memo.push(val);
2828
return memo;
2929
}
3030

31-
function increaseVerbosity(v:any, total:number) {
31+
function increaseVerbosity(v: any, total: number) {
3232
return total + 1;
3333
}
3434

@@ -80,11 +80,11 @@ program
8080
});
8181

8282
program
83-
.version('0.0.1')
84-
.arguments('<cmd> [env]')
85-
.action(function (cmd, env) {
86-
console.log(cmd, env);
87-
});
83+
.version('0.0.1')
84+
.arguments('<cmd> [env]')
85+
.action((cmd, env) => {
86+
console.log(cmd, env);
87+
});
8888

8989
program.parse(process.argv);
9090

0 commit comments

Comments
 (0)