ionic-framework
ionic-framework copied to clipboard
fix(angular): type resolution with strict templates
Pull request checklist
Please check if your PR fulfills the following requirements:
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
- Some docs updates need to be made in the
ionic-docs
repo, in a separate PR. See the contributing guide for details.
- Some docs updates need to be made in the
- [x] Build (
npm run build
) was run locally and any changes were pushed - [x] Lint (
npm run lint
) has passed locally and any fixes were made for failures
Pull request type
Please check the type of change your PR introduces:
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
What is the current behavior?
Angular Language Service will complain when using output bindings in HTML.
For example:
<ion-reorder (ionItemReorder)="doReorder($event)">
The type of $event
is event: Event
, which is incompatible with the expected signature: CustomEvent<ItemReorderEventDetail>
.
This causes both type/build errors.
Issue URL: #24245
What is the new behavior?
- Deprecates the existing custom event types in preference of the Stencil generated types
- Uses the updated dev-build of
@stencil/angular-output-targets
, which includes changes to take advantage of the new custom event types and workaround Angular behavior with Angular Language Service
Does this introduce a breaking change?
- [ ] Yes
- [x] No
Other information
Dev-build: 6.1.11-dev.11655500065.1d345d4c
We should wait several release cycles before merging this fix in, due to the nature of the change. Possibly into 6.2.0.