Skip to content

Commit

Permalink
Hopefully clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed May 10, 2024
1 parent 36571ed commit 8ba3f53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8ba3f53

Please sign in to comment.