-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Type-checking errors on fallthrough attributes and AllowedComponentProps #3201
Comments
Not sure i this is the intended behavior :( |
I've had this exact issue - it was complaining about fallthrough props only on generic components; Updating |
@jpoep Thanks for checking this. It still fails with v1.8.8 if the project has global components declared I updated the Stackblitz https://stackblitz.com/edit/github-ekza7z?file=env.d.ts,package.json /// <reference types="vite/client" />
import type App from './src/App.vue';
declare module '@vue/runtime-core' {
interface GlobalComponents {
App: typeof App;
}
interface AllowedComponentProps {
id?: string;
}
} |
Consider a simple component using a
Field
from the vee-validate library:Note that
Field
has anid
, which is not a prop but a fallthrough attribute, so the resulting HTML is:The problem is
vue-tsc
(v1.6.5) does not compile, asid
is not recognized:This only happens with
strictTemplates: true
invueCompilerOptions
.I used to get around this by using
AllowedComponentProps
:but this does not do the trick here, as now
Field
is not found at all:You can find a small repro here: https://stackblitz.com/edit/github-ekza7z?file=src/App.vue
So my questions are:
AllowedComponentProps
the correct way to handle the case of attributes here?Field
anymore, is there an issue with vue-tsc?The text was updated successfully, but these errors were encountered: