With the more recent versions of Angular, a number of aspects can have functions instead of classes, with inject() as a replacement for constructor injection.
But so far (if that ever changes (probably not)) TS does not support the satisfies keyword with function, so I'm curious how people achieve something along the lines of:
const myRouteResolveThing = ({ queryParamMap }, _, someService = inject(SomeService)) => {
// ...
} satisfies ResolveFn<T>;
Of course you could do
const myRouteResolveThing: ResolveFn<T> = ({ queryParamMap }, _, someService = inject(SomeService)) => {
// ...
};
But then you "lose" the 3rd param when you want to unit test the function 🤔