docs: function EnumType(attrs, opts) {
    Type.call(this, attrs, opts);
  
    if (!Array.isArray(attrs.symbols) || !attrs.symbols.length) {
      throw new Error(f('invalid enum symbols: %j', attrs.symbols));
    }
    this._symbols = attrs.symbols;
  
    this._indices = {};
    this._symbols.forEach(function (symbol, i) {
      if (!isValidName(symbol)) {
        throw new Error(f('invalid %s symbol: %j', this, symbol));
      }
      if (this._indices[symbol] !== undefined) {
        throw new Error(f('duplicate %s symbol: %j', this, symbol));
      }
      this._indices[symbol] = i;
    }, this);
  }