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
I have been writing documentation for my package, and I was a bit confused by the behavior of the @docs block. I think I understand it now, but the documentation could explain it better. The things the confused me were:
Specifying a particular method of a function.
The syntax
```@docs
length(::x)
is mentioned on the guide page, but not on the syntax page, making it easy to miss.
Specifying a type when outer constructors exist
For example, if you have
type MyType
a::Int
b::Float64
end
function MyType(a::Integer)
return MyType(a,a)
end
then
```@docs
MyType
will expand the docstring for the type definition but not the outer constructor. Using MyType(::Integer) is required to get the outer constructor docstring.
The text was updated successfully, but these errors were encountered:
I have been writing documentation for my package, and I was a bit confused by the behavior of the
@docs
block. I think I understand it now, but the documentation could explain it better. The things the confused me were:Specifying a particular method of a function.
The syntax
is mentioned on the guide page, but not on the syntax page, making it easy to miss.
Specifying a type when outer constructors exist
For example, if you have
then
will expand the docstring for the type definition but not the outer constructor. Using
MyType(::Integer)
is required to get the outer constructor docstring.The text was updated successfully, but these errors were encountered: