Fix test type imports for SimpleConstraint#58
Conversation
Fix test imports to use type-only imports for TypeScript interfaces. SimpleConstraint is a TypeScript interface that doesn't exist in JavaScript runtime, so it must be imported as a type. This resolves the "The requested module does not provide an export named 'SimpleConstraint'" error that occurred after updating Mocha to 11.7.5. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🚀 Benchmark ResultsPerformance comparison against merge-base bun-latest
🚀 Benchmark ResultsAll solutions to the sudoku
Finding one pentomino tiling on a 6x10 field
Finding ten pentomino tilings on a 6x10 field
Finding one hundred pentomino tilings on a 6x10 field
Updated: 2026-01-15T03:19:12.190Z node-22
🚀 Benchmark ResultsAll solutions to the sudoku
Finding one pentomino tiling on a 6x10 field
Finding ten pentomino tilings on a 6x10 field
Finding one hundred pentomino tilings on a 6x10 field
Updated: 2026-01-15T03:19:14.829Z node-24
🚀 Benchmark ResultsAll solutions to the sudoku
Finding one pentomino tiling on a 6x10 field
Finding ten pentomino tilings on a 6x10 field
Finding one hundred pentomino tilings on a 6x10 field
Updated: 2026-01-15T03:19:18.054Z node-25
🚀 Benchmark ResultsAll solutions to the sudoku
Finding one pentomino tiling on a 6x10 field
Finding ten pentomino tilings on a 6x10 field
Finding one hundred pentomino tilings on a 6x10 field
Updated: 2026-01-15T03:19:15.592Z |
Summary
Fix test imports to use type-only imports for TypeScript interfaces that don't exist in JavaScript runtime.
Problem
After updating Mocha to 11.7.5, tests were failing with:
This occurred because
SimpleConstraintis a TypeScript interface (type-only) that doesn't exist in the compiled JavaScript. When importing from the built JS files, the interface isn't available.Solution
Change the import to use TypeScript's
typeimport syntax:This tells TypeScript that
SimpleConstraintis only used for type annotations and should be stripped during compilation.Test plan
🤖 Generated with Claude Code