--- If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".
Please take a look at my repository on how you can include js files. I basically just treat the index.ts as a "wrapper container" and don't write any additional ts files. You can pretty much take your control and plug it into another "powerapps like framework" if you use my methodology. If you have any questions, please feel free to ask.