Skip to content
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

Replace anonymous default export with named exported #51

Closed
EvitanRelta opened this issue Jun 19, 2022 · 0 comments
Closed

Replace anonymous default export with named exported #51

EvitanRelta opened this issue Jun 19, 2022 · 0 comments
Assignees
Labels
refactor Related to refactoring code

Comments

@EvitanRelta
Copy link
Owner

Typescript keeps warning about anonymous default exports.
image

Anonymous default exports also has problems with being unable to declare the export type (microsoft/TypeScript#13626).

And Typescript might not be able to infer the export type too:
image


Thus, we should replace them with named export. From this:

import Code from '@tiptap/extension-code'

export default Code.extend({ excludes: '' })

To this:

import Code from '@tiptap/extension-code'

export const CodeNoExcludes = Code.extend({ excludes: '' })
@EvitanRelta EvitanRelta added the refactor Related to refactoring code label Jun 19, 2022
@EvitanRelta EvitanRelta added this to the Orbital Milestone 3 milestone Jun 26, 2022
@EvitanRelta EvitanRelta self-assigned this Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Related to refactoring code
Projects
None yet
Development

No branches or pull requests

1 participant