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

Fix the types for isComment and isText #6

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

skirtles-code
Copy link
Owner

The types for isComment and isText were using Comment and Text incorrectly.

Both Comment and Text were being imported from vue, but they weren't actually being used for the types of those two functions. Those values are both symbols, not types, so they were ignored in the type annotation. Instead, the global Comment and Text types, used for DOM nodes, were being used.

The simplest fix was to use typeof Comment and typeof Text, but to avoid future clashes I've renamed all the imported symbols to have less problematic names.

The docs have been updated accordingly, though they still use the original names for the symbols.

@skirtles-code skirtles-code merged commit 2f92c29 into main Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant