code: function addResetFn(ctor){
          if (ctor.__reset__) { return; } // already added
  
          ctor.__reset__ =  function (){
              var proto = ctor.prototype;
              delete proto._$interceptor;
              delete proto._$typeName;
              delete proto._pendingBackingStores;
              delete proto.getProperty;
              delete proto.setProperty;
              delete proto.entityType;
              delete proto.complexType;
              resetProto(proto);
              delete ctor.__reset__;
  
              function resetProto(proto){
                  if (Object.keys(proto).length !== 0) {
                      var protoResets = proto.__resets__;
                      if (protoResets){
                          for (var key in protoResets ){
                              protoResets[key]();
                          }
                          delete proto.__resets__;
                      }
                      resetProto(Object.getPrototypeOf(proto));
                  }
              }
          };
      }
docs: Adds '__reset__' class fn which restores ctor to its pre-registration state, removing properties added during registration and restoring intercepted properties to their original condition. Intended for test setup/teardown. May be useful if moving a type ctor from one MetadataStore to another with different property characteristics for this type. Remember: a type ctor can belong to at most one EntityType at a time.