JSPrintManager integration with Vaadin

I am trying to integrate [JSPrintManager]
(https://www.neodynamic.com/products/printing/js-print-manager/download/) which is a 3rd party javascript object with Vaadin. I have managed to install the necessary packages with NPM. When i try to call any function or variable with executeJs for example UI.getCurrent().getPage().executeJs("JSPM.JSPrintManager.auto_reconnect = true") I get the following error: Uncaught ReferenceError: JSPM is not defined. When I try with window.JSPM.JSPrintManager.auto_reconnect = true; I get Uncaught TypeError: Cannot read property 'JSPrintManager' of undefined. There is a file called JSPrintManager.d.ts in the module package which is a type definition TypeScript file. I suspect that the file is not read properly. If I try to include the file with @JsModule/@Javascript I get the following error:

2021-04-26 16:42:34,221 ERROR [          ]
 dev-webpack  ERROR in ../node_modules/jsprintmanager/JSPrintManager.d.ts 1:8
2021-04-26 16:42:34,221 ERROR [          ]
 dev-webpack  Module parse failed: Unexpected token (1:8)
2021-04-26 16:42:34,222 ERROR [          ]
 dev-webpack  You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
2021-04-26 16:42:34,222 ERROR [          ]
 dev-webpack  > declare namespace JSPM {
2021-04-26 16:42:34,222 ERROR [          ]
 dev-webpack  |     class ClientJob {
2021-04-26 16:42:34,222 ERROR [          ]
 dev-webpack  |         _type: string;
2021-04-26 16:42:34,222 ERROR [          ]
 dev-webpack   @ ../target/frontend/generated-flow-imports.js 119:0-44

I have tried using typescript loaders with no success. Have anyone tried something similar with this or other 3rd party modules? Might there be something simple I have missed?

My Javacript includes looks like this:

@NpmPackage(value = "jsprintmanager", version = "3.0")
@JavaScript("jsprintmanager/JSPrintManager.js")
@JavaScript("jsprintmanager/JSPrintManager.d.ts")
@JsModule("@zip.js/zip.js/dist/zip-full.min.js")
@JavaScript("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.5/bluebird.min.js")
@JavaScript("https://code.jquery.com/jquery-3.2.1.slim.min.js")

Edit: I have managed to get it to work with including the script which was used for their demo tools instead of installing it through npm.

@JavaScript("https://jsprintmanager.azurewebsites.net/scripts/JSPrintManager.js")

18577657.js (95 KB)