TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

VS 2015 Preview language service not recognize --module (TypeScriptModuleKing) flag

Open flaticols opened this issue 11 years ago • 6 comments

Hi!

I'm build TypeScript from 4e5a3ae69534ba0fbdc4af1ee0cb2173c6901877 commit and release-1.4 branch. After this. in VS where use export keyword for modules . classes and etc. Visual Studio highlight as error Cannot compile external modules unless the '--module' flag is provided

But it's compiled well fine.

Examples:

export module Foo {}
module Foo {}
export = Foo;

In project file "TypeScriptModuleKind" property set as "commonjs" or "amd".

flaticols avatar Jan 05 '15 15:01 flaticols

I'm blocked by this issue. I'm using the latest from master with Visual Studio 2015 Preview.

image

The module system is set to CommonJS:

image

image

Here are the steps I did:

git pull
jake LKG
npm install -g
explorer built\local
  • copy typescriptServices.js to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript

ctaggart avatar Jan 08 '15 02:01 ctaggart

I forgot to update the tsc.js to C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.1, so I was getting the error when building too. This is no longer blocking me, but still pops up as an error in Error List.

ctaggart avatar Jan 08 '15 03:01 ctaggart

@ctaggart yeap. But

still pops up as an error in Error List

And this is a problem.

flaticols avatar Jan 08 '15 09:01 flaticols

Can you give this a try on TypeScript 1.4 release?

mhegazy avatar Feb 03 '15 03:02 mhegazy

In 1.4 it's works

flaticols avatar Feb 09 '15 08:02 flaticols

thanks @flaticols

mhegazy avatar Feb 09 '15 21:02 mhegazy