ionic-team / ionic-team/ionic-framework

bug: Component types missing when consumed from Stencil

Open
#30,661 2 comments 0 reactions 0 assignees View on GitHub
ionitron: needs reproduction
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

I have a Stencil project where I consume `@ionic/core`. Starting with 8.2.9, the types for `ion-*` elements in the TSX files are no longer available. If I downgrade to 8.2.8, all is good.

When hovering in VS Code:

* 8.2.8: `(property) LocalJSX.IntrinsicElements["ion-item"]: LocalJSX.IonItem & JSXBase.HTMLAttributes`
* 8.2.9: `(index) IntrinsicElements[string]: any`

And the project won't compile because of `Parameter 'ev' implicitly has an 'any' type.` on all event handlers.

### Expected Behavior

Types should be available.

### Steps to Reproduce

1. `npm init stencil`
2. Select `ionic-pwa [community]`
3. cd into project, `npm install`
4. *Inspect elements in VS Code.* (`IntrinsicElements[string]: any`)
5. `npm i @ionic/core@8.2.8`
6. *Inspect elements in VS Code.* (`LocalJSX.IntrinsicElements["ion-..."]:`)
7. `npm i @ionic/core@8.2.9`
8. *Inspect elements in VS Code.* (`IntrinsicElements[string]: any`)

### Code Reproduction URL

-

### Ionic Info

npm 10.9.2
node 23.11.0
@ionic/core 8.2.9
@stencil/core 4.36.3

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.