addCompIfNotExists<C extends Comp<T>> method

Comp<T> addCompIfNotExists<C extends Comp<T>>(
  1. C component
)
inherited

Adds component only if no top-level component of type C already exists.

Implementation

E addCompIfNotExists<C extends Comp<T>>(C component) {
  if (!has<C>()) addComp(component);
  return self;
}