@optique/core 1.0.0-dev.500 → 1.0.0-dev.502

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.
@@ -748,6 +748,12 @@ declare function or<TA extends Parser<Mode, unknown, unknown>, TB extends Parser
748
748
  * @since 0.5.0
749
749
  */
750
750
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...rest: [...parsers: TParsers, options: OrTailOptions] & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
751
+ /**
752
+ * Creates a parser that tries each parser in sequence until one succeeds.
753
+ * @param parsers Parsers to try in order.
754
+ * @returns A parser that succeeds if any of the input parsers succeed.
755
+ * @since 0.5.0
756
+ */
751
757
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...parsers: TParsers & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
752
758
  /**
753
759
  * Options for customizing error messages in the {@link longestMatch}
@@ -748,6 +748,12 @@ declare function or<TA extends Parser<Mode, unknown, unknown>, TB extends Parser
748
748
  * @since 0.5.0
749
749
  */
750
750
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...rest: [...parsers: TParsers, options: OrTailOptions] & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
751
+ /**
752
+ * Creates a parser that tries each parser in sequence until one succeeds.
753
+ * @param parsers Parsers to try in order.
754
+ * @returns A parser that succeeds if any of the input parsers succeed.
755
+ * @since 0.5.0
756
+ */
751
757
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...parsers: TParsers & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
752
758
  /**
753
759
  * Options for customizing error messages in the {@link longestMatch}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.500+426d7651",
3
+ "version": "1.0.0-dev.502+f064dfb8",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",