npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

typedoc-plugin-dt-links

v1.0.4

Published

Adds support for linking references to types declared in `@types` packages to their source code on GitHub.

Downloads

182

Readme

typedoc-plugin-dt-links

Adds support for linking references to types declared in @types packages to their source code on GitHub.

Note: If TypeDoc's useTsLinkResolution option is off, this plugin won't work.

If VSCode can follow a link into an @types package, this plugin should also be able to provide links to that package.

Note: Using TypeDoc before 0.26.8 may result in links which go to the start of the doc comment rather to the symbol name.

Supports TypeDoc 0.23.14 through 0.26.x.

Options

  • warnOnUnstableDtLink

    Defaults to true. If set, and an @types package is referenced which is newer than this plugin, produces a warning as this plugin won't be able to produce a stable link.

    This plugin is automatically published weekly, so if you are upgrading @types packages and rebuilding docs more frequently than that, you may want to disable this option as the link won't be dead long enough to matter.

Changelog

See full changelog here.

How It Works

TypeDoc exposes an API which plugins can use to provide links to external symbols. TypeDoc will also provide plugins with a ReflectionSymbolId object which plugins can use to determine where TypeScript thinks the link should resolve to.

This plugin uses that object to figure out which @types package a symbol belongs to by checking the path for node_modules/@types and constructs a link to GitHub for the package.

The constructed link must include a version reference in order to not break when the referenced package receives updates. As @types packages do not include any information about what git hash they were published with, this plugin attempts to infer what the git hash for the version must have been by parsing the "Last Updated" date out of the README.md file for the plugin and matching it to a list of all commits in DefinitelyTyped published with this package. If the package was released more recently than this plugin, the plugin can't know what git hash should be used and will instead use master as the reference.