Naming scheme
It is important to stick to the following scheme for naming identifiers in your code. Because SALVO-TS uses some introspection/reflection techniques and does some code generation, if you don't stick to the following then you may introduce issues.
typescript// Class, Interface, Type => PascalCaseclass MyClass {}interface MyInterface {}type MyType = {}// DO NOT use 'I' or 'A' prefix on interface or abstract classesabstract class MyBaseClass {}interface MyInterface {}// Fields and methods => camelCaseclass MyClass {myField: string;// Arguments => camelCasemyMethod(myArg: string): void;}// Getters/setters => camelCaseclass MyClass {get myGetter() {return 'foo';}set mySetter(value: string) {}// Private fields should not have a '_' prefixprivate myField: string;// If you have a backing field that has the same name as it's getter/setters,// you may prefix it with a '_' - in all other cases, DO NOT use '_' prefixes// The field MUST be private in this case, or you will recieve a lint error.private _myField: string;get myField() {return this._myField;}set myField(value: string) {this._myField = value;}}// Generic types => 'T', 'TKey', 'TChild', etc.function identity<T>(obj: T): T { return obj; }class MyDictionary<TKey, TValue> {}function swapChild<T, TChild extends T['child']>(parent: T, newChild: TChild) {}// Constants (literals only, top-level) => UPPER_CASEconst BASICALLY_PI = 3.14;// Constants (any other situation) => camelCaseconst myFoo = makeFoo();function myFunction() {const basicallyTau = 6.3;}// All other identifiers => camelCaselet myVariable = 42;const myVariable = getFoo();function myFunction() {}
typescript// Class, Interface, Type => PascalCaseclass MyClass {}interface MyInterface {}type MyType = {}// DO NOT use 'I' or 'A' prefix on interface or abstract classesabstract class MyBaseClass {}interface MyInterface {}// Fields and methods => camelCaseclass MyClass {myField: string;// Arguments => camelCasemyMethod(myArg: string): void;}// Getters/setters => camelCaseclass MyClass {get myGetter() {return 'foo';}set mySetter(value: string) {}// Private fields should not have a '_' prefixprivate myField: string;// If you have a backing field that has the same name as it's getter/setters,// you may prefix it with a '_' - in all other cases, DO NOT use '_' prefixes// The field MUST be private in this case, or you will recieve a lint error.private _myField: string;get myField() {return this._myField;}set myField(value: string) {this._myField = value;}}// Generic types => 'T', 'TKey', 'TChild', etc.function identity<T>(obj: T): T { return obj; }class MyDictionary<TKey, TValue> {}function swapChild<T, TChild extends T['child']>(parent: T, newChild: TChild) {}// Constants (literals only, top-level) => UPPER_CASEconst BASICALLY_PI = 3.14;// Constants (any other situation) => camelCaseconst myFoo = makeFoo();function myFunction() {const basicallyTau = 6.3;}// All other identifiers => camelCaselet myVariable = 42;const myVariable = getFoo();function myFunction() {}