Repository navigation
v1.2.1 — Major DX upgrade: smarter autocomplete & clearer TypeScript typings
✨ Highlights
This release is focused on developer experience: improved IDE autocomplete, safer configuration objects,
and clearer “hover docs” — without changing runtime behavior.
If you use VS Code / WebStorm (or any TypeScript-powered editor), you’ll immediately notice:
- better suggestions for options (
algorithm,normalize,hybrid, etc.) - clearer inline documentation for each option
- smarter return types when using
explain: true
✅ What changed
1) Stronger TypeScript declarations (.d.ts)
- Expanded and clarified public API types
- Improved descriptions on key options and behavior
- Added more precise types for algorithm-specific options (
jaroWinkler,tokenSort,tokenSet,hybrid)
2) Overloads for better IDE inference
The typings now correctly infer return values based on explain:
rate(..., { explain: true })→ returns an object (RateExplainResult)rate(..., { explain: false })or without explain → returns a number
Same improvement applies to:
rankCandidates()(returns explained items whenexplain: true)findBestMatch()(returns explained best match whenexplain: true)
3) Clearer documentation in tooltips
Key options are now documented directly in hover tooltips, including:
- algorithm guidance (when to use what)
- normalization behavior
spaceInsensitivebehavior (opt-in, char-based only)
🛠 Runtime impact
- No runtime changes
- No behavior changes unless you update your own code usage
- This is a DX-only release: safer types + better autocomplete
🔄 Versioning
- 1.2.0 → 1.2.1
- Patch release (backward compatible)
❤️ Thanks
Thanks to everyone testing and providing feedback -- keep the issues and PRs coming!