-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore(dgeni): better extraction of directive metadata #9387
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
chore(dgeni): better extraction of directive metadata #9387
Conversation
* export class MyComponent {} | ||
* ``` | ||
*/ | ||
export function getDirectiveMetadata(classDoc: CategorizedClassDoc): DirectiveMetadata | null { |
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 think it would be better to not have the DirectiveMetadata
type alias, since it makes it more immediately obvious how to interact with the metadata. Having it as DirectiveMetadata
makes me think you do, e.g., metadata.selector
, etc.
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.
Good point. I'd still prefer having some kind of type alias, since the type is being used in multiple places. What about DirectiveMetadataMap?
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'd still prefer just the Map
, since it's super obvious
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.
Yeah, doesn't really matter. Done
* Determines the component or directive metadata from the specified Dgeni class doc. The resolved | ||
* directive metadata will be stored in a Map. | ||
* | ||
* Currently only string literal assignments and array literal assignments are supported. |
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.
Add "Other value types are not necessary because they are not needed for any user-facing documentation"
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.
Done 👍
45d29ac
to
4918b9e
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.
LGTM, just needs rebase
* No longer extracts the directive/component metadata using Regular Expressions. * Fixes that inherited properties from interfaces or super-classes are not showing up as inputs/outputs if they are specified in the component/directive metadata. * Now handles multi-line selectors (this was not possible using the Regular Expression) * Fixes that merged inherited properties have a reference to the original document (this causes unexpected behavior; if properties are updated). References angular#9299
4918b9e
to
c011a66
Compare
@jelbourn Done. |
* chore(dgeni): better extraction of directive metadata * No longer extracts the directive/component metadata using Regular Expressions. * Fixes that inherited properties from interfaces or super-classes are not showing up as inputs/outputs if they are specified in the component/directive metadata. * Now handles multi-line selectors (this was not possible using the Regular Expression) * Fixes that merged inherited properties have a reference to the original document (this causes unexpected behavior; if properties are updated). References #9299
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
References #9299