How to import an external js library on TS?

I’ve tried putting to the page. But when it’s being built, I got error message showing that the js couldn’t be recognized.

What is the right way to do so?