@optique/core 1.4.0-dev.2716 → 1.4.0-dev.2720

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.
@@ -124,6 +124,7 @@ function delegateOptionParsing(wrapper, inner, getInnerState) {
124
124
  *
125
125
  * @param parser The parser to annotate.
126
126
  * @param behavior The known outcomes; omitted fields stay unknown.
127
+ * @returns Nothing; updates the parser's metadata in place.
127
128
  * @throws {TypeError} If a value is invalid, afterStep is supplied for a failing
128
129
  * step, or the metadata cannot be defined or cleared.
129
130
  * @since 1.4.0
@@ -165,6 +166,7 @@ function getEmptyInputBehavior(parser) {
165
166
  *
166
167
  * @param wrapper The parser receiving the facts.
167
168
  * @param inner The parser whose behavior is preserved.
169
+ * @returns Nothing; updates the wrapper's metadata in place.
168
170
  * @throws {TypeError} If modes differ or metadata cannot be defined or cleared.
169
171
  * @since 1.4.0
170
172
  */
@@ -158,6 +158,7 @@ interface EmptyInputBehavior {
158
158
  *
159
159
  * @param parser The parser to annotate.
160
160
  * @param behavior The known outcomes; omitted fields stay unknown.
161
+ * @returns Nothing; updates the parser's metadata in place.
161
162
  * @throws {TypeError} If a value is invalid, afterStep is supplied for a failing
162
163
  * step, or the metadata cannot be defined or cleared.
163
164
  * @since 1.4.0
@@ -188,6 +189,7 @@ declare function getEmptyInputBehavior(parser: Parser<Mode, unknown, unknown>):
188
189
  *
189
190
  * @param wrapper The parser receiving the facts.
190
191
  * @param inner The parser whose behavior is preserved.
192
+ * @returns Nothing; updates the wrapper's metadata in place.
191
193
  * @throws {TypeError} If modes differ or metadata cannot be defined or cleared.
192
194
  * @since 1.4.0
193
195
  */
@@ -158,6 +158,7 @@ interface EmptyInputBehavior {
158
158
  *
159
159
  * @param parser The parser to annotate.
160
160
  * @param behavior The known outcomes; omitted fields stay unknown.
161
+ * @returns Nothing; updates the parser's metadata in place.
161
162
  * @throws {TypeError} If a value is invalid, afterStep is supplied for a failing
162
163
  * step, or the metadata cannot be defined or cleared.
163
164
  * @since 1.4.0
@@ -188,6 +189,7 @@ declare function getEmptyInputBehavior(parser: Parser<Mode, unknown, unknown>):
188
189
  *
189
190
  * @param wrapper The parser receiving the facts.
190
191
  * @param inner The parser whose behavior is preserved.
192
+ * @returns Nothing; updates the wrapper's metadata in place.
191
193
  * @throws {TypeError} If modes differ or metadata cannot be defined or cleared.
192
194
  * @since 1.4.0
193
195
  */
package/dist/extension.js CHANGED
@@ -124,6 +124,7 @@ function delegateOptionParsing(wrapper, inner, getInnerState) {
124
124
  *
125
125
  * @param parser The parser to annotate.
126
126
  * @param behavior The known outcomes; omitted fields stay unknown.
127
+ * @returns Nothing; updates the parser's metadata in place.
127
128
  * @throws {TypeError} If a value is invalid, afterStep is supplied for a failing
128
129
  * step, or the metadata cannot be defined or cleared.
129
130
  * @since 1.4.0
@@ -165,6 +166,7 @@ function getEmptyInputBehavior(parser) {
165
166
  *
166
167
  * @param wrapper The parser receiving the facts.
167
168
  * @param inner The parser whose behavior is preserved.
169
+ * @returns Nothing; updates the wrapper's metadata in place.
168
170
  * @throws {TypeError} If modes differ or metadata cannot be defined or cleared.
169
171
  * @since 1.4.0
170
172
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.4.0-dev.2716",
3
+ "version": "1.4.0-dev.2720",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",
@@ -245,7 +245,7 @@
245
245
  },
246
246
  "sideEffects": false,
247
247
  "devDependencies": {
248
- "@optique/env": "1.4.0-dev.2716+57cbdb77",
248
+ "@optique/env": "1.4.0-dev.2720+93db84aa",
249
249
  "@types/node": "^24.0.0",
250
250
  "fast-check": "^4.7.0",
251
251
  "tsdown": "^0.13.0",
@@ -236,13 +236,11 @@ Common mistakes checklist
236
236
  `parse()` in tests and embedded use. Do not pre-parse `process.argv`.
237
237
  - Declare only static facts with `defineEmptyInputBehavior()` in
238
238
  `@optique/core/extension`; use `inheritEmptyInputBehavior()` for
239
- transparent wrappers. See <https://optique.dev/concepts/extend.md>.
239
+ transparent wrappers. See [extension APIs].
240
240
  - Do not treat `or(a, b)` as “zero or more alternatives.” Wrap it in
241
241
  `optional()` or `withDefault()` to allow no matching branch.
242
- - Do not use `object()` for mutually exclusive subcommands. Use
243
- `or(command(...), command(...))`.
244
- - Do not forget that `flag("--x")` is required. Wrap it in `optional()` or
245
- `withDefault(..., false)` for ordinary optional flags.
242
+ - Use `or(command(...), command(...))` for mutually exclusive subcommands.
243
+ - Wrap required `flag("--x")` in `optional()` or `withDefault(..., false)`.
246
244
  - Do not expect `multiple(p)` to fail when absent; it returns `[]`. Wrap with
247
245
  `nonEmpty()` when at least one value is required.
248
246
  - Do not confuse free-order parsing with `seq()`. Most constructs let child
@@ -259,6 +257,8 @@ Common mistakes checklist
259
257
 
260
258
  For the detailed maintained guide, use <https://optique.dev/pitfalls.md>.
261
259
 
260
+ [extension APIs]: https://optique.dev/concepts/extend.md
261
+
262
262
 
263
263
  Reference links
264
264
  ---------------