@optique/core 1.0.0-dev.1789 → 1.0.0-dev.1793
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.
|
@@ -46,7 +46,10 @@ function normalizeInjectedAnnotationState(state) {
|
|
|
46
46
|
return require_annotations.unwrapInjectedAnnotationWrapper(state);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Returns whether a state is still the
|
|
49
|
+
* Returns whether a state is still at the initial sentinel after normalizing
|
|
50
|
+
* Optique's injected annotation wrapper.
|
|
51
|
+
*
|
|
52
|
+
* This treats plain `undefined` and annotation-wrapped `undefined` the same.
|
|
50
53
|
*
|
|
51
54
|
* @internal
|
|
52
55
|
*/
|
|
@@ -63,7 +66,7 @@ function getWrappedChildParseState(parentState, childState, parser) {
|
|
|
63
66
|
const annotations = require_annotations.getAnnotations(parentState);
|
|
64
67
|
const shouldInheritAnnotations = Reflect.get(parser, require_parser.inheritParentAnnotationsKey) === true;
|
|
65
68
|
if (childState == null) {
|
|
66
|
-
if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations(
|
|
69
|
+
if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations(childState, annotations);
|
|
67
70
|
return childState;
|
|
68
71
|
}
|
|
69
72
|
if (annotations === void 0 || typeof childState !== "object" || require_annotations.getAnnotations(childState) === annotations || !shouldInheritAnnotations) return childState;
|
|
@@ -80,7 +83,7 @@ function getWrappedChildState(parentState, childState, parser) {
|
|
|
80
83
|
const annotations = require_annotations.getAnnotations(parentState);
|
|
81
84
|
const shouldInheritAnnotations = Reflect.get(parser, require_parser.inheritParentAnnotationsKey) === true;
|
|
82
85
|
if (childState == null) {
|
|
83
|
-
if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations(
|
|
86
|
+
if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations(childState, annotations);
|
|
84
87
|
return childState;
|
|
85
88
|
}
|
|
86
89
|
if (annotations === void 0 || typeof childState !== "object" || require_annotations.getAnnotations(childState) === annotations) return childState;
|
package/dist/annotation-state.js
CHANGED
|
@@ -46,7 +46,10 @@ function normalizeInjectedAnnotationState(state) {
|
|
|
46
46
|
return unwrapInjectedAnnotationWrapper(state);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Returns whether a state is still the
|
|
49
|
+
* Returns whether a state is still at the initial sentinel after normalizing
|
|
50
|
+
* Optique's injected annotation wrapper.
|
|
51
|
+
*
|
|
52
|
+
* This treats plain `undefined` and annotation-wrapped `undefined` the same.
|
|
50
53
|
*
|
|
51
54
|
* @internal
|
|
52
55
|
*/
|
|
@@ -63,7 +66,7 @@ function getWrappedChildParseState(parentState, childState, parser) {
|
|
|
63
66
|
const annotations = getAnnotations(parentState);
|
|
64
67
|
const shouldInheritAnnotations = Reflect.get(parser, inheritParentAnnotationsKey) === true;
|
|
65
68
|
if (childState == null) {
|
|
66
|
-
if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations(
|
|
69
|
+
if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations(childState, annotations);
|
|
67
70
|
return childState;
|
|
68
71
|
}
|
|
69
72
|
if (annotations === void 0 || typeof childState !== "object" || getAnnotations(childState) === annotations || !shouldInheritAnnotations) return childState;
|
|
@@ -80,7 +83,7 @@ function getWrappedChildState(parentState, childState, parser) {
|
|
|
80
83
|
const annotations = getAnnotations(parentState);
|
|
81
84
|
const shouldInheritAnnotations = Reflect.get(parser, inheritParentAnnotationsKey) === true;
|
|
82
85
|
if (childState == null) {
|
|
83
|
-
if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations(
|
|
86
|
+
if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations(childState, annotations);
|
|
84
87
|
return childState;
|
|
85
88
|
}
|
|
86
89
|
if (annotations === void 0 || typeof childState !== "object" || getAnnotations(childState) === annotations) return childState;
|