Typescript Import completion format

I have activated the setting 

Options | Environment | InteliSense | Completion Behaviour | Import Completion (Ctrl+Alt+Space) 

and it is giving me suggestions and importing the class that I select.

 

However, the format it generates is:

import * as Classname from "../path/to/class";
public myClass = new Classname.ClassName();

I would like the format to be 

import { ClassName } from "../path/to/class";
public myClass = new ClassName();

 

I have set the import format options for TypeScript to use the ES6 style import, but this has had no effect.
Does anyone know a way to configure this?

 

0
3 comments

Hello|

 

Thank you for contacting us.

Please check the following setting ReSharper | Options | Code Editing | TypeScript | Code Style | 'Prefer qualifying instead of adding module aliases'.

Please let us know if it helps.

Thank you.

0
Avatar
Permanently deleted user

Thank's for the reply.

I checked that box and it had no effect, I am still getting import * as Classname from "../path/to/class"; 
I also tried restarting Visual Studio.

I am running JetBrains ReSharper Ultimate 2017.1.3  Build 108.0.20170613.154143 at the moment. 

Thanks

0

Thank you for the reply, Nicholas!

 

I've filed corresponding bug in our issue tracker - https://youtrack.jetbrains.com/issue/RSRP-465628

You are welcome to comment or vote for it.

Thank you.

0

Please sign in to leave a comment.