161 releases (breaking)

Uses new Rust 2024

new 0.135.0 Jun 8, 2026
0.133.0 May 26, 2026
0.123.0 Mar 30, 2026
0.106.0 Dec 29, 2025
0.22.1 Jul 28, 2024

#3 in Programming languages

Download history 773/week @ 2026-03-03 15702/week @ 2026-03-10 17716/week @ 2026-03-17 17537/week @ 2026-03-24 13825/week @ 2026-03-31 13247/week @ 2026-04-07 13673/week @ 2026-04-14 12385/week @ 2026-04-21 13924/week @ 2026-04-28 18027/week @ 2026-05-05 19908/week @ 2026-05-12 23187/week @ 2026-05-19 23466/week @ 2026-05-26 20486/week @ 2026-06-02

90,131 downloads per month
Used in 102 crates (4 directly)

MIT license

430KB
9K SLoC

Oxc Isolated Declarations

TypeScript isolated declarations transformer for generating .d.ts files.

Overview

This crate implements TypeScript's isolated declarations feature, which generates TypeScript declaration files (.d.ts) from source code without requiring full type checking. This enables faster builds and better incremental compilation.

Key Features

  • Fast declaration generation: Generate .d.ts files without full type checking
  • TypeScript 5.5+ compatibility: Implements the latest isolated declarations specification
  • Incremental builds: Enables faster TypeScript compilation workflows
  • Comprehensive support: Handles classes, functions, interfaces, and complex types

Architecture

Isolated Declarations Concept

Isolated declarations allow generating TypeScript declaration files without full type inference by requiring that:

  • All exported functions have explicit return types
  • All exported variables have explicit types
  • Type information is locally available

Implementation Details

  • AST transformation: Convert implementation AST to declaration AST
  • Type extraction: Extract and preserve type information
  • Export analysis: Determine what needs to be included in declarations
  • Error reporting: Provide helpful diagnostics for missing type annotations

Benefits

  • Faster builds: No full type checking required
  • Incremental compilation: Each file can be processed independently
  • Parallel processing: Multiple files can be processed simultaneously
  • Simplified tooling: Easier to integrate into build systems

This implementation follows the TypeScript compiler's approach while leveraging oxc's performance-oriented architecture.

Dependencies

~4.5MB
~72K SLoC