-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Api: Type mismatch #3727
Comments
@mertsincan You've refactored the solution in 53312c0. However this seems to break it as seen below. Happy to open a new issue if needed. |
Use |
Actually I can confirm this is still an issue. Now that it's an enum in the .d.ts file, it can't be found in the esm.js file when building the application. |
Please see the related issue: #3751 (comment) |
Describe the bug
Type checks fail for 3.24.0 when using a variable with an interface extending type
DataTableFilterMeta
and giving an object withmatchMode
usingFilterMatchMode
.FilterMatchMode
is of typestring
butmatchMode
expects specific values.This error occurs:
Type 'string' is not assignable to type '"startsWith" | "contains" | "notContains" | "endsWith" | "equals" | "notEquals" | "in" | "lt" | "lte" | "gt" | "gte" | "between" | "dateIs" | "dateIsNot" | "dateBefore" | "dateAfter" | undefined'.
This applies to other types defined in Api.d.ts.
Reproducer
https://codesandbox.io/s/eloquent-proskuriakova-wy0x47?file=/src/customerTableFilters.type.ts
PrimeVue version
3.24.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
No TS error.
matchMode
should expect the correct string values.The text was updated successfully, but these errors were encountered: