Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null modelValue deleted from the final type when compiling the components #2868

Open
valh1996 opened this issue Dec 9, 2024 · 0 comments
Open
Labels
bug Something isn't working triage

Comments

@valh1996
Copy link

valh1996 commented Dec 9, 2024

Environment

  • Operating System: Darwin
  • Node Version: v22.11.0
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.4
  • Package Manager: pnpm@9.4.0
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxtjs/i18n@9.0.0-rc.2, @sidebase/nuxt-auth@0.9.4, @vueuse/nuxt@11.3.0, nuxt-typed-router@3.7.1
  • Build Modules: -

Version

2.19.2

Reproduction

Image

Description

PR #2275 was to accept null values in the v-model of the various components, but it turns out (thanks to KazariEX) that the problem comes from the tsconfig configuration of @nuxt/ui where strictNullCheck is false, which causes the null that should have existed to be deleted from the type when the component is compiled.

@benjamincanac is it safe to set strictNullCheck to true? Would you accept a PR?


EDIT

Well, I've just tested it, and simply changing the strictNullCheck property to true completely breaks the typecheck.

@valh1996 valh1996 added bug Something isn't working triage labels Dec 9, 2024
@valh1996 valh1996 changed the title null deleted from the final type when compiling the components null modelValue deleted from the final type when compiling the components Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant