13 ms·
We have the exact same problem with Typescript. We've solved it with an extremely judicious use of the linter, which prohibits certain constructs, certain patt
by oorza 7y ago
We have the exact same problem with Typescript. We've solved it with an extremely judicious use of the linter, which prohibits certain constructs, certain patterns, and tries its best to get rid of weird features. The first thing I thought when I read `callAsFunction` was "sounds like a new lint rule someone has to write to disable that garbage."
I'm not sure how invested your team is in Swift, but since we do nothing but Typescript, the investment in time (2-3 days for one the lead engineer) tweaking the linter has more than paid off ten-fold in the months since.
- vosper 7y ago> We've solved it with an extremely judicious use of the linter, which prohibits certain constructs, certain patterns, and tries its best to get rid of weird features. This is one of my concerns with adopting Typescript in my team. Would you please share more info about the kinds of things you prohibit, and why you chose them?
- sezna 7y agoNot the OP but what system are you coming from? If JS, then TS is a great improvement. If anything else...probably not going to be a fun time.
- mikewhy 7y agoIt shouldn't be much of a concern if you're already writing JS, which usually already comes with judicious use of the linter.
- STRiDEX 7y agoI work at an all typescript shop and I really recommend checking out https://github.com/xojs/eslint-config-xo-typescript#readme https://github.com/xojs/eslint-config-xo-typescript#readme as this is a full time open source developer that has to field all kinds of PR's from strangers. So it saves them time if the linter flags things they're trying to avoid.
- joshspankit 7y agoI have not looked in to Typescript myself yet, but I would say that an “AirBnB style guide”-type linter ruleset could make picking it up much easier.
- zionic 7y agoThis. I'm already adding callAsFunction to my team's linter, should be a stupid simple match since you can block declaring the capability in anything.