I do get the TypeScript compiler error TS5037: Cannot compile external modules unless the '--module' flag is provided.
I am using TypeScript 0.9.1.1 und Visual Studio 2012.
Where can I set the --module option in Visual Studio?
Web Essential seems to no longer support this option in the dialog.
Thankx, Harry
Update:
I have a configuration file (config.ts) for my project. This file contains many statements as the following:
export var loggedInUserId: number = 0;
There are no other statements as the one before. Do I have to define a class or module around it?
I was having this problem in Visual Studio 2013, even with that setting above set correctly. It turns out there's a project-level setting as well. If you go to Project Settings on the project with TypeScript (highlight the project and type Alt+Enter), then go to the TypeScript Build tab, and select AMD under "Module System"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With