-
Notifications
You must be signed in to change notification settings - Fork 0
TypeScript Style Guide
Must only use ASCII letters, digits and underscores.
UpperCamelCase
: class, interface, type, enum, decorator, type parameters
lowerCamelCase
: variable, parameter, function, method, property, module alias
CONSTANT_CASE
: global constant values, including enum values
Abbreviations: Treat abbreviations like acronyms in names as whole words, i.e. use loadHttpUrl
, not loadHTTPURL
.
Type parameters: Type parameters, like in Array<T>
, may use a single upper case character or UpperCamelCase
.
Test names: Test method names may be structured with _
separators, e.g. testX_whenY_doesZ()
.
Only use comments for interface parameter declaration. This is done using JSDoc /** ... */
comments. Methods and Variables should clearly indicate purpose/functionality in the given name.
Not allowed: const x:number = 12;
Allowed: const minimumPasswordLength:number = 12;