Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unqualified JSDoc member references #44202

Merged
merged 2 commits into from
May 26, 2021

Commits on May 21, 2021

  1. Add unqualified JSDoc member references

    This allows unqualified references like:
    
    ```ts
    class Zero {
     /** @param buddy Must be {@link D_HORSE} or {@link D_DOG}. */
     deploy(buddy: number) { }
     static D_HORSE = 1
     static D_DOG = 2
    }
    ```
    
    I surveyed @see and @link again to estimate how common this is. I found
    a little over 200 uses, which is around 2%. Sorted by frequency, this
    *is* the next feature on the list, along with the `module:` prefix.
    So I think this is about the right point to stop adding code.
    
    In this case, however, I liked most of the uses -- there were a lot
    of deprecated functions that referenced a function just below, where it
    would be wordy to qualify the name, but the reader would benefit from a
    link.
    
    Note that unqualified references do *not* work inside type or object
    literals. The code I ended up with is quite complicated and I didn't
    observe any uses in the wild.
    
    Fixes #43595
    sandersn committed May 21, 2021
    Configuration menu
    Copy the full SHA
    362ef85 View commit details
    Browse the repository at this point in the history
  2. Remove type/object literal container check

    Since they don't work anyway
    sandersn committed May 21, 2021
    Configuration menu
    Copy the full SHA
    8d25eea View commit details
    Browse the repository at this point in the history