Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ngtsc/ttc/strict #33365

Closed
wants to merge 3 commits into from
Closed

Ngtsc/ttc/strict #33365

wants to merge 3 commits into from

Commits on Oct 24, 2019

  1. feat(ivy): add flag to disable checking of text attributes

    For elements that have a text attribute, it may happen that the element
    is matched by a directive that consumes the attribute as an input. In
    that case, the template type checker will validate the correctness of
    the attribute with respect to the directive's declared type of the
    input, which would typically be `boolean` for the `disabled` input.
    Since empty attributes are assigned the empty string at runtime, the
    template type checker would report an error for this template.
    
    This commit introduces a strictness flag to help alleviate this
    particular situation, effectively ignoring text attributes that happen
    to be consumed by a directive.
    JoostK authored and alxhub committed Oct 24, 2019
    Copy the full SHA
    5f28c42 View commit details
    Browse the repository at this point in the history
  2. fix(ivy): split checkTypeOfReferences into DOM and non-DOM flags.

    View Engine correctly infers the type of local refs to directives or to
    <ng-template>s, just not to DOM nodes. This commit splits the
    checkTypeOfReferences flag into two separate halves, allowing the compiler
    to align with this behavior.
    alxhub committed Oct 24, 2019
    Copy the full SHA
    f50df7f View commit details
    Browse the repository at this point in the history
  3. feat(ivy): strictness flags for template type checking

    The template type checking abilities of the Ivy compiler are far more
    advanced than the level of template type checking that was previously
    done for Angular templates. Up until now, a single compiler option
    called "fullTemplateTypeCheck" was available to configure the level
    of template type checking. However, now that more advanced type checking
    is being done, new errors may surface that were previously not reported,
    in which case it may not be feasible to fix all new errors at once.
    
    Having only a single option to disable a large number of template type
    checking capabilities does not allow for incrementally addressing newly
    reported types of errors. As a solution, this commit introduces some new
    compiler options to be able to enable/disable certain kinds of template
    type checks on a fine-grained basis.
    JoostK authored and alxhub committed Oct 24, 2019
    Copy the full SHA
    ce3457c View commit details
    Browse the repository at this point in the history