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

@bdrk/typescript-config

v2.1.0

Published

Baseline TypeScript compiler configuration for Bedrock projects.

Readme

TypeScript Config

This repository contains the baseline TypeScript compiler configuration for all Bedrock projects that use TypeScript 5 or newer. It is verified against TypeScript 5.x, 6.x, and 7.x.

Two configurations are published:

| Entry point | For | | -------------------------------- | ------------------------------------------------------ | | @bdrk/typescript-config | Node.js services and libraries compiled with tsc | | @bdrk/typescript-config/react | React applications built with a bundler (Vite, Next, …) |

Referencing this Configuration

You can reference this config by installing the NPM package in your project:

npm install --save-dev @bdrk/typescript-config

Then replace the contents of your tsconfig.json file with:

{
  "extends": "@bdrk/typescript-config",
  "include": ["./src/**/*"]
}

You can overwrite settings defined in this configuration by specifying them in your project's tsconfig.json.

Defaults

This configuration targets Node.js projects with the conventional layout of sources in src/ compiled to dist/:

  • target: ES2022 / lib: ["ES2022"] — safe for all maintained Node.js releases
  • module: nodenext / moduleResolution: nodenext — modern Node.js module semantics (emits CommonJS unless your package.json declares "type": "module")
  • rootDir: src / outDir: dist — resolved relative to your project root; TypeScript 6+ requires an explicit rootDir, so override it if your sources live elsewhere
  • resolveJsonModule, esModuleInterop, and skipLibCheck are enabled
  • strictNullChecks is enabled (full strict mode is not)

React Projects

React applications should extend the react entry point instead:

{
  "extends": "@bdrk/typescript-config/react",
  "include": ["./src/**/*"]
}

It builds on the base configuration and changes the following:

  • jsx: react-jsx — the React 17+ automatic runtime, so .tsx files compile without importing React into scope
  • lib: ["DOM", "DOM.Iterable", "ES2022"] — required by @types/react-dom
  • module: esnext / moduleResolution: bundler — matches how bundlers actually resolve imports, and drops the nodenext requirement that relative imports carry a .js extension
  • isolatedModules and verbatimModuleSyntax — enforce what single-file transpilers (esbuild, SWC, Babel) can safely handle, so type-only imports and re-exports must say import type / export type
  • moduleDetection: force — every file is a module, so top-level names in files without imports don't collide in the global scope
  • strict: true — the full strict family rather than the base's strictNullChecks alone. In React this mainly buys noImplicitAny on props, event handlers, and useRef initializers, plus stricter checking of callback props
  • types: [] — no ambient type packages are loaded by default, so browser code doesn't pick up Node.js globals (for example, setTimeout returning NodeJS.Timeout)
  • noEmit: true and declaration: false — the bundler produces the output; tsc only type-checks

rootDir and outDir are inherited from the base configuration and remain pointed at src/ and dist/. rootDir is still enforced under noEmit, so override it if your sources live elsewhere.

Ambient Types

Because types is empty, add whatever ambient packages your toolchain needs. For Vite, this is what makes import.meta.env and asset imports type-check:

{
  "extends": "@bdrk/typescript-config/react",
  "compilerOptions": {
    "types": ["vite/client"]
  }
}

Other common entries are ["node"] for Next.js projects with server-side code, and ["@testing-library/jest-dom"] for test configurations.

React Component Libraries

The react entry point assumes a bundler owns the build. If you are publishing a React component library compiled with tsc, re-enable declaration output:

{
  "extends": "@bdrk/typescript-config/react",
  "compilerOptions": {
    "noEmit": false,
    "declaration": true,
    "declarationMap": true
  }
}

Common Overrides

Non-React browser projects should add the DOM libraries:

{
  "extends": "@bdrk/typescript-config",
  "compilerOptions": {
    "lib": ["DOM", "ES2022"]
  }
}

Projects using legacy (pre-TC39) decorators, such as NestJS or TypeORM services, should set:

{
  "extends": "@bdrk/typescript-config",
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}