We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example: Now:
class AwesomeViewModel : ViewModel() { sealed class Parameter { object ObjectParameter : Parameter() data class ClassParameter(val param : Int): Parameter() } ... fun handleParameter(parameter : Parameter) { when (parameter) { ... } class Controller : UIViewController { let viewModel : AwesomeViewModel ... private func sendParameters() { viewModel.handleParameter(parameter: AwesomeViewModel.ParameterObjectParameter.shared) /* uuugh */ viewModel.handleParameter(parameter: AwesomeViewModel.ParameterClassParameter(param : Int32(0))) /* uuugh */ } }
Wish
class Controller : UIViewController { let viewModel : AwesomeViewModel ... private func sendParameters() { viewModel.handleParameter(parameter: .objectParameter) /* yeaaah */ viewModel.handleParameter(parameter: .classParameter(param: 0)) /* yeaaah */ } }
What extension will be generated for this
import ${shared module name} extension AwesomeViewModel { func handleParameter(parameterKs : AwesomeViewModelParameterKs) { self.handleParameter(parameter: parameterKs.sealed) } }
The same logic could be applied for constructors/initializers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example:
Now:
Wish
What extension will be generated for this
The same logic could be applied for constructors/initializers
The text was updated successfully, but these errors were encountered: