Replies: 3 comments
-
From the discussion so far some of us want to indicate if the property has been implemented using JS getter or setter. But I think we shouldn't burden readers about the internal implementation and we should go with But if we want to address getter and setter then we could have something like: |
Beta Was this translation helpful? Give feedback.
-
No strong feeling here but:
Finally, are there write-only properties? |
Beta Was this translation helpful? Give feedback.
-
This discussion was discussed synchronously during the #writing-docs meeting held on April 16, 2024. Here are the (slightly edited for clarity) minutes from that portion of the meeting: Question: Should we use "Returns" in the description of a property?
ACTION ITEM: @wbamberg will file a PR for the API property template in the writing guidelines Note: not using "returns" as a "guideline" not a "rule". We don't need to do an update of all existing content. |
Beta Was this translation helpful? Give feedback.
-
When we document a property of an interface, should we say, for example:
or:
To me the second is awkward and mystifying. It's a property, not a method.
I raised this before and had feedback that it's used as an indicator that the property is read only. However to me that's quite an indirect way of indicating this, especially since we also say "read only" in the property's description.
I'm not advocating that we go and update all the property pages that use "returns", just to have a guideline for reviewers in the future. If "returns" is actually better for read-only properties, we should say that. Currently we say nothing:
Beta Was this translation helpful? Give feedback.
All reactions