effect
effect copied to clipboard
From Discord: Confusion Over Schema.NonEmpty Naming for NonEmptyString Implementation
Summary
Summary:
-
User (mr_diamond): The user is confused about the naming of
Schema.NonEmptyin the context of implementing aNonEmptyString. They question why it isn't namedNonEmptyStringand whether its purpose is supposed to be obvious from its type (Schema<string, string, never>). -
User (gcanti): The user suggests that renaming it to
NonEmptyStringin the next minor release could make its purpose clearer.
Key Takeaways:
- Naming Confusion: There is confusion regarding the name
Schema.NonEmptyand its intended use for non-empty strings. - Type Clarity: The current name does not make it immediately obvious that it pertains to non-empty strings, even though its type might suggest it.
- Potential Rename: There is a suggestion to rename
Schema.NonEmptytoNonEmptyStringin a future minor release to improve clarity.
Discord thread
https://discord.com/channels/795981131316985866/1256256752379236424