buildless-types

Configures type checking for JavaScript and TypeScript projects without a build step.

4.4k|1.3k|Updated Jan 23, 2012
One-click install
npx skills add https://github.com/paulirish/dotfiles --skill buildless-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: buildless-types
Source: https://github.com/paulirish/dotfiles/tree/main/agents/skills/buildless-types
Command: npx skills add https://github.com/paulirish/dotfiles --skill buildless-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams want static type safety but dislike maintaining a compilation pipeline. This Skill configures projects so browser JavaScript gets full type checking via JSDoc annotations and Node.js executes TypeScript files natively, eliminating tsc build steps, ts-node, and tsx entirely.

Core Features & Use Cases

  • JSDoc-based browser typing: Enforces pure .js files with modern @import type annotations so code runs directly in browsers while retaining IDE type checking.
  • Native Node.js TypeScript execution: Configures erasableSyntaxOnly, verbatimModuleSyntax, and related tsconfig flags so Node.js v24.11.0+ runs .ts files directly without transpilation.
  • Unified tsconfig guidance: Prevents anti-patterns like explicit include arrays and fragmented per-package tsconfig files in monorepos.
  • Use Case: A developer starting a new ES module project asks the agent to set up type checking; the Skill produces a compliant package.json and tsconfig.json plus coding rules for both browser and Node.js code.

Quick Start

Set up type checking for my project without a build step using JSDoc for browser code and native TypeScript execution in Node.js.

Frequently Asked Questions about buildless-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up TypeScript type checking without a build step?

Use JSDoc annotations in .js files for browser code and erasable TypeScript syntax in .ts files for Node.js. Configure tsconfig.json with noEmit, checkJs, erasableSyntaxOnly, and verbatimModuleSyntax, then run tsc --noEmit for checking.

How to run TypeScript files directly in Node.js without ts-node?

Node.js v24.11.0 and later executes .ts files natively when they use only erasable syntax. Run scripts directly with node script.ts instead of npx tsx or ts-node, and include the .ts extension in import paths.

What TypeScript features are not allowed with erasable syntax?

Erasable syntax forbids enums, namespaces, constructor parameter properties, and experimentalDecorators because they require code transformation. Use discriminated unions instead of enums to model variants.

Can I use JSDoc types in browser JavaScript with modern imports?

Yes, TypeScript 5.5+ supports the @import annotation, such as , replacing legacy typedef import patterns. This keeps .js files browser-runnable while providing full type checking.

Why should I avoid include arrays in tsconfig.json?

Explicit include fields override the default behavior of scanning all project files, causing new files or extensions like .mjs to be silently excluded from type checking. A single unified root tsconfig without include covers the whole repository.