Open
Description
Should this be an RFC?
- This is not a substantial change
Which package is this a feature request for?
Other/unknown (please mention in description)
Description
The current Angular wrapper generator (labs/gen-wrapper-angular
) cannot get complex types for @Input
properties. There is an easy fix for this:
Current:
${Array.from(reactiveProperties.entries()).map(
([propertyName, property]) => javascript`
@Input()
set ${propertyName}(v: ${property.type?.text ?? 'any'}) {
this._ngZone.runOutsideAngular(() => (this._el.${propertyName} = v));
}
Proposed:
${Array.from(reactiveProperties.entries()).map(
([propertyName, property]) => javascript`
@Input()
set ${propertyName}(v: ${name}Element[${propertyName}]) {
this._ngZone.runOutsideAngular(() => (this._el.${propertyName} = v));
}
Notice the change: ${name}Element[${propertyName}]
Something similar can be done for events as well. But in this issue I think we can simply fix the Input properties because events could change substantially: Declarative event emitters #3277.
Alternatives and Workarounds
Currently we maintain our own wrapper generation code in-house.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status