Skip to content

Conversation

@kaorun343
Copy link
Contributor

@kaorun343 kaorun343 commented Dec 31, 2017

Hi.

As a lot of the developers use TS and Vue together, I think vue-class-component and vue-property-decorator should be unified.

So, I would like to add some decorators in my repository to this repository.

@kaorun343 kaorun343 changed the title [WIP] add watch decorator [WIP] add property decorators Dec 31, 2017
@sinisterstumble
Copy link

vue-property-decorator depends on reflect-metadata which offloads the cost of developer convenience to the client. I would argue that there are many that are happy with just vue-class-component. It would be nice to retain the choice the developers have with the two modules, especially that vue-class-component defines a way to extend its functionality.

@ktsn
Copy link
Member

ktsn commented Jan 31, 2018

I think just making reflect-metadata optional dependency would fine in that case.

@kaorun343
Copy link
Contributor Author

OK.

@metapragma
Copy link

If this gets merged, and the decorators from vue-property-decorator aren't used, will they be treeshaken away?

@sinisterstumble
Copy link

@paerallax good point. Something like this would be nice

import { Compontent, Watch } from 'vue-class-component' @Component class MyComp extends Vue { @Watch('child') onChildChanged(val: string, oldVal: string) { } }

In this case index.ts should not import Watch on line 6

@kaorun343
Copy link
Contributor Author

kaorun343 commented Jan 31, 2018

I will add more commits since February due to my research at university, thanks.

@kaorun343
Copy link
Contributor Author

Done.

Review this PR, please.

@kaorun343 kaorun343 changed the title [WIP] add property decorators add property decorators Apr 7, 2018
@kaorun343
Copy link
Contributor Author

@ktsn
Could you review this PR?

@kaorun343 kaorun343 closed this Jun 27, 2018
@kaorun343 kaorun343 deleted the property-decorators branch October 3, 2018 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants