"Correct" way to document methods using `where` in the declaration?

I have a function whose declaration starts with

function union(X::T, Y::T) where {T<:BipartiteNetwork}

I was wondering if there is a community standard about how to write the docstring for this method? I have currently

"""
    union(X::T, Y::T) where {T<:BipartiteNetwork}

Merges two bipartite networks ...
"""
function union(X::T, Y::T) where {T<:BipartiteNetwork}

Are there other solutions / practices I should be aware of?

SIGNATURES from DocStringExtensions.jl is designed to help with this: Home · DocStringExtensions.jl

Does that work in your case?

2 Likes

Probably! I need to look at this package more closely. Thanks!