Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getTag({ args: { tag }, dirtinessTag }: EmberishCurlyComponent): Tag {
return combine([tag, dirtinessTag]);
}
getTag({ args: { tag }, dirtinessTag }: EmberishCurlyComponent): Tag {
return combine([tag, dirtinessTag]);
}
getTag({ args: { tag }, component: { dirtinessTag } }: EmberishGlimmerComponentState): Tag {
return combine([tag, dirtinessTag]);
}
export function activateObserver(target: object, eventName: string, sync = false) {
let activeObservers = getOrCreateActiveObserversFor(target, sync);
if (activeObservers.has(eventName)) {
activeObservers.get(eventName)!.count++;
} else {
let [path] = eventName.split(':');
let tag = combine(getChainTagsForKey(target, path));
activeObservers.set(eventName, {
count: 1,
path,
tag,
lastRevision: value(tag),
suspended: false,
});
}
}
_revalidate() {
if (
!this._arrangedContentIsUpdating &&
!validate(this._arrangedContentTag, this._arrangedContentRevision)
) {
this._arrangedContentIsUpdating = true;
this._updateArrangedContentArray();
this._arrangedContentIsUpdating = false;
this._arrangedContentTag = combine(getChainTagsForKey(this, 'arrangedContent'));
this._arrangedContentRevision = value(this._arrangedContentTag);
}
}
}
combine(): Tag {
let { tags } = this;
if (tags.size === 0) return CONSTANT_TAG;
return combine(Array.from(tags));
}
}
If `this._objectsDirtyIndex === -1` then no indexes are dirty.
Otherwise, an index `i` is dirty if `i >= this._objectsDirtyIndex`.
Calling `objectAt` with a dirty index will cause the `this._objects`
cache to be recomputed.
*/
this._objectsDirtyIndex = 0;
this._objects = null;
this._lengthDirty = true;
this._length = 0;
this._arrangedContent = null;
this._arrangedContentIsUpdating = false;
this._arrangedContentTag = combine(getChainTagsForKey(this, 'arrangedContent'));
this._arrangedContentRevision = value(this._arrangedContentTag);
this._addArrangedContentArrayObserver();
}
constructor(
tag: Tag,
private name: string,
private component: Component,
private manager: ComponentManager,
private dynamicScope: DynamicScope,
) {
super();
let componentTag = manager.getTag(component);
if (componentTag) {
this.tag = combine([tag, componentTag]);
} else {
this.tag = tag;
}
}
constructor(
sourceReference: VersionedPathReference,
pathReference: PathReference
) {
super();
this.sourceReference = sourceReference;
this.pathReference = pathReference;
this.lastPath = null;
this.innerReference = NULL_REFERENCE;
let innerTag = (this.innerTag = createUpdatableTag());
this.tag = combine([sourceReference.tag, pathReference.tag, innerTag]);
}