function defineProperties(obj, properties) {
  for (const i in properties) {
    const value = properties[i];
    Object.defineProperty(
      obj,
      i,
      typeof value === 'function' ? { value } : value
    );
  }
}
Essentially `Object.defineProperties()`, except function values are assigned as value descriptors for convenience.
@private