refactor(cli): reuse help schema fields (#17066)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-12-05 20:42:42 +08:00
1 parent 4d39a2cfdd
commit 70b253f6bb
1 file changed
+2 -6
+2 -6
View File
@@ -1,5 +1,6 @@
import { z } from "zod";
import type { CliArgvSchemas } from "./argvParser.js";
import { declaredOptionType, optionFlagName } from "./optionFields.js";
/**
@@ -30,15 +31,10 @@ export interface GlobalOptionsHelp {
| undefined;
}
export interface CommandHelp {
export interface CommandHelp extends CliArgvSchemas {
readonly description?: string | undefined;
/** Printed as `name@version` in the title. */
readonly version?: string | undefined;
/** Positionals, in argv order. */
readonly args?: z.ZodObject | undefined;
readonly options?: z.ZodObject | undefined;
/** Short alias by option key, such as `{ help: "h" }`. */
readonly alias?: Readonly<Record<string, string>> | undefined;
/** A paragraph printed after the options. */
readonly hint?: string | undefined;
/** Omitted for an entry that accepts only its own options. */