vuetify: [Bug Report][3.0.3] doesn't allow onClick and $children when vueCompilerOptions.strictTemplates=true

Environment

Vuetify Version: 3.0.3 Vue Version: 3.2.45 Browsers: Chrome 107.0.0.0 OS: Linux

Steps to reproduce

  1. clone https://github.com/Maxim-Mazurok/vuetify-tsc-error-reproduction
  2. npm ci
  3. vue-tsc --noEmit -p tsconfig.json --composite false - works
  4. tsc --noEmit -p tsconfig.json --composite false - doesn’t work

And I’m getting red squiggly lines in VS Code because of that

Expected Behavior

Works when vueCompilerOptions.strictTemplates in tsconfig.json is true.

Actual Behavior

Only works when vueCompilerOptions.strictTemplates in tsconfig.json is false (default). image

Reproduction Link

https://github.com/Maxim-Mazurok/vuetify-tsc-error-reproduction

Other comments

Let me know if this should be reported to vue-tsc instead (Volar)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Ah, you’re right. It seems like this is just making VS Code not show errors, but the type issue still persists.

I think vue would have to remove Prettify for that to be possible, unless they add & PublicProps themselves instead of just using it as a default.

Partly hotfix for me

// env.d.ts

declare module 'vue' {
	interface ComponentCustomProps {
		onClick?: (e: MouseEvent) => void;
	}
}