Re:JSR Is Not Another Package Manager
by mbarneyme on Thursday April 25, 2024 @12:38PM
(#40159725)
JSDoc provides the exact same level of type safety as TypeScript, because the TypeScript Language Server/CLI themselves are what does the type checking. Using JSDoc removes the need to transpile your code before executing it. You still want to type-check your code (with a `tsc --noEmit` or similar) in CI, just like you'd run unit tests/a linter/etc.
[ Parent
| on HN ]
Re:JSR Is Not Another Package Manager
by crabmusket on Friday April 26, 2024 @09:51PM
(#40176387)
Yes, that's my point. JSDoc isn't an alternative to TypeScript if you want your types to actually be checked.