static __registerTransform(transform, target) {
    const transformTypeValues = [transformTypeName, transformTypeValue, attribute];
    const { type, name, filter, transitive, transform: transformFn } = transform;
    if (typeof type !== 'string') throw new Error('type must be a string');
    if (transformTypeValues.indexOf(type) < 0)
      throw new Error(type + ' type is not one of: ' + transformTypeValues.join(', '));
    if (typeof name !== 'string') throw new Error('name must be a string');
    if (filter && typeof filter !== 'function') throw new Error('filter must be a function');
    if (typeof transformFn !== 'function') throw new Error('transform must be a function');
    this.deleteExistingHook(target, 'transforms', name);

    // make sure to trigger the setter
    target.hooks = deepmerge(target.hooks, {
      transforms: {
        [name]: {
          type,
          filter,
          transitive: !!transitive,
          transform: transformFn,
        },
      },
    });
    return this;
  }
@param {Transform} transform
@param {typeof Register | Register} target