soates / Auto-Import

vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
165 stars 62 forks source link

Prevent adding import when same already exists #56

Open obkdev opened 7 years ago

obkdev commented 7 years ago

Occasionally, auto-import will import a type that has already been imported. For example, whilst typing the following:

var source = Observable.create(observer => {

a second import was added as follows:

import { Observable } from 'rxjs/Observable';

Annoyingly, I am not able to reliably reproduce this.

obkdev commented 7 years ago

It seems that there are two Observable options here, one of these will add no extra imports and one will create an identical extra one, causing a compile error. screen shot 2017-02-28 at 23 55 58