More TypeScript Support in ReSharper 8.2

When we announced TypeScript Support in ReSharper 8.1, we promised you a lot more to come. It’s time to deliver on that promise. Here are some of the things we’ve added in ReSharper 8.2:

  • Support for generics as well as many improvements to ReSharper’s type resolution mechanisms.
  • Create from usage lets you start using code constructs first and create them later.
    ReSharper 8.2 TypeScript Create from usage
    This mechanism supports creation of many different constructs such as creation of modules or enum members from usage. ReSharper now also honors Member Generation settings for usage-generated TypeScript code.
  • Compiler-defined errors (only syntax errors, for now) are highlighted. These errors are accompanied with over 50 quick-fixes:
    ReSharper 8.2 TypeScript Make all overloads public or private
  • Naming support has been added: ReSharper will now check your code against the TypeScript naming settings:
    ReSharper 8.2 TypeScript Inconsistent naming inspection
    and will offer to fix things for you:
    ReSharper 8.2 TypeScript Naming quick-fix
  • Navigation up and down the inheritance hierarchy (Alt+Home and Alt+End respectively) now works for both type declarations as well as type members.
  • Support for modules in navigation (Go to Symbol Shift+Alt+T/Go to Everything Ctrl+T):
  • The Import Module context action lets you automatically add the right import statements when an external module is used:
    ReSharper 8.2 TypeScript Import Module
  • Smart completion support (Ctrl+Alt+Space): ReSharper can filter out a completion list leaving only structurally compatible subtypes, as shown below:
    ReSharper TypeScript Smart Completion
  • Jasmine support, including support for version 2.0:
    ReSharper 8.2 TypeScript Jasmine Support

    To add support for Jasmine via TypeScript, simply include both original Jasmine (jasmine.js) as well as the DefinitelyTyped package (jasmine.d.ts) and then reference the .d.ts file via the <reference> construct, and you’re good to go. Your project will likely look something similar to this:

    ReSharper TypeScript Jasmine Project Structure

As always, we aim to deliver additional new features (and improvements to existing ones) in the near future. Meanwhile, we hope you enjoy this update that is available starting ReSharper 8.2 EAP. Until next time!

This entry was posted in ReSharper Tips&Tricks and tagged , , , . Bookmark the permalink.

9 Responses to More TypeScript Support in ReSharper 8.2

  1. peter says:

    When i try to run jasmine debugger within visual studio 2013 a get such error:
    http://imageshack.com/a/img59/1695/qtel.png

    What should i have installed to be able to run jasmine test runner?

    • Victor Kropp says:

      Peter, please check that path to phantomjs is correctly set in ReSharper – Options – Unit Testing – JS Tests. Also, please note, that debugging of tests written in JavaScript/TypeScript is not yet supported.

  2. David Hanson says:

    This is fantastic! Loving typescript support!!

  3. Pingback: ReSharper 8.2リリース – dotTrace、dotCoverもアップデート | JetBrains ブログ

  4. T.J. says:

    This is great, we make heavy use of TypeScript, and support was lacking.
    I tried writing tests in TS (jasmine says it’s supported), but how do I include libraries and the test source? In the past I included them with a reference, but the TypeScript compiler doesn’t allow me to reference a js file. Let’s say I need angular or underscore for my tests, how would I include them?

    • Dmitri Nesteruk says:

      It would appear that you have contacted our support engineers directly with regards to this issue. If this is so, they should be able to help you further.

      • P.M. says:

        I filed a feature request some time ago regarding this exact issue: http://youtrack.jetbrains.com/issue/RSRP-389196

        Unfortunately it was closed as duplicate, but in the other issue it wasn’t picked up.

      • Mike Chaliy says:

        I have the same issue, I cannot find any way to include js file under the test.
        Chutzpah test adapter to solve this issue adds additional section:
        ///

        This makes test runner to peak up correct JS file and successfully run tests.

        Personally for me is blocking issue, I just cannot see any way how to use tests without being able to reference library.

  5. Neeraj says:

    In typescript support, the intellisense for the functions/members of super class are not showing up.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">