refactor(language-service): integrate let declarations#56270
refactor(language-service): integrate let declarations#56270crisbeto wants to merge 1 commit intoangular:mainfrom
Conversation
Integrates let declarations in the various places within the language service (quick info, completions etc).
| expectContain(completions, ts.ScriptElementKind.memberVariableElement, ['title', 'hero']); | ||
| }); | ||
|
|
||
| it('should complete a single let declaration without a terminating character', () => { |
There was a problem hiding this comment.
Can you add a test for completions when there are things on the next line and no terminating character?
@let x = |
<div></div>
{{'hello'}}
It would be good to have similar tests in other features (quick info, etc). The answer might be that this doesn't work, which is fine for now but something I've expressed concern over in the past.
There was a problem hiding this comment.
The answer might be that this doesn't work
I suspect that it won't work, because everything until ;/EOF will be considered part of the @let value which in this case would result in a parser error once it hits the expression parser. Maybe a follow-up could be to only allow multi-line values if there's at least one non-space character on the same like as the =?
| } | ||
| // TODO(crisbeto): only allow `false` when the syntax is enabled by default. | ||
| if (config['enableLetSyntax'] != null) { | ||
| options['_enableLetSyntax'] = config['enableLetSyntax']; |
There was a problem hiding this comment.
For later: with allowSignalsInTwoWayBindings, we determine whether to enable it based on an exported symbol. When we release this as a feature not behind a private flag, would it make sense to determine compatibility in the same way and export a symbol from angular/core for the sole purpose of making it visible to the language service/compiler?
There was a problem hiding this comment.
Yeah I think so. I'll add it to my list.
Integrates let declarations in the various places within the language service (quick info, completions etc). PR Close #56270
|
This PR was merged into the repository by commit dd869e4. The changes were merged into the following branches: main, 18.0.x |
|
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. |
Integrates let declarations in the various places within the language service (quick info, completions etc).