3 ms·
Thank you for your reply. I should have pointed out that with JS I also mean TS. We write everything in TS which gets transpiled into JS. About your approach.
by zwarag 5y ago
Thank you for your reply. I should have pointed out that with JS I also mean TS. We write everything in TS which gets transpiled into JS.
About your approach. I'm not sure if this is applicable to our situation. The problem is not only the complexity but also a cost and human resource matter. If some updates could be done automatically, the cost could be held down.
However I totally agree with you on the reduction complexity.
- austincheney 5y agoI also write TS. Here is my solution in my personal project that would never fly at work. In your tsconfig.json set: * alwaysStrict: true * noImplicitAny: true * strictFunctionTypes: true Then I go a step further and wrote my own ESLint rules to: * eliminate classes * eliminate this * eliminate bind, call, and apply * eliminate addEventListener * eliminate try/catch I also use typescript-eslint package to lint against the TypeScript directly. That sounds draconian but it removes a tremendous amount complexity, laziness, and stupidity. Everything comes strongly typed without a bunch of guesswork.