text: 
  import Type from './Type';
  
  
  import TypeParameterApplication from './TypeParameterApplication';
  import { addConstraints, collectConstraintErrors, constraintsAccept } from '../typeConstraints';
  
  var TypeAlias = function (_Type) {
    babelHelpers.inherits(TypeAlias, _Type);
  
    function TypeAlias() {
      var _ref;
  
      var _temp, _this, _ret;
  
      babelHelpers.classCallCheck(this, TypeAlias);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = babelHelpers.possibleConstructorReturn(this, (_ref = TypeAlias.__proto__ || Object.getPrototypeOf(TypeAlias)).call.apply(_ref, [this].concat(args))), _this), _this.typeName = 'TypeAlias', _this.constraints = [], _temp), babelHelpers.possibleConstructorReturn(_this, _ret);
    }
  
    babelHelpers.createClass(TypeAlias, [{
      key: 'addConstraint',
      value: function addConstraint() {
        for (var _len2 = arguments.length, constraints = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          constraints[_key2] = arguments[_key2];
        }
  
        addConstraints.apply(undefined, [this].concat(babelHelpers.toConsumableArray(constraints)));
        return this;
      }
    }, {
      key: 'collectErrors',
      value: function collectErrors(validation, path, input) {
        var type = this.type;
  
        var hasErrors = false;
        if (type.collectErrors(validation, path, input)) {
          hasErrors = true;
        } else if (collectConstraintErrors(this, validation, path, input)) {
          hasErrors = true;
        }
        return hasErrors;
      }
    }, {
      key: 'accepts',
      value: function accepts(input) {
        var type = this.type;
  
        if (!type.accepts(input)) {
          return false;
        } else if (!constraintsAccept(this, input)) {
          return false;
        } else {
          return true;
        }
      }
    }, {
      key: 'acceptsType',
      value: function acceptsType(input) {
        return this.type.acceptsType(input);
      }
    }, {
      key: 'apply',
      value: function apply() {
        var target = new TypeParameterApplication(this.context);
        target.parent = this;
  
        for (var _len3 = arguments.length, typeInstances = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
          typeInstances[_key3] = arguments[_key3];
        }
  
        target.typeInstances = typeInstances;
        return target;
      }
  
      /**
       * Get the inner type or value.
       */
  
    }, {
      key: 'unwrap',
      value: function unwrap() {
        return this.type.unwrap();
      }
    }, {
      key: 'hasProperty',
      value: function hasProperty(name) {
        var inner = this.unwrap();
        if (inner && typeof inner.hasProperty === 'function') {
          return inner.hasProperty(name);
        } else {
          return false;
        }
      }
    }, {
      key: 'getProperty',
      value: function getProperty(name) {
        var inner = this.unwrap();
        if (inner && typeof inner.getProperty === 'function') {
          return inner.getProperty(name);
        }
      }
    }, {
      key: 'toString',
      value: function toString(withDeclaration) {
        var name = this.name,
            type = this.type;
  
        if (withDeclaration) {
          return `type ${ name } = ${ type.toString() };`;
        } else {
          return name;
        }
      }
    }, {
      key: 'toJSON',
      value: function toJSON() {
        return {
          typeName: this.typeName,
          name: this.name,
          type: this.type
        };
      }
    }]);
    return TypeAlias;
  }(Type);
  
  export { TypeAlias as default };