import withProps from './with-props.js';
import '../../utils/types/array.js';
import '../../utils/inheritance.js';
import '../../utils/types/object.js';
import '../../utils/types/iterable.js';
import '../../utils/types/set.js';
import 'crypto';
import 'bs58';
import 'multiformats/bases/base58';
import 'varint';
import '../../utils/encoding/ss-58.js';
import 'blake2b';
import '../../utils/types/bytes.js';
import '../../utils/interfaces.js';
import '../../utils/assert.js';
import '../../utils/error.js';
import '../../utils/types/string.js';
import './typed-enum.js';
import './with-base.js';
import './with-catch-null.js';
import './with-eq.js';
import './any-of.js';
import './with-from.js';
import './with-from-json-bytes.js';
import './typed-null.js';
import './create-placeholder.js';
import './typed-struct.js';

/**
 * Extends supplied class which must be a successor of `TypedStruct`/`TypedEnum` by adding/overriding
 * its property class.
 *
 * @template C
 * @template K
 * @param {C} klass
 * @param {string} prop
 * @param {K} PropClass
 * @param {function(*, string, K): *} handleNested
 * @returns {C}
 */
function withProp(
  klass,
  prop,
  PropClass,
  handleNested = withProp,
) {
  return withProps(klass, { [prop]: PropClass }, (k, _) => handleNested(k, prop, PropClass));
}

export { withProp as default };
//# sourceMappingURL=with-prop.js.map
