function resolveMap(tokenMap, _opts) {
  /** @type {Record<string, boolean>} */
  const foundCirc = {};
  let { ignoreKeys } = defaults;
  if (_opts && _opts.ignoreKeys instanceof Set) {
    ignoreKeys = ignoreKeys.union(_opts.ignoreKeys);
  }
  const opts = { ...defaults, ..._opts, ignoreKeys };
  const current_context = '';
  // Note: we might need to create a clone of the tokenMap
  for (const [key, token] of Array.from(tokenMap)) {
    const resolved = traverseObj(token, tokenMap, opts, current_context, foundCirc);
    // When resolving refs for the expand util, we may (optionally) not want to
    // persist the resolved value unless it is an object
    tokenMap.set(key, resolved);
  }
}
@param {Map<string, TransformedToken>} tokenMap
@param {Options} _opts
@returns