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
{{ message }}
This repository was archived by the owner on Jul 19, 2022. It is now read-only.
When you’re reading API docs in a typed language, you almost always want to know the type signature, as that gives you context to understand the prose which fills in more details. Right now, you have to jump down to where the source code is to see the signature. I find myself jumping down there and then back to read the rest of the docs, which is not a good experience.
Note that while users can manually include type signatures in their docs, I think it’s better to standardize on the API doc viewing experience rather than relying on everyone following the same convention.
Originally we elided the signature from the top of the definition because it was redundant with the signature included with the source code. With docs, there’s often quite a bit of spacing between the docs and the signature so I think it makes sense to include it at the top.
One idea that might be worth exploring - include the source code at the top, but folded so only the signature is shown. Immediately below that is the docs. 95% of the time, when browsing API docs I don’t need to see the source code (if the docs are good, anyway).
Regardless of where the signature is or if it’s included in two places, I suspect Share should start out with the source code folded.