ionic-team / stencil-ds-output-targets

These are output targets that can be added to Stencil for React and Angular.
https://stenciljs.com
MIT License
250 stars 118 forks source link

bug: Comments within objects are not resolved correctly - Angular Build not possible. #483

Open marcomattes opened 2 months ago

marcomattes commented 2 months ago

Prerequisites

Stencil Version

4.21.0

Stencil Framework Output Target

Angular

Stencil Framework Output Target Version

0.9.0

Current Behavior

If I add a comment within an event type, this is built inline in the build and breaks the components.d.ts file. Angular can then no longer be built.

Input

  @Event({
    eventName: 'someTestEvent',
  })
  formValidationEvent!: EventEmitter<{
    field;
    field2;
    // someCommentLikeTsIgnoreOrElse
    errorField: {};
  }>;

Output


export declare interface MyComponent extends Components.MyComponent {

  someTestEvent: EventEmitter<CustomEvent<{ field; field2; // someCommentLikeTsIgnoreOrElse errorField: {}; }>>;
}

Expected Behavior

Comments should be removed or made safe (new line or similar)

Steps to Reproduce

Open: https://stackblitz.com/edit/stencil-template-aiden-c7padq?file=angular-workspace%2Fprojects%2Fcomponent-library%2Fsrc%2Flib%2Fstencil-generated%2Fcomponents.ts

Run: npm run build

Code Reproduction URL

https://stackblitz.com/edit/stencil-template-aiden-c7padq?file=angular-workspace%2Fprojects%2Fcomponent-library%2Fsrc%2Flib%2Fstencil-generated%2Fcomponents.ts

Additional Information

No response

ionitron-bot[bot] commented 2 months ago

Thanks for the issue!

This project is currently maintained for the purposes of supporting Ionic Framework. At this time, only new issues & pull requests that support Ionic Framework will be prioritized. For the latest updates regarding the maintenance status of this project, please see this section of the project's README

ionitron-bot[bot] commented 1 month ago

This issue has been labeled as help wanted. This label is added to issues that we believe would be good for contributors.

If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort. Thank you!