Add Data.TaggedEnum example to taggedEnum JSDoc#6150
Add Data.TaggedEnum example to taggedEnum JSDoc#6150danielo515 wants to merge 1 commit intoEffect-TS:mainfrom
Conversation
The taggedEnum constructor was missing an example showing the common
pattern of using Data.TaggedEnum<{...}> as the type parameter. The
existing examples only showed the verbose union syntax and the generics
case.
https://claude.ai/code/session_01TxYNArXXjCjYYQ4yWbwvYY
|
| * ``` | ||
| * | ||
| * @example | ||
| * ```ts |
There was a problem hiding this comment.
It would be good to just have one example. Feel free to remove the other one.
There was a problem hiding this comment.
My example is indeed more concise and looks like a better practice. You suggest that the old example should be removed? How do you document such valid extra cases then?
There was a problem hiding this comment.
@tim-smart sorry for tagging you, but care to elaborate?
Type
Description
The taggedEnum constructor was missing an example showing the common pattern of using Data.TaggedEnum<{...}> as the type parameter. The existing examples only showed the verbose union syntax and the generics case.
Related
Conversation about it: https://discord.com/channels/795981131316985866/1486327719217201252