... | @@ -241,6 +241,10 @@ Stork build system provides the `rake fmt:ui` command to format the Typescript c |
... | @@ -241,6 +241,10 @@ Stork build system provides the `rake fmt:ui` command to format the Typescript c |
|
|
|
|
|
Developers should avoid using the `any` type because it disables type checking and may lead to errors. Whenever possible, explicit types should be used instead. In some cases, using `any` (e.g., in the unit tests) can be practical to avoid defining new types just for mocking a response. In the production code, the use of `any` SHOULD be avoided.
|
|
Developers should avoid using the `any` type because it disables type checking and may lead to errors. Whenever possible, explicit types should be used instead. In some cases, using `any` (e.g., in the unit tests) can be practical to avoid defining new types just for mocking a response. In the production code, the use of `any` SHOULD be avoided.
|
|
|
|
|
|
|
|
## Comparison with `null`
|
|
|
|
|
|
|
|
In most cases, the comparisons with `null` should be performed using the double-equality operator (i.e., `==`), rather than triple-equality operator (i.e., `===`) because the former yields `true` when the compared value is `null` or `undefined`. The latter yields `true` only when comparing against `null`. When developers compare a value with `null` they typically think about a non-existing or unset value, not specifically a `null` value. Narrowing down the comparison to a `null` may cause hard-to-debug issues when the value appears to be `undefined`. Therefore, developers should prefer the double-equality operators in all the cases when they think about something that has no particular value. The triple-equality operator should only be used in comparisons with `null` or `undefined` when both cases are explicitly tested and the comparison results have different meaning for different cases.
|
|
|
|
|
|
# Python Style
|
|
# Python Style
|
|
|
|
|
|
We use Python for system tests. Python-specific coding guidelines are currently TBD.
|
|
We use Python for system tests. Python-specific coding guidelines are currently TBD.
|
... | | ... | |