constructor(
    translations: $ReadOnly<HashToTranslation>,
    config: TranslationConfig,
    fbtSite: FbtSite,
    inclHash: boolean,
  ) {
    this._translations = translations;
    this._config = config;
    this._fbtSite = fbtSite;
    this._tokenToMask = {};
    this._metadata = fbtSite.getMetadata();
    this._tableOrHash = fbtSite.getTableOrHash();
    this._hasVCGenderVariation = this._findVCGenderVariation();
    this._hasTranslations = this._translationsExist();
    this._getConstraintMapWithMemoization =
      _createMemoizedConstraintMapGetter(this);
    this._inclHash = inclHash;

    // If a gender variation exists, add it to our table
    if (this._hasVCGenderVariation) {
      this._tableOrHash = {'*': this._tableOrHash};
      this._metadata = [
        FbtSiteMetaEntry.wrap({
          token: IntlVariations.VIEWING_USER,
          type: IntlVariations.FbtVariationType.GENDER,
        }),
        ...this._metadata,
      ];
    }

    for (let ii = 0; ii < this._metadata.length; ++ii) {
      const metadata = this._metadata[ii];
      if (metadata != null && metadata.hasVariationMask()) {
        const token = nullthrows(
          metadata.getToken(),
          'Expect `token` to not be null as the metadata has variation mask.',
        );
        this._tokenToMask[token] = nullthrows(
          metadata.getVariationMask(),
          'Expect `metadata.getVariationMask()` to be nonnull because ' +
            '`metadata.hasVariationMask() === true`.',
        );
      }
    }
  }
@param translations Hash of a string to its translation
@param config Configuration for variation defaults (number/gender)
@param fbtSite Representation of the <fbt> or fbt() to be translated
@param inclHash Include hash/identifer in leaf of payloads