You can typecheck pure js files using JSDoc.
https://www.typescriptlang.org/docs/handbook/jsdoc-supported...