fix(compiler-cli): implement more host directive validations as diagnostics#47768
fix(compiler-cli): implement more host directive validations as diagnostics#47768crisbeto wants to merge 1 commit intoangular:mainfrom
Conversation
There was a problem hiding this comment.
This is fixing something I messed up when I first wrote the test. The new diagnostics picked up on it.
There was a problem hiding this comment.
I renamed all these tests talking about "throwing an error" to be more accurate.
There was a problem hiding this comment.
This just renames the parameter to be more accurate.
There was a problem hiding this comment.
This test isn't valid anymore since it was testing what happens when trying to alias to the private name of an input/output.
…ostics Implements more of the runtime validations for host directives as compiler diagnostics so that they can be caught earlier. Also does some minor cleanup.
b076d7a to
fc73369
Compare
| bindingType: 'input'|'output', hostDirectiveMeta: HostDirectiveMeta, meta: DirectiveMeta, | ||
| origin: ts.Expression, diagnostics: ts.DiagnosticWithLocation[]) { | ||
| const className = meta.name; | ||
| const hostDirectiveMappings = |
There was a problem hiding this comment.
Why you don't explicitly declare the type, for ease of reading the code
There was a problem hiding this comment.
Because TS can infer the type and the reader can hover over the name for more information.
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
|
Caretaker note: this PR was forced green for g3, because the only two failing targets were flakes. The g3 check status above doesn't reflect it, because we're in a transition period between two different ways of reporting the g3 status. |
|
This PR was merged into the repository by commit f97bebf. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Implements more of the runtime validations for host directives as compiler diagnostics so that they can be caught earlier. Also does some minor cleanup.