view-contracts 0.5.13 → 0.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { Command } from "commander";
1
+ import { Command, type CommanderError } from "commander";
2
2
  export interface CommandHandlers {
3
3
  compile: (options: {
4
4
  config?: string;
@@ -25,4 +25,14 @@ export interface CommandHandlers {
25
25
  screen?: string;
26
26
  }, parentOpts: Record<string, unknown>) => Promise<void>;
27
27
  }
28
- export declare function createProgram(handlers: CommandHandlers, version: string): Command;
28
+ export interface ProgramOptions {
29
+ /**
30
+ * Ends an invocation whose arguments commander rejects (an unknown option,
31
+ * an option without its value, a missing argument): writes what the
32
+ * contract declares for invalid arguments and returns the exit code.
33
+ * commander then writes nothing of its own. Without it, commander writes
34
+ * its message and exits 1.
35
+ */
36
+ onUsageError?: (error: CommanderError, command: Command) => number;
37
+ }
38
+ export declare function createProgram(handlers: CommandHandlers, version: string, options?: ProgramOptions): Command;