When possible, the following are enforced through the code formatter (Prettier.js) and tslint rules.
We use spaces, not tabs.
- Use PascalCase for
typenames - Use UPPERCASE_WITH_SPACES for
enumvalues and constants - Use camelCase for
functionandmethodnames - Use camelCase for
propertynames andlocal variables - Use whole words in names when possible
- Use camelCase for file names (name files after the main Type it exports)
- Create a folder for each major subarea
- In the folder, create an index.ts which exports the public facing API for that subarea
- Tests can refer directly to the .ts files; other consumers should refer to the index.ts file
- Use inline sparingly since comments always become outdated quickly
- Use JSDoc style comments for public facing API
- Use 'single quotes'
- All strings visible to the user need to be externalized in a
messages.tsfile.
Use undefined, do not use null.