Nuxt 4 module author: Component slot prop types missing.
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- nuxtjs, typescript
- 领域
- build-system, tooling
调研方向
从链接的复现开始,并运行 npm run dev:prepare && npm run prepack。检查生成的 dist/runtime/components/NavigationComponent.d.vue.ts 和 NavigationComponent.vue.d.ts,将 content slot 的 data prop 与 NavigationComponent.vue 中的 NavigationItem[] 进行比较。完成的标准是生成的声明保留 slot prop 类型,而不是输出 any。
由索引模型根据 Issue 内容生成。
描述
Environment
- Operating System: Darwin
- Node Version: v22.14.0
- Nuxt Version: 4.2.1
- CLI Version: 3.30.0
- Nitro Version: 2.12.9
- Package Manager: [email protected]
- Builder: -
- User Config: -
- Runtime Modules: -
- Build Modules: -
Reproduction
Public github repo:
https://github.com/juanpscotto/nuxt-4-module-starter-types-issue
Stackblitz:
In stackblitz wait until the project is setup. Or run this command npm run dev:prepare && npm run prepack if running locally.
Once it has finished check the dist/runtime/components/NavigationComponent.d.vue.ts file, the slot type is missing.
Additional context
There is one component NavigationComponent that has a named slot content with a data prop array of type NavigationItem[]. That type is carried over as any in both NavigationComponent.d.vue.ts and NavigationComponent.vue.d.ts files
NavigationComponent.vue:
NavigationComponent.d.vue.ts
Describe the bug
The slot props types are not being carried over to the generated .ts files of the .vue components. I expect the type of the data props to be recognized.
Logs
- 主要语言
- TypeScript
- 星标
- 277
- 派生
- 36
- 平均合并
- 2 小时 46 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nuxt/module-builder 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
nuxt/module-builder#801 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 48/100
nuxt/module-builder#764 ·
-
难度 3/5 1-2 天 新手友好度 45/100
nuxt/module-builder#754 ·
-
Conflict between folder structure in readme (src/runtime) and TypeScript config (src/module/runtime)可能已有人在做 @dword-design 于 138 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 45/100
nuxt/module-builder#749 ·
-
Tsdown/obuild migration可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
nuxt/module-builder#726 · 1 条评论 · 1 个 reaction ·
查看 nuxt/module-builder 的全部 Issue
相似的 Issue
-
area: app type: bug
难度 2/5 1-3 小时 新手友好度 78/100
ExpidetGames/code-reviewer#585 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 83/100
module-federation/core#5205 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
LanternOps/breeze#9392 · 1 条评论 ·
维护者通常 1 天内回复
-
engine-rs P3 review-deferral wasm
难度 2/5 1-3 小时 新手友好度 77/100
maniator/verticopolis#1154 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复