@optique/core 1.0.0-dev.1745 → 1.0.0-dev.1747

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.
@@ -93,7 +93,11 @@ function isPromiseLike(value) {
93
93
  * @internal
94
94
  */
95
95
  function deriveOptionalInnerParseState(outerState, parser) {
96
- if (Array.isArray(outerState)) return outerState[0];
96
+ if (Array.isArray(outerState)) {
97
+ const innerState = outerState[0];
98
+ if (require_annotations.getAnnotations(outerState) != null && innerState != null && typeof innerState === "object") return require_annotations.inheritAnnotations(outerState, innerState);
99
+ return innerState;
100
+ }
97
101
  return require_annotations.inheritAnnotations(outerState, parser.initialState);
98
102
  }
99
103
  /**
package/dist/modifiers.js CHANGED
@@ -93,7 +93,11 @@ function isPromiseLike(value) {
93
93
  * @internal
94
94
  */
95
95
  function deriveOptionalInnerParseState(outerState, parser) {
96
- if (Array.isArray(outerState)) return outerState[0];
96
+ if (Array.isArray(outerState)) {
97
+ const innerState = outerState[0];
98
+ if (getAnnotations(outerState) != null && innerState != null && typeof innerState === "object") return inheritAnnotations(outerState, innerState);
99
+ return innerState;
100
+ }
97
101
  return inheritAnnotations(outerState, parser.initialState);
98
102
  }
99
103
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.1745+56960ff9",
3
+ "version": "1.0.0-dev.1747+6558ecab",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",