Function: tokenToString()
tokenToString(
token):string
Produces a detailed string representation of a DI token or provider definition.
- Class constructors → their
name. - Symbols →
symbol.toString(). - Provider objects:
- If it has a
providekey, recurses on that token. - If it has
useClass, shows[useClass: ClassName]. - If it has
useValue, shows[useValue: <type>].
- If it has a
- Fallback →
String(token).
Parameters
token
unknown
The injection token or provider object to stringify.
Returns
string
A descriptive string for debugging or error output.