Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
require("amd-loader");
import someModule = require('../mymodule')
var someClass = new someModule.MyNamespace.MyClass();
it becomes:
define(["require", "exports", '../mymodule'], function (require, exports, someModule) {
require("amd-loader");
var someClass = new someModule.MyNamespace.MyClass();
then it gives me define is not defined
error
When I modify it as below, error goes away.
require("amd-loader");
define(["require", "exports", '../mymodule'], function (require, exports, someModule) {
var someClass = new someModule.MyNamespace.MyClass();
Then I get Cannot read property 'MyClass' of undefined
error
How can I get fix these error and get it work as expected as mentioned in that Q&A?
My environment is Visual Studio 2015 and I compile with AMD options as module system(obviously I tried each options). I am doing angular protractor e2e tests
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.