build: coercion types rule should check type assignability (#18223)
build: coercion types rule should check type assignability (#18223)

Currently the coercion types lint rule enforces compatibility
with the `async` pipe and strict null checks, by enforcing that
the input is assignable to `null` and `undefined`.

This is currently done by checking for known types (like
`BooleanInput`), or by checking for explicit type unions.

This is not very robust, and unflexible if new type aliases are
introduced. Since we updated to TS 3.7, we can leverage the type
relation API (which is now available; but just not exposed publicly
yet).

For our lint rule, it should be fine using it already. We'll get
notified if something changes internally (which is unlikely though)
josephperrott/material2,josephperrott/material2,andrewseguin/material2,mmalerba/material2,josephperrott/material2,andrewseguin/material2,mmalerba/material2,mmalerba/material2,crisbeto/material2,andrewseguin/material2,andrewseguin/material2,josephperrott/material2,Jefiozie/material2,angular/components,Jefiozie/material2,crisbeto/material2,Jefiozie/material2,DevVersion/material2,angular/components,Jefiozie/material2,DevVersion/material2,angular/components,mmalerba/material2,josephperrott/material2,mmalerba/material2,DevVersion/material2,crisbeto/material2,angular/components,andrewseguin/material2,crisbeto/material2,Jefiozie/material2,DevVersion/material2,DevVersion/material2