-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: don't show import path if there is no primary export #22804
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
I think this was intentionally displayed like that. Even if there is no primary export (which is usually a module or a test harness class), we'd want to show how the import to this entry-point would look like IMO. |
The current behavior just looks broken IMO since you aren't importing anything. Alternatively it can be changed to something like |
Yeah, let's see what others think 👍 |
What if we make it something like
|
That's a good idea, but my only concern is that it would still be styled as code in the docs and people might think that it's valid syntax. |
You could do something like
(might require some tweaking, but with that general idea) |
I don't follow how that would help. The problem this is trying to fix is when a |
I was thinking @jelbourn meant something around that (even though the snippet shows something different though): // If there a primary export, we show (highlighted)
import {<primaryExport>} from '@angular/cdk/coercion';
|
Currently we show something like `import {} from '@angular/cdk/coercion'` for imports that don't have a primary export. These changes remove the line if there is no primary export.
9ec8b61
to
8745b9e
Compare
Thank you for the explanation, that makes sense. I've pushed the change. |
Yeah, that's what I meant, Paul is just smarter than me |
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.
lgtm
Currently we show something like `import {} from '@angular/cdk/coercion'` for imports that don't have a primary export. These changes remove the line if there is no primary export. (cherry picked from commit e2633d1)
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. |
Currently we show something like
import {} from '@angular/cdk/coercion'
for imports that don't have a primary export. These changes remove the line if there is no primary export.