Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
value(): unknown {
let { _parentValue } = this;
if (isDict(_parentValue)) {
let old = pushTrackFrame();
let ret = _parentValue[this._propertyKey];
let tag = popTrackFrame(old);
this.tag.inner.update(tag);
return ret;
} else {
return undefined;
}
}
keyFor = (item: unknown) => (isDict(item) ? item[keyPath] : item);
break;
export function data(value: unknown): VersionedPathReference {
if (isDict(value)) {
return new RootReference(value);
} else {
return new PrimitiveReference(value as null | undefined);
}
}
value() {
let { _parentReference, _parentObjectTag, _propertyKey } = this;
let parentValue = _parentReference.value();
_parentObjectTag.inner.update(tagFor(parentValue, _propertyKey));
if (isDict(parentValue)) {
let old = pushTrackFrame();
let ret = parentValue[_propertyKey];
let tag = popTrackFrame(old);
_parentObjectTag.inner.update(tag);
return ret;
} else {
return undefined;
}
}