Returns a JSON representation of this.
@override Map<String, Object?> toJson() => { 'runtimeType': 'ComponentType', 'modules': modules.map((e) => e.toJson()).toList(), };