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

Add a support for object as second arg of map helpers. #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Masa-Shin
Copy link

@Masa-Shin Masa-Shin commented May 23, 2022

mapState and mapGetters can receive an object as second argument but the converter does not support this notation and just remove them without notice. I add a support for the notation as long as the values of the passed object are strings. For the case values are functions, it just throw an error at the time. I will fix it after the PR is merged.

...mapState('modules', {
  alias: "stateName"
})

@vercel
Copy link

vercel bot commented May 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
vue-composition-converter ✅ Ready (Inspect) Visit Preview May 24, 2022 at 3:15AM (UTC)

throw new Error(
"Function value in a map object is not currently supported."
);
}
Copy link
Author

Choose a reason for hiding this comment

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

Due to lack of time, the case where the value of an object is a function is not done. I will do it if the PR is merged.

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.

None yet

1 participant