How seanl01/autodiff-ts works
Project type and purpose
• This is a TypeScript library (no “frontend” or “backend” sub-dirs) whose sole purpose is to provide automatic differentiation capabilities for mathematical expressions.
• The README confirms that “autodiff-ts” exposes functions to compute gradients via forward- or reverse-mode differentiation.
File structure
• Top level files:
• index.ts – the library’s public API entry point
• types.ts – core type definitions (e.g. DualNumber, Node, Graph)
• main.test.ts – test suite exercising the API
• tsconfig.json, package.json, bun.lock, package-lock.json – build and dependency configurations
• No subdirectories implies a single-module library. The key code lives in index.ts (importing types.ts and any helper modules).
Detail
• Call out the type-level API (types.ts) separately from executable logic (index.ts)
• Both forward and reverse differentiation paths