3 ms·
I was not happy having to do TypeScript on a project thinking in your point about slowing you down which initially is completely true if you are forced to tslin
by sebringj 8y ago
I was not happy having to do TypeScript on a project thinking in your point about slowing you down which initially is completely true if you are forced to tslint it to hell. However, I've done a 180 in that TypeScript is very nice when you relax the tslinter and you sprinkle it on as you go which gives you that extra feeling of being auto-guarded when its just more practical but without getting in your way which is exactly what Ryan was saying in his Deno approach. I've saved loads of run-time errors from VSCode knowing types ahead of time for example.
- acemarke 8y agoCould you summarize what settings you used for the TS compiler and tslint for that "sprinkle it on but keep it out of the way" approach?
- sebringj 8y agoBasically you turn off as many settings as possible that make things impractical. Its more of how you work, not a catch-all. I have VSCode and installed a supporting library to work with it. Basically it tells me what's wrong and how to disabled it as well. I either inline disable it or go to the specific tslint rule and disable globally. It is most difficult when you have to use another person's biolerplate that was built without typescript AND tslint is turned all the way up.
- machiaweliczny 8y agoTo have nice prototyping & development I use it more like typechecker than compiler. I set "transpileOnly" for tsc loader and set different more strict command like "npm typecheck" to "tsc --no-emit ./src/index.ts". I usually add only strict null checks and it's enough for me. I also disable most of tslint as it's way too heavy in standard CRA app for example. This way you get hints from tsc in editor so you see what is wrong but at the same time you can run your app without fixing everything upfront.