feat(language-service): support auto-import for attribute completions#62797
feat(language-service): support auto-import for attribute completions#62797ivanwonder wants to merge 1 commit intoangular:mainfrom
Conversation
20ecdc5 to
286e034
Compare
| ); | ||
| if (info === null) { | ||
| return undefined; | ||
| break; |
There was a problem hiding this comment.
I think it's better to use break than return. After the switch statement, there is logic for the code action.
There was a problem hiding this comment.
For example, there is a bug in the function getTsSymbolDisplayInfo; if the symbol is a "get" accessor declaration, the function returns null, which causes the logic of the code action to be skipped.
| expect(ts.displayPartsToString(details.documentation!)).toEqual('This is another component.'); | ||
| }); | ||
|
|
||
| // TODO: check why this test is now broken |
There was a problem hiding this comment.
Broken because the completion item for the attribute only includes the directive in the component scope.
Add logic to provide code actions for auto-importing directives that are out of scope.
286e034 to
451f83f
Compare
|
@atscott PTAL |
attribute-completion.mov |
|
This PR was merged into the repository by commit b695ff0. The changes were merged into the following branches: main, 20.2.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. |
Add logic to provide code actions for auto-importing directives that
are out of scope.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information