-
Notifications
You must be signed in to change notification settings - Fork 350
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
Knip 4: remove MovablePoint duplicate export #1774
Conversation
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (7683344) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1774 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1774 |
Size Change: 0 B Total Size: 867 kB ℹ️ View Unchanged
|
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.
I'd prefer to keep the named export and remove the default export.
Named exports make it easier to find where stuff is defined or used by grepping.
@benchristel Thanks for the feedback. I don't really agree, but I made the change anyway. I think I see your point, that renaming imports is less explicit with default exports ( No skin off my back either way though. I appreciate you taking the time to review all of these. |
@@ -801,5 +801,3 @@ function getKey(eventName: string, id: string): string { | |||
function getEventName(key: string): string { | |||
return key.split(":")[0]; | |||
} | |||
|
|||
export default MovablePoint; |
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.
We really should have a final call on whether we use default exports or named. I find a single named export kinda weird, but it protects against an import changing the name and being confusing. 🤔
Summary:
MovablePoint
was being exported twice:export class MovablePoint
andexport default MovablePoint
Found by Knip.