redactedDetails = (template, ...args) => {
  // Keep in mind that the vast majority of calls to `details` creates
  // a details token that is never used, so this path must remain as fast as
  // possible. Hence we store what we've got with little processing, postponing
  // all the work to happen only if needed, for example, if an assertion fails.
  const detailsToken = freeze({ __proto__: DetailsTokenProto });
  weakmapSet(hiddenDetailsMap, detailsToken, { template, args });
  return /** @type {DetailsToken} */ (/** @type {unknown} */ (detailsToken));
}
Normally this is the function exported as `assert.details` and often
spelled `X`. However, if the `{errorTaming: 'unsafe'}` or
`{errorTaming: 'unsafe-debug'}` option is
given to `lockdown`, then `unredactedDetails` is used instead.

There are some unconditional uses of `redactedDetails` in this module. All
of them should be uses where the template literal has no redacted
substitution values. In those cases, the two are equivalent.

@type {AssertionUtilities['details']}