I'm new to TypeScript and I'm trying to use a regular library that was written in vanilla JavaScript but I'm getting an error when trying to execute the code.
index.ts:
import OpenSubtitles from 'opensubtitles-api';
new OpenSubtitles;
when trying to node dist/index.js
:
new opensubtitles_api_1.default;
TypeError: opensubtitles_api_1.default is not a constructor
edit:
It has nothing to do with the duplicated thread as this one is related to TypeScript and not ES6 itself, and the other thread is talking about old JavaScript syntax compatibility with ES6 but the library I'm trying to link is written in ES6 (using classes and so on, so that is not a duplicated thread).