-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(cdk/drag-drop): Correctly type drag handle parent drag witho… #20757
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
Conversation
…ut circular dependencies warning Import the `CdkDrag` directive reference as a type-only import to avoid the circular dependency warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change seems fine, but as evidenced by the CI, it still introduces a circular import. I believe the check works by looking at static dependencies between files and it doesn't distinguish between type-only and hard dependencies.
Oh, I assumed the circular dependency comments were referring to outputs from the Angular CLI (or TypeScript checker or whatever is running behind the scenes) - adding the type-only import on my project no longer threw the circular dependency warning. So are you guys running an entirely different set of checks? Regarding the other errors: When an |
I think the check comes from As for the |
Yeah, that looks right. Perhaps some type of check for type-only imports needs to be added here: A nice https://github.com/microsoft/TypeScript/blob/master/src/compiler/utilitiesPublic.ts#L1102 So this probably garners opening a new issue for supporting type-only imports, in a general sense, in this script. Is this something you want to do as that is a repo of "private" tools or is there another repo where this issue should be opened?
Good to know. I changed it back to |
@Achilles1515 Sorry for the lack of attention on this - do you mind rebasing? @crisbeto Does this change look okay to merge? |
New pull request for this issue: |
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. |
…ut circular dependencies warning
Import the
CdkDrag
directive reference as a type-only import to avoid the circular dependency warning.