typescript
Google TypeScript Style Guide
Official Google TypeScript coding standards for consistent, maintainable code.
Golden Rules
- Use TypeScript strictly — enable
strictmode intsconfig.json - Prefer interfaces over type aliases for object shapes
- Never use
any— useunknownwhen type is truly unknown - Use
constby default,letwhen reassignment needed, nevervar - Avoid non-null assertions (
!) — handle nullability explicitly - Use explicit return types on public functions and methods
- Prefer
readonlyfor properties that should not change
Quick Reference
Naming Conventions
| Element | Convention | Example |
More from testdino-hq/google-styleguides-skills
shell
Google's official Shell scripting style guide. Covers Bash scripting, naming conventions, error handling, portability, and shell best practices.
3python
Google's official Python style guide extending PEP 8. Covers type annotations, Google-style docstrings, imports, naming conventions, f-strings, comprehensions, and exception handling. Enforces 80-char line length and 4-space indentation.
3google-styleguides-skills
Complete collection of Google's official style guides for 17 languages. Includes TypeScript, JavaScript, Python, Java, Go, C++, C#, Swift, Objective-C, HTML/CSS, AngularJS, Shell, R, Common Lisp, Vim Script, JSON, and Markdown. Production-ready coding standards used across Google's engineering organization, formatted for AI agent consumption.
3cpp
Google's official C++ style guide. Covers headers, naming conventions, formatting, classes, memory management, RAII, smart pointers, and modern C++ features.
2java
Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.
2