Type-safe navigation for Angular. One source of truth (your Routes array) → inferred Path union + strongly typed navigate command tuples. No codegen, no runtime cost, just TypeScript. ✨
This is an early release. Please try it out and file issues. 🚧
- ✅ Catch broken / misspelled route paths at compile time
- 🛠️ Refactors become safer (remove a route → instant red squiggles)
- ⚡ Zero runtime weight (pure types)
- 🔁 Works exactly the same as Angular Router except you now import
TypedRouterinstead ofRouterand useTypedRouterLinkinstead ofRouterLink(and you get type safety) - 🔌 Drop-in: keep your existing routing setup
- 📍
Path– union of every concrete reachable URL - 🧩
Commands– typed tuples forrouter.navigate([...]) - 💡 Get auto-completion for paths and commands
- 🚀
TypedRouter– typednavigate/navigateByUrl/createUrlTree - 🔗
TypedRouterLink– typed[routerLink]in templates - 🪄 It's all zero-runtime-weight types and interfaces, no code generation, no decorators, no custom builders
Installation guide: libs/typed-router/README.md.