When working with Typscript, I've encountered an issue where it can't handle a 'Token' in the context of an Angular2 provide()
aliasing function. I'm unsure if there's a specific setting in the typescript compiler to address this problem or if I must resort to using a string type alias instead.
For instance, within the main.ts
bootstrapping function, the code would look something like:
bootstrap(AppComponent, [ROUTER_PROVIDERS, provide(**alias_token**, Child1aComponent)]);
In my experience, Typescript (specifically in webstorm) shows an error stating 'Unresolved variable or type alias_token.'
While there is an alternative 'provide' function that accepts a string as its first parameter, I am keen on utilizing the Token version if there is a way to do so.
Does anyone have any insights or solutions for this issue?