1

I found the TypeScript Build tab in the properties of a typescript project. And on that tab was an interesting feature called: 'Combine JavaScript output into file: '. This seems to work like intended but it seems to mess up intellisense for some reason.

When the option to combine the js output files is on, intellisense stops working (ctrl+space doesn't do anything). But syntax highlighting, building, and refactoring still works. It does this until the option is turned off and VS has restarted.

I installed the Visual Studio 2013 Update 2 CTP 2 and removed the original typescript plugin (because it's included in the update?). Web Essentials is enabled, it doesn't crash any more with the new update, and disabling it doesn't fix the intellisense.

What is going on? How do I get this to work?

2 Answers 2

1

For what it's worth, this issue seems to be solved in newer versions of typescript. What version of typescript are you using?

If you can't upgrade your typescript version, does using something outside of the built in single file output work for you? If so, you should look into using grunt-ts-bundle.

grunt.initConfig({
  bundle: {
    main: {
        rootModule: 'plat',
        license: './license.txt',
        version: '<%= pkg.version %>',
        src: './index.html',
        dest: [
            './out.ts'
        ],
        preSave: function (data, done) {
            done(data);
        }
    }
  }
});

grunt.loadNpmTasks('grunt-ts-bundle');

This is just a grunt task for running ts-bundle:

https://github.com/Platypi/ts-bundle

Then you can wrap files in your src (`./index.html) like this:

<!-- ts-bundle-start -->
<script src="app/models/user.model.js"></script>
<script src="app/controllers/users.controller.js"></script>
<!-- ts-bundle-end -->

This would combine your user.model.js and users.controller.js file into one out.js file.

If this does work for you and you have any other questions or need clarification just let me know - Good luck!

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

Comments

0

I ran into similar issues with Typescript and VS2013 and different versions of typescript. I had stayed with older, . 95, of typescript for quite some time to avoid this issue.

I am happy to report that this issue has gone away with the most recent builds of the ts plugin.

Combine into one file, compile on save and intellisense all now work together for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.