feat(ivy): use the schema registry to check DOM bindings (#32171)

Previously, ngtsc attempted to use the .d.ts schema for HTML elements to
check bindings to DOM properties. However, the TypeScript lib.dom.d.ts
schema does not perfectly align with the Angular DomElementSchemaRegistry,
and these inconsistencies would cause issues in apps. There is also the
concern of supporting both CUSTOM_ELEMENTS_SCHEMA and NO_ERRORS_SCHEMA which
would have been very difficult to do in the existing system.

With this commit, the DomElementSchemaRegistry is employed in ngtsc to check
bindings to the DOM. Previous work on producing template diagnostics is used
to support generation of this different kind of error with the same high
quality of error message.

PR Close #32171
This commit is contained in:
Alex Rickabaugh
2019-08-16 16:45:33 -07:00
committed by atscott
parent 904a2018e0
commit 0677cf0cbe
22 changed files with 574 additions and 122 deletions

View File

@ -31,6 +31,7 @@ import * as core from './core';
import {publishFacade} from './jit_compiler_facade';
import {global} from './util';
export {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from './core';
export {core};
export * from './version';