-
Notifications
You must be signed in to change notification settings - Fork 22
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
[FEATURE] jsdoc: Support destructuring of enums for defaultValue #775
Conversation
@@ -646,6 +835,11 @@ function convertValueWithRaw(node, type, propertyName) { | |||
raw: local.raw | |||
}; | |||
} | |||
|
|||
const potentialEnum = resolvePotemtialEnum(node, type); |
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.
This is the case where the ENUM could be just the element.
For example, const { TitleLevel } = sap.ui.core;
637eee0
to
986f985
Compare
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.
I only briefly looked through the code, but will need to run it locally to fully verify the resolve logic
321e696
to
b7dfa37
Compare
82a9063
to
184297d
Compare
test/expected/build/library.j/dest/resources/library/j/dependency2.js
Outdated
Show resolved
Hide resolved
test/expected/build/library.j/dest/resources/library/j/ES6.features.2.js
Outdated
Show resolved
Hide resolved
test/expected/build/library.j/dest/resources/library/j/ES6.features.2.js
Outdated
Show resolved
Hide resolved
test/expected/build/library.j/dest/resources/library/j/library-core.js
Outdated
Show resolved
Hide resolved
test/expected/build/library.j/dest/resources/library/j/library.js
Outdated
Show resolved
Hide resolved
- Use escope to go up through the chain - Cover destructuring and build up a fully quantified name up to the imported module name - Cover renaming - Cover multiple destructuring
Basic handling of ArrayPattern in Arguments
…structor detection
This change integrates the following Pull request from ui5-builder project: SAP/ui5-builder#775 Change-Id: Id0cc3e903dbb3b0733add647ca9096d31b163051
JIRA: CPOUI5FOUNDATION-503
This PULL request tries to enable ES6+ destructuring for UI5 enums.
There might be different cases and ways to achieve this and with this change, we try to cover the ones we already know. (Note: There might be more we're not aware of).
Here are the cases we try to cover: