Skip to content

Commit f33762a

Browse files
boneskullclaude
andcommitted
docs: clarify that variadic positionals become arrays
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7c2c1ca commit f33762a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ For a CLI without subcommands, use `.globals()` with merged options and position
103103
import { bargs, opt, pos } from '@boneskull/bargs';
104104

105105
// Merge options and positionals into one parser
106+
// when a positional is variadic, it becomes an array within the result
106107
const parser = pos.positionals(pos.variadic('string', { name: 'text' }))(
107108
opt.options({
108109
uppercase: opt.boolean({ aliases: ['u'], default: false }),

0 commit comments

Comments
 (0)