mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 12:45:11 +08:00
Hopefully clarify
This commit is contained in:
parent
36571edb95
commit
8ba3f53d2c
@ -226,9 +226,10 @@ Unless otherwise specified, the following applies to all code:
|
||||
```
|
||||
|
||||
37. Avoid functions whose behaviour / return type varies with different parameter types.
|
||||
Multiple return types are fine when appropriate (eg. SDKConfig.get() with a string param which
|
||||
returns the type according to the param given) but SDKConfig.get() with no args returning the
|
||||
whole config object is not: this could just be a separate function.
|
||||
Multiple return types are fine, but the function's fundamental behaviour should not
|
||||
change according its arguments: have two separate functions. For example,SDKConfig.get()
|
||||
with a string param which returns the type according to the param given but SDKConfig.get()
|
||||
with no args returning the whole config object is not: this could just be a separate function.
|
||||
|
||||
## React
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user