DEV Community

Julian Dierkes
Julian Dierkes

Posted on

Do we need JS naming conventions in TS?

I tend to ignore JavaScript naming conventions that are based on visibility or type like "_aPrivateVariable" or "anObservable$", because they are already transparent through the use of Typescript.
How do you handle these naming conventions and why?

Discussion (2)

Collapse
vitale232 profile image
Andrew Vitale

I tend to favor explicit over implicit. Yeah, there's tons of into when I hover in the IDE, but we don't always have an IDE! I read a lot of code on GitHub and our private repos, and explicit notation really helps me at "mental runtime".

Collapse
juliandierkes profile image
Julian Dierkes Author

I guess you are right. I don't work too much with bare code (Without using an IDE) but in that case it may be be pretty handy.