Runtime mismatch between mapData
result and validate
input in createQuery
#490
Labels
Milestone
mapData
result and validate
input in createQuery
#490
Description
There is a bug in the
createQuery
function where thevalidate
function's argument type correctly inherits the result ofmapData
type-wise, but the actual runtime values do not match, causing validation issues.Steps to Reproduce
model.ts
file wherequery
is implemented.mapData
result and thevalidate
input.Expected Behavior
The
validate
function should receive the correctly mapped data frommapData
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 frommapData
, leading to validation failures.The text was updated successfully, but these errors were encountered: