fix(cli): resolve strict TS build errors from #470/#502/#508
- Cast loadConfig() through unknown for editor_uri template lookup - Type cli.opts.json access and handle string[] collection in bench
This commit is contained in:
parent
4383accf0f
commit
7b3cb550fe
@ -1878,7 +1878,7 @@ function getEditorUriTemplate(): string {
|
||||
if (envTemplate) return envTemplate;
|
||||
|
||||
try {
|
||||
const config = loadConfig() as {
|
||||
const config = loadConfig() as unknown as {
|
||||
editor_uri?: string;
|
||||
editor_uri_template?: string;
|
||||
editorUri?: string;
|
||||
@ -3150,9 +3150,10 @@ if (isMain) {
|
||||
process.exit(1);
|
||||
}
|
||||
const { runBenchmark } = await import("../bench/bench.js");
|
||||
const benchCollection = cli.opts.collection;
|
||||
await runBenchmark(fixturePath, {
|
||||
json: !!cli.opts.json,
|
||||
collection: cli.opts.collection,
|
||||
json: !!(cli.opts as { json?: boolean }).json,
|
||||
collection: Array.isArray(benchCollection) ? benchCollection[0] : benchCollection,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user