Last active
May 31, 2022 20:20
-
-
Save NickersF/3c9caf8c7c42ce23d404279df796a21e to your computer and use it in GitHub Desktop.
TypeScript Conventions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Casing | |
// Pascal casing | |
StringVariable: string; | |
// Came casing | |
stringVariable: string; | |
// Snake casing | |
string_variable: string; | |
// Line spacing | |
someFunc() { | |
someInt: number = 0; | |
block { | |
} | |
block { | |
} | |
} | |
// Code blocks | |
someFunc(someParam: string) | |
{ | |
someInt: string = 0; | |
if (someInt == someParan) { | |
return someInt; | |
} | |
if (someInt == someParam) { | |
someInt++; | |
return someInt; | |
} | |
if (someInt == someParam) { | |
someInt++; | |
return someInt; | |
} else { | |
someInt--; | |
return someInt; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment