angular/ngcc-validation

ionic-angular

mhartington opened this issue · 4 comments

Post compiling, seems ivy is adding these static ng<type>Defs in the d.ts files for ionic.

export declare class ValueAccessor implements ControlValueAccessor {
    .... 
    static ngBaseDef: ɵngcc0.ɵɵBaseDef;
}

When attempting to serve a project, an error is being thrown

ERROR in node_modules/@ionic/angular/dist/directives/control-value-accessors/value-accessor.d.ts:16:23 - error TS2314: Generic type 'ɵɵBaseDef<T>' requires 1 type argument(s).

16     static ngBaseDef: ɵngcc0.ɵɵBaseDef;

What can we do to provide this information?

This issue has been resolved since 8.2.0-next.0 or somewhere thereabouts. The compiler will now emit the required type parameter for ɵɵBaseDef, so upgrading to 9.0.0-next.1 should resolve this particular issue.

There's still an issue for types that are generic themselves, in which case their generic type arguments are not provided. Since there's plans to phase out base definitions altogether, this has been left unfixed.

Let's wait renovate to trigger an update so we can double check and add the package to our list of passing libraries.

These 2 packages from ionic seems to be passing

    "@ionic/angular": "4.6.2",
    "@ionic/storage": "2.2.0",

https://github.com/mgechev/ngcc-validation/blob/ee0b68a7fda5a86d1b3907f99abc1f1e9a6f8930/infra/passing.json#L60-L61

confirmed. the tests for ionic packages are now passing.