How to use the @glimmer/reference.combine function in @glimmer/reference

To help you get started, we’ve selected a few @glimmer/reference examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glimmerjs / glimmer-vm / packages / @glimmer / integration-tests / lib / components / emberish-curly.ts View on Github external
getTag({ args: { tag }, dirtinessTag }: EmberishCurlyComponent): Tag {
    return combine([tag, dirtinessTag]);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / test-helpers / lib / environment.ts View on Github external
getTag({ args: { tag }, dirtinessTag }: EmberishCurlyComponent): Tag {
    return combine([tag, dirtinessTag]);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / test-helpers / lib / environment / components / emberish-glimmer.ts View on Github external
getTag({ args: { tag }, component: { dirtinessTag } }: EmberishGlimmerComponentState): Tag {
    return combine([tag, dirtinessTag]);
  }
github emberjs / ember.js / packages / @ember / -internals / metal / lib / observer.ts View on Github external
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,
    });
  }
}
github emberjs / ember.js / packages / @ember / -internals / runtime / lib / system / array_proxy.js View on Github external
_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);
    }
  }
}
github glimmerjs / glimmer.js / packages / @glimmer / tracking / src / tracked.ts View on Github external
combine(): Tag {
    let { tags } = this;

    if (tags.size === 0) return CONSTANT_TAG;
    return combine(Array.from(tags));
  }
}
github emberjs / ember.js / packages / @ember / -internals / runtime / lib / system / array_proxy.js View on Github external
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();
  }
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / compiled / opcodes / component.ts View on Github external
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;
    }
  }
github emberjs / ember.js / packages / @ember / -internals / glimmer / lib / helpers / get.ts View on Github external
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]);
  }