kotools / types

Explicit types for Kotlin Multiplatform.
https://types.kotools.org
MIT License
90 stars 6 forks source link

🚚 Renaming argument of factory functions for `EmailAddress` #616

Closed LVMVRQUXL closed 8 months ago

LVMVRQUXL commented 8 months ago

📝 Description

For better consistency of our API, we want to rename the text argument of the factory functions for the EmailAddress type as value.

Here's an example of calling the EmailAddress.Companion.create(String) function from Kotlin code using named parameters:

EmailAddress.create(text = "contact@kotools.org") // Actual
EmailAddress.create(value = "contact@kotools.org") // Expected

[!IMPORTANT] This is an incompatible source change. See our versioning strategy for more details on when we can publish it.

✅ Checklist

augustomtt commented 8 months ago

hey! I want to tackle this issue, I'm going to create a PR soon!

LVMVRQUXL commented 8 months ago

Hello @augustomtt! 👋

Thank you for considering to work on this issue. 🙏

These functions will be deprecated by #623 in favor of using a public constructor instead. This design choice will improve the readability and the predictability of client's code when creating an email address. I've created the issue yesterday but I forgot to update this one. Sorry for the inconvenience. 😅

We have more good first issues that you might be interested in contributing, so feel free to tackle them. I will be happy to review your pull requests! 😁

P.S.: You might be interested in tackling #618 or #624 for the next release. 👀