pmneo / ts-importer

MIT License
73 stars 8 forks source link

import statements are broken if the final import item contains a line break #48

Open angelfraga opened 6 years ago

angelfraga commented 6 years ago

if the final import item contains a line break, the new import will corrupt it by being added inside the brackets.

import { 
    Component
} from '@angular/core';

@Component()
class Test {
}

And then you add another one, for example, Subject

import {
import { Subject } from 'rxjs';
  Component
} from '@angular/core';

@Component()
class Test {
  property: Subject
}