Skip to content

Commit f92970d

Browse files
committed
fix: Adjusts TS typings in CLI
1 parent 943a815 commit f92970d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cli.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ program
2424
"--format <format>",
2525
"Output format. One of json, ndjson, none, test. Defaults to test",
2626
(value) => {
27-
const validFormats = ["json", "ndjson", "none", "test", "", undefined];
28-
if (validFormats.includes(value)) {
29-
if (value === "" || value === undefined) {
30-
return "test"; // Default to json if empty
31-
}
27+
const validFormats = ["json", "ndjson", "none", "test"];
28+
if (value === "" || value === undefined) {
29+
return "test"; // Default to json if empty
30+
}
3231

32+
if (validFormats.includes(value)) {
3333
return value;
3434
}
3535

@@ -40,7 +40,7 @@ program
4040
)
4141
.action(async (options) => {
4242
await check({
43-
format: options.format,
43+
format: options.format ?? "test",
4444
fixture: options.fixture,
4545
manifest: options.manifest,
4646
wasm: options.wasm,

0 commit comments

Comments
 (0)