"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _Null = _interopRequireDefault(require("./Null"));

// Copyright 2017-2019 @polkadot/types authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.

/**
 * @name Unconstructable
 * @description
 * A type that should not be constructed
 */
class Unconstructable extends _Null.default {
  constructor() {
    super();
    throw new Error('Unconstructable should not be constructed, it is only a placeholder for compatibility');
  } // eslint-disable-next-line @typescript-eslint/no-unused-vars


  static with(typeDef) {
    return class extends Unconstructable {};
  }

}

exports.default = Unconstructable;