Skip to content

Commit 50ebe24

Browse files
committed
Clean up unused vars
1 parent cfb1bcf commit 50ebe24

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/bin/cli.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,13 @@ export function cli(pkg: any) {
117117
for (const [key, value] of Object.entries(obj)) {
118118
if (typeof value === "function" && (value as any).load) {
119119
(value as any).load();
120-
} else if (typeof value === "object" && value !== null && !Array.isArray(value) && key !== "cli") {
121-
loadAll(value);
120+
} else if (
121+
typeof value === "object" &&
122+
value !== null &&
123+
!Array.isArray(value) &&
124+
key !== "cli"
125+
) {
126+
loadAll(value);
122127
}
123128
}
124129
};

src/commands/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import * as experiments from "../experiments";
2-
import { Command } from "../command";
32

43
/**
54
* Loads all commands for our parser.
65
*/
76
export function load(client: any): any {
87
function loadCommand(name: string) {
9-
const t0 = process.hrtime.bigint();
10-
118
const load = () => {
129
const { command: cmd } = require(`./${name}`);
1310
cmd.register(client);
@@ -26,7 +23,7 @@ export function load(client: any): any {
2623
const tEnd = process.hrtime.bigint();
2724
const diff = (tEnd - tStart) / BigInt(1e6);
2825
if (diff > 75) {
29-
// console.error(`Loading ${name} took ${diff}ms`);
26+
// console.error(`Loading ${name} took ${diff}ms`);
3027
}
3128
};
3229

0 commit comments

Comments
 (0)