Replies: 1 comment 2 replies
-
Yes. Sorry.
I think if the reader is used to that kind of signature they can scan from |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to ask a question/start a discussion about typing functions.
I saw that you (@vogelino) tend to write signatures like this:
giessdenkiez-de/src/state/Actions.tsx
Line 13 in 612d5f0
Where I like to write them like this:
Why do I prefer the one over the other?
If I would have to share this function signature with another function I just could do extract it by copying it into a type and I'm done.
In your way of typing it the description of the types and the implementation are tightly coupled. Any reason why you write it your way?
Another thing I do often is use the
function
keyword on top level functions.So my rule is to only use
const thing = () …
if I'm in a closure and usefunction
in the global scope. Any reason why you don't usefunction
at all?@lucasoeth @dnsos I'd also like to hear your opinion about
this
.Lets assume that all the things said in #293 are below.
Beta Was this translation helpful? Give feedback.
All reactions