Skip to content

Pass Param settings as a bag, not 17 positional arguments - #1

Merged
tjpalmer merged 1 commit into
mainfrom
add-param-settings
Nov 24, 2026
Merged

tjpalmer merged 1 commit into
mainfrom
add-param-settings

Conversation

@tjpalmer

Copy link
Copy Markdown
Collaborator
  • Add internal ParamSettings (defaults; required/repeated/defaultText var); addParam takes it, so each call names only what differs
  • Replace optionParam with optionSettings; positionalParam takes the PositionalSpec; subcommand builds its CommandSpec by object literal
  • max has no default: a default also replaces an explicit null (no limit)
  • Exported API and Param's constructor unchanged; all backends pass

- Add internal ParamSettings (defaults; required/repeated/defaultText var);
  addParam takes it, so each call names only what differs
- Replace optionParam with optionSettings; positionalParam takes the
  PositionalSpec; subcommand builds its CommandSpec by object literal
- max has no default: a default also replaces an explicit null (no limit)
- Exported API and Param's constructor unchanged; all backends pass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tom <tom@temper.systems>
@tjpalmer
tjpalmer merged commit 3301a9b into main Nov 24, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant