Types, constructors, and docstrings

If I have a type with a convenience constructor

struct Foo
    x
    y
end

Foo(x) = Foo(x, x+1)

should I document

  1. the type,
  2. the constructor(s),
  3. or both?

If I document both, I am not sure cross-references [`Foo`](@ref) go to the right place.

Related: if I did not know that Vector(N) created a vector of length N with eltype Any, how could I find that out from the help system? (not the documentation, but the docstrings proper).

1 Like