static assertNoExcessProperties(obj, objectName) {
    const invalidKeys = Object.keys(obj);
    if (invalidKeys.length > 0) {
      const keys = invalidKeys.join(', ');
      throw new Error(`${objectName} has unrecognized properties: [${keys}]`);
    }
  }
Asserts that obj has no own properties, throwing a nice error message if it does.
`objectName` is included for nicer logging.
@param {Record<string, unknown>} obj
@param {string} objectName