deno.land / x / abc@v1.3.3 / docs / style_guide.md
// Bad
export type myType = string;
// Good
export type MyType = string;
// Bad
enum Color {
RED,
BLACK,
}
// Good
enum Color {
Red,
Black,
}
// Bad
export function notFoundHandler(_?: Context): never {
throw new Error();
}
// Good
export function NotFoundHandler(_?: Context): never {
throw new Error();
}
// Bad
export function NotFoundHandler(flag: boolean): void | never {
if (flag) {
throw new Error();
}
}
// Good
export function notFoundHandler(flag: boolean): void | never {
if (flag) {
throw new Error();
}
}
// Bad
const GLOBAL_CONFIG = {};
// Good
const GlobalConfig = {};
null
& undefined
undefined
.Version Info