Annotate a binding type to callback functions#3353
Conversation
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
I think you should consider the other option (using an arrow function). I don't understand why ESLint would report issues about |
|
I think the advice part about using an arrow function is about the imported function … which is an arrow function already
To my understanding, that's because its type is declared in an interface and used as such with |
|
You'd have to set up a repository with the error reproduced there so I could take a look at it. |
What: Adding typescript annotations about some functions binding
Why: Because of the eslint rule @typescript-eslint/unbound-method being triggered when using the
csscallback function :How:
cssis typesciptly bound to aClassNamesContentinterface while it is actually a void-bounded functionChecklist: