I would include "stop using the I prefix at interfaces", which is a very common pattern for TS developers. I don't know how that C# convention invaded TypeScript world. (Microsoft behind both of them probably is a coincidence since they discourage it)
Some developers make the case that not using it cause weird code like class Dog implements Dog, but that actually shows issues with the code design (in this case, is the Dog class really necessary? If it is, than the interface Dog probably isn't).
You're right that the "I" prefix convention has been a common pattern in the TypeScript world, and it's valuable to discuss its implications. I agree that avoiding it can lead to cleaner code and better alignment with TypeScript's idioms. Your example of the class Dog implementing Dog is a thought-provoking one that highlights potential code design issues.
You've given me an idea for an insightful follow-up discussion on this topic. Thank you for sharing your perspective!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article!
I would include "stop using the I prefix at interfaces", which is a very common pattern for TS developers. I don't know how that C# convention invaded TypeScript world. (Microsoft behind both of them probably is a coincidence since they discourage it)
Some developers make the case that not using it cause weird code like
class Dog implements Dog, but that actually shows issues with the code design (in this case, is the Dog class really necessary? If it is, than the interface Dog probably isn't).You're right that the "I" prefix convention has been a common pattern in the TypeScript world, and it's valuable to discuss its implications. I agree that avoiding it can lead to cleaner code and better alignment with TypeScript's idioms. Your example of the class Dog implementing Dog is a thought-provoking one that highlights potential code design issues.
You've given me an idea for an insightful follow-up discussion on this topic. Thank you for sharing your perspective!