The Wayback Machine - https://web.archive.org/web/20201102195039/https://github.com/vuejs/vue-class-component/issues/96
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 more decorators #96

Open
ferrx opened this issue May 5, 2017 · 3 comments
Open

Add more decorators #96

ferrx opened this issue May 5, 2017 · 3 comments

Comments

@ferrx
Copy link

@ferrx ferrx commented May 5, 2017

Regarding vue-property-decorator at https://github.com/kaorun343/vue-property-decorator/blob/master/src/vue-property-decorator.ts -- why shouldn't vue-class-component handle this?

@kaorun343
Copy link
Contributor

@kaorun343 kaorun343 commented May 5, 2017

Hi.

As described at #50 , vue-class-component supports Babel but vue-property-decorator doesn't support it.

@ferrx
Copy link
Author

@ferrx ferrx commented May 6, 2017

I see. The comment in #50 is very detailed and explains it thoroughly.

This is because Babel decorators will initialize a decorated property as undefined even if it does not have an initializer while TypeScript decorators won't initialize it.

I think any kind of work-around to add conflicting decorators would be convoluted unfortunately, so I would agree that this library should not mix them in. Another avenue would be to setup a library at /vuejs/vue-ts -- but even that could cause some code fragmentation eventually and make things less manageable (if the plan is to continue to support vue-class-component as well).

@Mikilll94
Copy link

@Mikilll94 Mikilll94 commented Aug 13, 2020

@ktsn
Babel 7 changed decorators implementation. See this: kaorun343/vue-property-decorator#26

So maybe this creates a possibility to add more decorators to this plugin?

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.