ionic-team / ionic-team/ionic-framework

bug: Component types missing when consumed from Stencil

未关闭
#30,661 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
ionitron: needs reproduction
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

### 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_

贡献指南

打开贡献指南

调研方向

Reproduce the issue with the documented Stencil project steps using @ionic/core 8.2.8 and 8.2.9, then inspect the generated TSX types in VS Code. Done means ion-* intrinsic element types are available again and event handlers no longer produce implicit-any errors.

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。