Abc Style Guide
Names
- Use PascalCase for type names.
- Use PascalCase for enum values.
- Use PascalCase for global constants.
- Use camelCase for function names.
- Use camelCase for property names and local variables.
export type myType = string;
export type MyType = string;
enum Color {
RED,
BLACK
}
enum Color {
Red,
Black
}
export function notFoundHandler(_?: Context): never {
throw new Error();
}
export function NotFoundHandler(_?: Context): never {
throw new Error();
}
export function NotFoundHandler(flag: boolean): void | never {
if (flag) {
throw new Error();
}
}
export function notFoundHandler(flag: boolean): void | never {
if (flag) {
throw new Error();
}
}
const GLOBAL_CONFIG = {};
const GlobalConfig = {};
null
& undefined