But! Now typescript and react are going to complain mightily about the whatever.js file you're importing. And oftentimes it will be minified, so now you're reading minified js, always a bad thing. So you start putting ignores at the top of the minified file, and it still doesn't work!
Don't go down this road. Instead, at the beginning of the process, find a react version of what you're looking for, preferably one that's packaged in npm. Using this will be straightforward.