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
251 stars 117 forks source link

fix(angular): generate event type with inline types #412

Closed sean-perkins closed 9 months ago

sean-perkins commented 10 months ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

When adding a custom event with an inline type:

@Event() ionSwipe!: EventEmitter<{ side: Side }>;

The generated event type is invalid:

 ionSwipe: EventEmitter<CustomEvent<IIonItemOptions{ side: IIonItemOptionsSide }>>;

There are two issues:

  1. The nested type argument is formatted incorrectly (missing <).
  2. The evaluated type shouldn’t include IIonItemOptions.

Expected output is:

ionSwipe: EventEmitter<CustomEvent<{ side: IIonItemOptionsSide }>>;

Issue URL: N/A

What is the new behavior?

Does this introduce a breaking change?

Other information

Dev-build: 0.0.1-dev.11705624885.1949250b