-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use default exports for handler classes #520
Comments
I accidentally created this to soon. let me edit it. |
Is there any technical reason to use default exports? I think named exports are just generally better for maintainability. They prevent renaming things when you import them. Otherwise it's possible for the imported and exported name to become out of sync. |
It's just convention and consistency. Actually both can be used at the same time. Sometimes I provide a default export and named exports. But the name of the file should always be the same as the name of the default export. |
See if you can do this before we extract out all the CLI to Polykey-CLI. |
Doing this now in #552. |
1 similar comment
Doing this now in #552. |
I think you used suffix naming. But since the entire directory is this... it could be shortened to just I'm dropping the |
Specification
As a standard we want to use default exports if a file exports a single class. The client handlers used to export the caller and handler definition. Now it's just the handler so it needs to be updated to a default export.
Additional context
Tasks
The text was updated successfully, but these errors were encountered: