Skip to content

Commit

Permalink
fix(core): supplement comment
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Aug 12, 2021
1 parent dc4adba commit f7070b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/koishi-core/tests/parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ describe('Parser API', () => {
cmd = app.command('cmd2 <foo> [bar:text]')
cmd.option('alpha', '-a')
cmd.option('beta', '-b <beta>')
// infer argument type from fallback
cmd.option('gamma', '-c <gamma>', { fallback: 0 })
// define argument type by OptionConfig
cmd.option('delta', '-d <delta>', { type: 'string' })
// define argument type directly (should not be overrode by default)
cmd.option('epsilon', '-e <epsilon:posint>', { fallback: 1 })
})

Expand Down

0 comments on commit f7070b4

Please sign in to comment.