You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, in stdlib, we can find different incompatible documentation styles (for example, using two slashes or three slashes).
We need to define a set of rules as a separate document in the documentation, which will describe the main rules for how documentation in the code is formatted.
In PR (or RFC document), each rule should have a description of the reason why it is done this way (for example, why references to other symbols should be wrapped with [``], the answer: for clarity and easier implementation in tooling).
The text was updated successfully, but these errors were encountered:
The current overarching idea of the doc comments is that they simply represent the actual docs displayed on https://docs.tact-lang.org. And that they don't need a JSDoc parser — they are just simple markdown, so could be parsed with markdown parser. This makes the public documentation the source of truth, and makes doc comments more humane.
In particular:
This partially solves the 'Available since ...' and any other possibly error-prone things as you've pointed out, since everything is copied from the docs"
The reference docs have a rather strict structure and a simple way to convert the doc text to the doc comment.
Regarding the second point:
First, the heading #... becomes a text description depending on the object. If that's a function we're documenting, then it becomes a way to describe how that function is called / a bit about its semantics: "Global function", "Extension [mutation] function", "Storage function" — global called as is, now(); extension is called as a method on the value of the target self type, like: .storeInt(); and finally, storage is called like self.functionOfThisContract().
Then goes the Badge, converted to the textual description: "Available since Tact 1.5", for example.
Then goes the rest, although with removing the doc pages-specific "noise", such as markdown links.
Finally, the "See:" part, that links to the corresponding item in the docs and, if present, also adds links from the "Useful links" aside.
This approach and style was somewhat outlined in the description to this commit: 8237edb
Of course, everything above applies to the revised, /// comments, and doesn't yet apply to the comments that wasn't updated yet and for that reason stay with previous // comments.
Right now, in stdlib, we can find different incompatible documentation styles (for example, using two slashes or three slashes).
We need to define a set of rules as a separate document in the documentation, which will describe the main rules for how documentation in the code is formatted.
In PR (or RFC document), each rule should have a description of the reason why it is done this way (for example, why references to other symbols should be wrapped with [``], the answer: for clarity and easier implementation in tooling).
The text was updated successfully, but these errors were encountered: