I create a websitesite, where i want to include a javascript file using classes. But i do not know how to use it in a browser environment. The javascript file looks like this and can not be changed:
"use strict";
/* tslint:disable */
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v12.0.15.0 (NJsonSchema v9.13.22.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------
// ReSharper disable InconsistentNaming
Object.defineProperty(exports, "__esModule", { value: true });
class Client {...}
exports.Client = Client;
class JComponent {...}
exports.JComponent = JComponent;
class Anonymous {...}
exports.Anonymous = Anonymous;
class SwaggerException extends Error {...}
exports.SwaggerException = SwaggerException;
function throwException(message, status, response, headers, result) {...}
//# sourceMappingURL=ProductCatalogClient.js.map
When i am trying to import it like this:
<script src="ProductCatalogClient.js"></script>
I become the error: Uncaught ReferenceError: exports is not defined at ProductCatalogClient.js:9
How do i include it correctly to have access to the Client class?