Re:TypeScript Is Surprisingly OK for Compilers
by usrusr on Friday August 18, 2023 @07:42AM
(#37174344)
Yeah, having just jumped into ts after a long js hiatus since back when The Good Parts was still surprising, it's quite awesome to see how much of what I assumed to be "ts stuff" is actually just postdeluvian js. Makes ts more attractive, not less. I do wonder however of it was possible to identify parts of that language superset that are fully redundant (as in not even required for exotic edge cases) and let loose some draconian linter?
[ Parent
| on HN ]
Re:TypeScript Is Surprisingly OK for Compilers
by jakubmazanec on Friday August 18, 2023 @09:28AM
(#37175319)
You already can kinda do that using ESLint and rules like https://eslint.org/docs/latest/rules/no-restricted-syntax, https://eslint.org/docs/latest/rules/no-restricted-propertie... or https://eslint.org/docs/latest/rules/no-restricted-imports.
Re:TypeScript Is Surprisingly OK for Compilers
by usrusr on Friday August 18, 2023 @12:16PM
(#37177826)
Sure, but that's still seems quite mix and match, anything goes, choose your own adventure. There are many positives about this approach, but as a learner a little more common ground between codebases would certainly be appreciated.
Re:TypeScript Is Surprisingly OK for Compilers
by jakubmazanec on Saturday August 19, 2023 @10:46AM
(#37189339)
True. I always thought that we should have additional mode stricter than https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe....