Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 463 Bytes

File metadata and controls

23 lines (18 loc) · 463 Bytes

Undecorated classes with decorated fields migration

Automatically adds a Directive decorator to undecorated classes that have fields with Angular decorators. Also adds the relevant imports, if necessary.

Before

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

export class Base {
  @Input() isActive: boolean;
}

After

import { Input, Directive } from '@angular/core';

@Directive()
export class Base {
  @Input() isActive: boolean;
}