Mixing TypeScript and JavaScript is a common practice that I engage in daily. However, it is important to be aware that this combination can pose challenges at times. Therefore, I strongly recommend expediting the migration process to TypeScript.
If you are considering transitioning from JavaScript to TypeScript, I suggest referring to this helpful guide: https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html
Another useful resource on this topic is available here: https://basarat.gitbooks.io/typescript/content/docs/types/migrating.html. Keep in mind that while informative, the author may present a biased perspective, so exercise caution when implementing their suggestions.
There are numerous resources accessible for those looking to transition from JavaScript to TypeScript.
Based on my experience with migrating to TypeScript over the past month, converting existing JavaScript files to TypeScript by adding exports and necessary imports has proven to be effective. This method allows for seamless integration without disrupting functionality.
To ensure compatibility, it is advisable to exclusively utilize old JavaScript within your TypeScript codebase, rather than vice versa. Consider segregating your project into distinct packages, loading JavaScript globally as previously done, and creating typings specifically for the components integrated into TypeScript.