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

svelte-typecheck

v0.8.0

Published

A drop-in svelte-check replacement: up to 11× faster, zero dependencies.

Readme

svelte-typecheck

A drop-in svelte-check replacement: up to 11× faster, zero dependencies.

svelte-typecheck type-checks Svelte components with bun check, tsrs, tsgo or tsc. It takes the same options and prints the same output, but runs a command-line checker on the components instead of TypeScript's language service, which makes it up to 11 times faster. It runs on Node 22+ or Bun.

- "check": "svelte-check --tsconfig ./tsconfig.json"
+ "check": "svelte-typecheck --tsconfig ./tsconfig.json"

A cold run on carbon-components-svelte (1,200+ components) takes:

| Checker | Time | vs. svelte-check | | :-------------------- | :----- | :--------------- | | svelte-check | 40.5 s | 1× | | TypeScript 6 (tsc) | 18.9 s | 2.1× | | TypeScript 7 (tsgo) | 7.9 s | 5.1× | | tsrs | 3.7 s | 11.1× | | bun check | 3.6 s | 11.3× |

The benchmarks have more, including runs after a change.

--watch checks each save again, and Ctrl-C says what the last check found.

Quick start

bun add -d svelte-typecheck
bunx svelte-typecheck

It exits with 1 when there's an error, 0 otherwise, and 2 when called wrong, such as with an unknown option.

CLI

# Check the project with the nearest tsconfig and the project's TypeScript
svelte-typecheck

# Check with another checker
svelte-typecheck --checker tsgo
svelte-typecheck --checker tsrs
svelte-typecheck --checker bun

# Check part of a project
svelte-typecheck --workspace packages/ui
svelte-typecheck --tsconfig ./tsconfig.app.json
svelte-typecheck --components "src/lib/**/*.svelte"

# Check every component, without a tsconfig, skipping two folders
svelte-typecheck --no-tsconfig --ignore dist,build

# Print one line per diagnostic, which is easier for scripts to read
svelte-typecheck --output machine

# Annotate a PR's diff from GitHub Actions
svelte-typecheck --output github

# Print each problem with its code and source lines, for a coding agent.
# This is the default under Claude Code, Codex, or with AGENT set.
svelte-typecheck --output agent

# Print errors only, or fail on warnings as well
svelte-typecheck --threshold error
svelte-typecheck --fail-on-warnings

# Ignore one compiler warning
svelte-typecheck --compiler-warnings a11y_missing_attribute:ignore

# Check types only, without compiling, when a linter such as svelte-lint
# reports the compiler's warnings
svelte-typecheck --diagnostic-sources js

# Report only files changed from HEAD, or since the branch left main, and the files that import them
svelte-typecheck --changed
svelte-typecheck --since origin/main

# Record the current diagnostics, then report only new ones
svelte-typecheck --baseline errors.json --update-baseline
svelte-typecheck --baseline errors.json

# Also fail when fixed diagnostics are still in the baseline
svelte-typecheck --baseline errors.json --strict-baseline

# Check again on every change
svelte-typecheck --watch

# Also check pages in the config's other extensions, such as .md
svelte-typecheck --pages

# Pass the checker its own flags after --
svelte-typecheck --checker tsrs -- --fast             # tsrs's fast mode
svelte-typecheck --checker tsrs -- --maxMemory 4G     # cap tsrs's memory
svelte-typecheck --checker tsgo -- --checkers 8       # 8 checker threads
svelte-typecheck --checker bun -- --threads 4         # 4 bun check threads
svelte-typecheck -- --noUncheckedIndexedAccess        # a stricter option, without editing the tsconfig
svelte-typecheck -- --generateTrace trace             # a trace of where the checker spends its time
svelte-typecheck --checker tsrs -- --fast --checkers 8  # several flags, in order

# Run on a process kept alive between runs, for agents and hooks
svelte-typecheck --daemon

# Ignore the cache from earlier runs
svelte-typecheck --no-incremental

API

import { typecheck } from "svelte-typecheck";

const { diagnostics } = await typecheck({ checker: "tsgo" });

for (const d of diagnostics) {
  // file is absolute; line and column are 1-based, in the .svelte source
  console.log(
    `${d.file}:${d.line}:${d.column} ${d.severity} ${d.code} ${d.message}`,
  );
}

Docs