I am trying to execute a JS code in the Angular typescript, it is a code that is not mine, the case is that the code outside Angular works perfectly, once inside the compiler I get many errors, among them I cannot solve this:
(function (global, factory) {
console.log("Adminlscn.js en uso");
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.adminlte = {}));
}(this, (function (exports) { 'use strict';....
I don't know why it doesn't catch or define or global, typescript is supposed to be an extension of JS, all js code should work
The terminal give me that mistake:
But the @types has been installed and i have this at tsconfig.json:



typeofis certainly available in Typescript. But it doesn't know anything about the varaiblesdefineandglobal. How and where are they defined? Could you please post them to the question?tsconfig.json,package.jsonand project file which is screenshotted in question. Information provided in question is not helpful for answering the question. Accepted question will work but that denies the purpose of why would you even use Typescript in the first place...