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
which makes sense. TypeScript gives no errors or warnings with the colon-value. While you can use a colon to specify a type when assigning a value, that does not seem to be what is happening here. I can see no reason why anyone would intentionally write the original code.
π Expected behavior
TypeScript reports an error.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
π Search Terms
static
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/MYGwhgzhAEBiD29oG8BQ0PQgFzNglsNAEZgBOAXNNmQK4CmA3KgL6qrDwB2E8I9AOhDwA5gAoE8AaTIBKRtAD0i6LS4ATegDN8XeutRA
π» Code
π Actual behavior
I spotted this in production code.
The developer intended to write
which makes sense. TypeScript gives no errors or warnings with the colon-value. While you can use a colon to specify a type when assigning a value, that does not seem to be what is happening here. I can see no reason why anyone would intentionally write the original code.
π Expected behavior
TypeScript reports an error.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: