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

docs: fix component preview tab style #74

Merged

Conversation

ZTL-UwU
Copy link
Contributor

@ZTL-UwU ZTL-UwU commented Feb 20, 2025

Before After
image image
image image

…code blocks

Signed-off-by: ZTL-UwU <zhangtianli2006@163.com>
Comment on lines 7 to 8
function createRerender(Component: any) {
let wrapper: any = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function createRerender uses the type any for its parameter Component, which can lead to type safety issues. It's recommended to define a more specific type or interface for the component parameter to leverage TypeScript's type checking. Similarly, the variable wrapper is also typed as any, which could be more precisely typed to improve code safety and clarity.

Recommended Change:

function createRerender(Component: VueComponent) {
  let wrapper: VueWrapper | null = null
}

This change ensures that only Vue components can be passed to createRerender, and wrapper is explicitly typed as either VueWrapper or null.

@rick-hup
Copy link
Collaborator

thanks for the PR contribution to improve the docs!

@rick-hup rick-hup merged commit 69a7343 into motiondivision:master Feb 21, 2025
0 of 2 checks passed
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.

2 participants