refactor(ivy): remove ngBaseDef (#33264)

Removes `ngBaseDef` from the compiler and any runtime code that was still referring to it. In the cases where we'd previously generate a base def we now generate a definition for an abstract directive.

PR Close #33264
This commit is contained in:
crisbeto
2019-10-25 19:45:08 +02:00
committed by Andrew Kushnir
parent 3505692f75
commit 14c4b1b205
29 changed files with 310 additions and 660 deletions

View File

@ -214,6 +214,37 @@ describe('inheritance', () => {
expect(log).toEqual(['on changes!']);
});
it('should be inherited from undecorated super class which inherits from decorated one', () => {
let changes = 0;
abstract class Base {
// Add an Input so that we have at least one Angular decorator on a class field.
@Input() inputBase: any;
abstract input: any;
}
abstract class UndecoratedBase extends Base {
abstract input: any;
ngOnChanges() { changes++; }
}
@Component({selector: 'my-comp', template: ''})
class MyComp extends UndecoratedBase {
@Input() input: any;
}
@Component({template: '<my-comp [input]="value"></my-comp>'})
class App {
value = 'hello';
}
TestBed.configureTestingModule({declarations: [MyComp, App]});
const fixture = TestBed.createComponent(App);
fixture.detectChanges();
expect(changes).toBe(1);
});
});
describe('of bare super class by a directive', () => {