Your new code (typescript in this case) should never reference the old code. Old code is the only thing that knows about new code.
The reason being is if your new code ever knows about your old code, your new code will carry on old code forever. You can never escape.
But if only old code knows about new code. Your new code is perfectly clean.
For this typescript conversion problem the nice thing is you can configure typescript to allowJs and your existing code can import compiled typescript