fix(Input): Add support for Object Expressions in Input decorators #1326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #1327
In Angular 16, you can pass an object expression as an argument for the Input decorator.
This PR adds support for the following cases:
Additional information:
Hi! I am a Storybook maintainer, and currently, we evaluate Angular 16 support in Storybook, which will be released in the first week of May. Now, Storybook relies heavily on Compodoc to extract type information. Passing an object expression to the Input decorator currently breaks completely because compodoc a) wrongly extracts the
name
property of the input (it always assumes that aStringLiteral
is passed in as the only valid argument) and b) cannot handle object expressions as valid decorator arguments.Further help needed:
I need help writing a unit test for the mentioned cases. I need some assistance to place a unit test into the right place.
PR opened against
master
instead ofdevelop
I don't know how stable develop is and whether a soon-ish release of develop might be possible. Therefore, I've created the PR against
master
, hoping this fix might be released as a hotfix release.