When attempting to `import "myscript";` to use in a REST API the `XMLHttpRequest` instance in undefined. Assumption was made: ```typescript // We are writing some browser module here so the no import found should be ignored // eslint-disable-next-line no-undef var request = new XMLHttpRequest(); ``` In order to fix this the dependencies needs to be introduced. ```typescript var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; ```
When attempting to
import "myscript";to use in a REST API theXMLHttpRequestinstance in undefined.Assumption was made:
In order to fix this the dependencies needs to be introduced.