You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeStringOrSymbol=string|symbol;functiongetKey(key: StringOrSymbol){return`${key} is the key`;// Error: Implicit conversion of a 'symbol' to a 'string' will fail at runtime.}functiongetKey2<SextendsStringOrSymbol>(key: S){return`${key} is the key`;// No error}
π Actual behavior
When using a value of a generic type that extends symbol there is no error on usage in template literal.
π Expected behavior
It is expected that the error "Implicit conversion of a 'symbol' to a 'string' will fail at runtime." is thrown when using a generic type that extends symbol in a template literal.
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
bug extends symbols template literal
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
When using a value of a generic type that extends symbol there is no error on usage in template literal.
π Expected behavior
It is expected that the error "Implicit conversion of a 'symbol' to a 'string' will fail at runtime." is thrown when using a generic type that extends symbol in a template literal.
The text was updated successfully, but these errors were encountered: