These are VS Code coding guidelines. Please also review our Source Code Organisation page.
We use tabs, not spaces.
type
namesenum
valuesfunction
and method
namesproperty
names and local variables
types
or functions
unless you need to share it across multiple componentstypes
or values
to the global namespacefunctions
, interfaces
, enums
, and classes
=>
over anonymous function expressions(x) => x + x
is wrong but the following are correct:x => x + x (x, y) => x + y <T>(x: T, y: T) => x === y
for (let i = 0, n = str.length; i < 10; i++) { if (x < 10) { foo(); } } function f(x: number, y: string): void { }
export function x(…) {…}
instead of export const x = (…) => {…}
. One advantage of using the function
keyword is that the stack-trace shows a good name when debugging.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4