Re:Why We Chose Typescript
by moogly on Saturday July 01, 2017 @10:50AM
(#14677340)
TypeScript can use JSdoc annotations: https://github.com/Microsoft/TypeScript/wiki/JsDoc-support-i...
[ Parent
| on HN ]
Thanks, but from a bit of research it's not clear to me: does this mean that it's possible to use TypeScript to type-check javascript files which include these annotations, without using .ts at all?
Yes, by using --allowJS and --checkJS switches (can also be set in tsconfig.json).