function createProxy(originalTarget, getCurrentTarget) {
  const proxyHandler = {};
  for (const method of proxyMethods) {
    proxyHandler[method] = (_, ...args) => {
      if (method === 'get' && args[0] === 'prototype') {
        // prototype must always return original target value
        return Reflect[method](_, ...args);
      }
      return Reflect[method](getCurrentTarget(), ...args);
    };
  }
  return new Proxy(originalTarget, proxyHandler);
}
Creates a proxy for the given target, and fowards any calls to the most up to the latest
version of the target. (ex. the latest hot replaced class).