Subscribe on changes!

New PublicProps does not properly validate props

avatar
Jan 2nd 2024

Vue version

3.4.3

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-n6kvhf?file=module.d.ts,src%2FApp.vue&terminal=dev

Steps to reproduce

stackblitz editor does not seem to highlight props-related errors, nor vite-plugin-checker detects them, attaching screenshots of my editor

What is expected?

Screenshot_20240102_150750

What is actually happening?

Screenshot_20240102_150801

System Info

System:
    OS: Linux 6.5 Manjaro Linux
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 11.49 GB / 30.98 GB
    Container: Yes
    Shell: 5.2.21 - /usr/bin/bash
  Binaries:
    Node: 21.4.0 - /usr/bin/node
    npm: 10.2.5 - /usr/bin/npm

Any additional comments?

My lib is providing SFC files bundled as typescript ambient modules + vite virtual modules. Using vue-tsc to extract dts info and store it into an ambient modules for editor's language server to consume it.

Was working well with v3.2 and v3.3 But v3.4 introduced PublicProps and volar does not highlight props-related errors anymore.

Here is the diff of what was generated by v3.3 vs. v3.4 Screenshot_20240102_152427

avatar
Jan 2nd 2024

When I set lang="ts"on the script tag, so it actually uses Typescript, it does give me the appropriate error in the stackblitz:

Bildschirmfoto 2024-01-02 um 17 08 17

I tested both with Vue 3.3 (as in the original example's lockfile) and 3.4. both show the expected type error.

Am I missing something?

avatar
Jan 2nd 2024

no, rather i'm missing something, stackblitz works well after upgrading to v3.4 looking

avatar
Jan 2nd 2024

simply had to update editor's vue-language-server :) thanks