- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses.lua
More file actions
Latest commit
32 lines (28 loc) · 2.33 KB
/
Copy pathclasses.lua
File metadata and controls
32 lines (28 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---@classArgsConfigOption
---@fieldfieldstring
---@fieldshortstring|nil @ short option name, defined without leading `-`. used when an option with a single leading `-` is encountered
---@fieldlongstring|nil @ long option name, defined without leading `--`. used when an option with leading `--` is encountered
---@fielddescriptionstring|nil @ description used in the help message
---@fieldflagboolean|nil @ is this option a flag?
---@fieldsingle_paramboolean|nil @ does this option take a single parameter?
---@fieldmin_paramsinteger|nil @ when not a flag or single_param, how many params does the array have to have minimum? Default 0
---@fieldmax_paramsinteger|nil @ when not a flag or single_param, how many params is the array allowed to have maximum? Default `nil` meaning unlimited
---@fieldparamsinteger|nil @ fallback for both min_params and max_params
---@fieldtypestring|nil @ (required) id of the type the single_param or array entries have to be. Not used for flags
---@fieldoptionalboolean|nil @ is the option optional? implied to be true for flags
---@fielddefault_valueany @ the default value to use for optional options. When set, optional is implied to be `true`
---@classArgsConfigPositional
---@fieldsingleboolean|nil @ is this positional a single value?
---@fieldmin_amountinteger|nil @ when not a single, how many args does the array have to have minimum? Default 0
---@fieldmax_amountinteger|nil @ when not a single, how many args is the array allowed to have maximum? Default `nil` meaning unlimited
---@fieldamountinteger|nil @ fallback for both min_amount and max_amount
---@fieldtypestring @ id of the type the single or array entries have to be
---@fieldoptionalboolean|nil @ is the option optional? implied to be true for flags
---@classArgsConfig
---@fieldoptionsArgsConfigOption[]|nil
---@fieldpositionalArgsConfigPositional[]|nil
---@classArgsHelpConfig
---@fieldusagestring|nil @ When provided a `"Usage: "..usage` line will be added before the help message
---@fieldindent_lengthinteger|nil @ Default 4. Indent for the option/positional labels
---@fieldlabel_lengthinteger|nil @ Default 32. Labels will get padded with blank space up to this length. If exceeding the length, the description is put on the next line
---@fieldspacing_lengthinteger|nil @ Default 2. Space between label and description