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

isRequired has unexpected behaviour with func #199

Open
0biWanKenobi opened this issue Oct 26, 2021 · 2 comments
Open

isRequired has unexpected behaviour with func #199

0biWanKenobi opened this issue Oct 26, 2021 · 2 comments
Assignees
Labels

Comments

@0biWanKenobi
Copy link

Using vue-types 4.1.1 with Volar extension v. 0.28.9. Somehow a function prop defined with VueTypes.prop.isRequired is still seen as ((...args: any[]) => any) | undefined. Screenshot below:

image

@dwightjack dwightjack self-assigned this Oct 27, 2021
@dwightjack
Copy link
Owner

Hmm, I cannot find where this issue comes from. It seems to be only related to the VueTypes.func validator 🤔.

As a quick fix, I suggest you use the individual validator which should not have this issue:

import { func } from 'VueTypes';

// ...

props: {
  toggleCollapsed: func().isRequired
}

@dwightjack dwightjack added the bug label Oct 27, 2021
@0biWanKenobi
Copy link
Author

Yup, that's what I've done for now, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants