Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 695 Bytes

naming_conventions.md

File metadata and controls

16 lines (12 loc) · 695 Bytes

Typescript naming conventions

  • camelCase for functions, variable names, class members and methods, interface methods and members, tlype members
  • PascalCase for class, interface, type, namespace, enum, enum members names
  • Don't use null or undefined explicitly
  • I use prettier for formatting typescript files.
  • Prefer single quotes, use semicolons, use 2 spaces. (Check prettier configuration)
  • Name source files with camelCase
  • Use type when you might need a union or intersection
  • Use interface when you want extends or implements

References