Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Nuxt 4 module author: Component slot prop types missing.

Aperta
#701 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
nuxtjs, typescript

Direzione di ricerca

Inizia con la riproduzione collegata ed esegui npm run dev:prepare && npm run prepack. Ispeziona i file generati dist/runtime/components/NavigationComponent.d.vue.ts e NavigationComponent.vue.d.ts, confrontando la prop data dello slot content con NavigationItem[] di NavigationComponent.vue. Il lavoro è completato quando le dichiarazioni generate preservano il tipo della prop dello slot invece di emettere any.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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:

https://stackblitz.com/github/juanpscotto/nuxt-4-module-starter-types-issue?file=src%2Fruntime%2Fcomponents%2FNavigationComponent.vue%3AL29

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:

Image

NavigationComponent.d.vue.ts

Image
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.

Image
Logs

Lingua principale
TypeScript
Stelle
277
Fork
36
Merge medio
4g 19h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nuxt/module-builder

Tutte le issue di nuxt/module-builder

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.