-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Milestone
Description
Description
There is a bug in the createQuery function where the validate function's argument type correctly inherits the result of mapData type-wise, but the actual runtime values do not match, causing validation issues.
Steps to Reproduce
- Open the provided reproduction link.
- Check the
model.tsfile wherequeryis implemented. - Observe that while TypeScript shows no type errors, the runtime behavior indicates a mismatch between the
mapDataresult and thevalidateinput.
Expected Behavior
The validate function should receive the correctly mapped data from mapData at runtime, ensuring proper validation.
Alternatively, if validation is intended to occur before mapData, the overload types should be adjusted accordingly to reflect this order of operations.
Actual Behavior
Despite TypeScript showing no type errors, the validate function receives data that doesn't match the expected runtime values from mapData, leading to validation failures.