bug: broken codegen for collections of named types in EventEmitter #405
Labels
help wanted
a good issue for the community
package: angular
@stencil/angular-output-target package
type: bug
Something isn't working
Prerequisites
Stencil Version
4.8.1
Stencil Framework Output Target
Angular
Stencil Framework Output Target Version
0.8.3
Current Behavior
The emitted type for AppRoot is
which is invalid TypeScript
Expected Behavior
The emitted type for AppRoot is
Steps to Reproduce
npm run build
in the repo rootThe component which causes the broken codegen is defined as follows:
Another alternative definition which also exhibits the pathological behavior is as follows:
Code Reproduction URL
https://github.com/aniederer-chatham/stencil-angular-type-bug-poc
Additional Information
This also occurs when the object is readonly, emitting
<IAppRootreadonly {a: [object Object]; }>
This happens effectively every time you write a type that a basic search-and-replace would mess up, for example
EventEmitter<readonly A[]>
outputsEventEmitter<CustomEvent<IAppRootreadonly [object Object][]>>
. I'm guessing the codegen there isn't very robust.The text was updated successfully, but these errors were encountered: