@optique/core 1.0.0-dev.1726 → 1.0.0-dev.1728

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.
@@ -4450,6 +4450,10 @@ function conditional(discriminator, branches, defaultBranch, options) {
4450
4450
  };
4451
4451
  } else if (defaultBranch === void 0) return deferredDiscriminatorResult;
4452
4452
  }
4453
+ if (defaultBranch !== void 0 && (exec?.phase === "parse" || exec?.phase === "suggest")) return {
4454
+ success: true,
4455
+ value: [void 0, void 0]
4456
+ };
4453
4457
  if (defaultBranch !== void 0) {
4454
4458
  const branchState = getAnnotatedChildState(state, state.branchState ?? defaultBranch.initialState, defaultBranch);
4455
4459
  const defaultResult = unwrapCompleteResult(await defaultBranch.complete(branchState, withChildExecPath(exec, "_branch")));
@@ -1343,7 +1343,7 @@ interface ConditionalErrorOptions {
1343
1343
  * Receives both the discriminator value the parser actually
1344
1344
  * resolved to (`discriminatorValue`) and the speculative key the
1345
1345
  * branch tokens were committed to (`speculativeKey`).
1346
- * @since 0.10.1
1346
+ * @since 1.0.1
1347
1347
  */
1348
1348
  readonly branchMismatch?: (discriminatorValue: string, speculativeKey: string) => Message;
1349
1349
  }
@@ -1343,7 +1343,7 @@ interface ConditionalErrorOptions {
1343
1343
  * Receives both the discriminator value the parser actually
1344
1344
  * resolved to (`discriminatorValue`) and the speculative key the
1345
1345
  * branch tokens were committed to (`speculativeKey`).
1346
- * @since 0.10.1
1346
+ * @since 1.0.1
1347
1347
  */
1348
1348
  readonly branchMismatch?: (discriminatorValue: string, speculativeKey: string) => Message;
1349
1349
  }
@@ -4450,6 +4450,10 @@ function conditional(discriminator, branches, defaultBranch, options) {
4450
4450
  };
4451
4451
  } else if (defaultBranch === void 0) return deferredDiscriminatorResult;
4452
4452
  }
4453
+ if (defaultBranch !== void 0 && (exec?.phase === "parse" || exec?.phase === "suggest")) return {
4454
+ success: true,
4455
+ value: [void 0, void 0]
4456
+ };
4453
4457
  if (defaultBranch !== void 0) {
4454
4458
  const branchState = getAnnotatedChildState(state, state.branchState ?? defaultBranch.initialState, defaultBranch);
4455
4459
  const defaultResult = unwrapCompleteResult(await defaultBranch.complete(branchState, withChildExecPath(exec, "_branch")));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.1726+29d6f85c",
3
+ "version": "1.0.0-dev.1728+5206d2c9",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",