-
Notifications
You must be signed in to change notification settings - Fork 433
bugfix: collect decorated class properties #254
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the diff does not respect existing code format. Can you tidy it up?
- Need a space after
if
keyword. - Use space instead of tab for indentation.
test/test-babel.js
Outdated
@decorator2('field2') | ||
field2 | ||
|
||
foo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this prop to only focus what we want to test in this block?
test/test.ts
Outdated
@@ -60,6 +60,48 @@ describe('vue-class-component', () => { | |||
expect(c.b).to.equal(2) | |||
}) | |||
|
|||
it('data: should collect from decorated class properties', () => { | |||
|
|||
const decorator1 = (value: any) => (_: any, __:any ): any => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use more descriptive name like valueDecorator
, getterDecorator
.
test/test.ts
Outdated
} | ||
} | ||
|
||
const decorator2 = (value: any) => (_: any, __:any ): any => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(_: any, __:any ): any
Please fix the position of space. (add a space after second colon and remove the space before closing brace)
Looks like there is a kind of things in other place.
@ktsn fixed 👌 |
Thank you for your contribution 🙂 |
should collect class properties which decorated by 3rd typescript written decorators library.
Check the added unit tests for details :)