Remove asChipUnderlyingType helper #8062
Merged
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.
Problem
In many places into our templates
{{asUnderlyingZclType type}}
is used to retrieve which types should be used for the signature of methods. But it does not return the proper type foroctet_string
norlong_octet_string
at the moment so there in many places the code has been written such as:This PR adds
octet_string
andlong_octet_string
tooverride.js
so the code can be rewritten such as:And in a few other places, the code assume that
octet_string
means thechip::ByteSpan
class which is not very convenient if at some point this type needs to be updated...Change overview
override.js
{{#if (isOctetString type)}}
is useless nowTesting
The only code changes that is generated is
ATTRIBUTE_ID
->ATTRIB_ID
into a comment. So nothing has really changed.