Are there any naming conventions for decorators (e.g. PascalCase vs camelCase)? I have seen both used in various code snippets.
But as object-oriented derivations of JavaScript, such as TypeScript, AngularJS and Node. JS, gained popularity, camel case has become the standard. Variable naming conventions, such as snake case or camel case, are standardized differently for each programming language.
Names are case-sensitive, lowercase and uppercase are different. Start variable names with a letter, use camelCase for names. Variable names should be self-descriptive, describing the stored value. Boolean variables are usually prefixed with is or has .
Decorators are a stage 2 proposal for JavaScript and are available as an experimental feature of TypeScript.
TypeScript documentation follows @camelCase
.
Angular/Ionic documentation follows @PascalCase
.
In the absence of any other official guidance - you may choose the one from these 2 that you like, but be consistent in your own codebase.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With