0

i compile my class:

export class Test implements baseTest 

Compile file have first string:

define(Object, ......,);

How i can compile withor define only like this:

var Test = (function(){..})();
3
  • I believe that is defined by the compilerOptions.module property of your tsconfig.json file. It compiles your modules differently based on which option you have selected. Try setting it to "CommonJS". Docs here Commented Aug 25, 2017 at 19:58
  • It may also be in conjunction with the compilerOptions.target property as well. Try targeting "ES5". You may have to play around with different combinations. Commented Aug 25, 2017 at 19:59
  • target only for class || function Commented Aug 25, 2017 at 20:40

1 Answer 1

1

Remove the export keyword. You're trying to make a module when it seems you want global code.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.