no0x9d / ngx-strongly-typed-forms

Strongly typed definitions for Anglulars `@angular/forms`
MIT License
59 stars 11 forks source link

Fix/ivy #26

Open RohanHart opened 4 years ago

RohanHart commented 4 years ago

This fixes the staticTemplates errors in Ivy but loses type safety in nested controls. The core of the fix is export type AbstractControl<T> = NgAbstractControl & TypedAbstractControl<T>; which does't lose too much type safety as the FormGroup, etc., override the intersection types with stronger ones.

A small benefit is that non-typed methods do not need to be included here as they will be inherited.