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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@azerothjs/typescript-plugin

v2.1.0

Published

AzerothJS TypeScript language-service plugin - resolves .azeroth imports with real types in tsserver/editors

Readme

@azerothjs/typescript-plugin

AzerothJS TypeScript language-service plugin - resolves .azeroth imports with real types in tsserver/editors

npm License: MIT Node >= 22


Part of AzerothJS - the fine-grained fullstack framework.


Overview

A TypeScript language-service plugin that teaches tsserver (the engine behind VS Code's built-in TypeScript support, and any editor that uses it) to resolve .azeroth imports from .ts files with their REAL exported types - default, named, and type exports. It is the AzerothJS counterpart to @vue/typescript-plugin.

With the plugin installed a consuming app can delete its hand-written declare module '*.azeroth' shims: a barrel like

export { default as Breadcrumb } from './breadcrumb.component.azeroth';
export type { BreadcrumbCrumb } from './breadcrumb.component.azeroth';

type-checks against the component's actual signature instead of any.


Install

Requires Node >= 22 and TypeScript 5 or 6 (typescript >=5 <7, a required peer dependency).

npm install -D @azerothjs/typescript-plugin typescript

Register it in the consuming project's tsconfig.json:

{
    "compilerOptions": {
        "plugins": [{ "name": "@azerothjs/typescript-plugin" }]
    }
}

In VS Code, also select "Use Workspace Version" of TypeScript (or rely on the AzerothJS VS Code extension, which contributes the plugin automatically), so the editor's TypeScript server loads the plugin.


How it works

The plugin reuses the same projection as the editor language server (@azerothjs/language-service): a .azeroth file is compiled to a virtual TypeScript module whose markup is rewritten to h() calls and whose surrounding code - every export included - is preserved verbatim. Two decorations make that seamless inside tsserver:

  • Resolution + loading: an import of ./x.azeroth (or the extensionless ./x) resolves to the REAL on-disk .azeroth path, whose content is served as the compiled virtual module - so TypeScript infers real types across the .ts -> .azeroth boundary.
  • Result-span remapping: navigation results that land inside a .azeroth file (Find References, Go to Definition, Rename, highlights) are translated from virtual-code offsets back to SOURCE offsets through the projection's offset mapping - so references select the exact identifier, definitions land on the component name, and a cross-file rename edits the right ranges.

Scope: editors, not tsc

[!IMPORTANT] TypeScript language-service plugins run only inside tsserver (editors), not inside the command-line tsc. This is a TypeScript limitation, not a choice here - it is also why vue-tsc exists. So:

  • In the editor, this plugin gives real .azeroth types with no shim.
  • For a command-line type-check gate, use azeroth-tsc (from @azerothjs/language-server) - the combined .ts + .azeroth checker (the vue-tsc equivalent): it type-checks .ts files with .azeroth imports resolved to real types, and .azeroth files themselves.

Related

See the monorepo README for the full framework. Related tooling: