-
Notifications
You must be signed in to change notification settings - Fork 890
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488
Description
Environment
- Operating System: Linux
- Node Version: v22.17.0
- Nuxt Version: 4.1.1
- CLI Version: 3.28.0
- Nitro Version: 2.12.6
- Package Manager: [email protected]
- Builder: -
- User Config: compatibilityDate, devtools, modules, css, vite
- Runtime Modules: @nuxt/[email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.0.0-alpha.x
Version
v4.0.0-alpha.1
Reproduction
https://github.com/vitpetricak/nuxt-defineProps-repro
Description
After adding Nuxt UI 4 to existing project, I was not able to use TypeScripts type Pick to define props of components. The server would crash with 55 and message:
Error: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference. (6:14)
Without Nuxt UI, this works without any issues:
defineProps<Pick<FooType, "foo" | "bar">>();
I have tried recent type-focused PR #4954, but the problem remains.
Additional context
No response
Logs
bartholomej, Dodobibi, hansek and kblair40
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageAwaiting initial review and prioritizationAwaiting initial review and prioritizationv4#4488#4488