data
data copied to clipboard
test(findMany): add failing test for querying by null
- Fixes #186
Insights
I suspect that the type produced by Value is not correct:
https://github.com/mswjs/data/blob/d32f15461fc0ef915da6709de62e9e9156b8a234/src/glossary.ts#L211-L212
First of all, it misses the | null union type. But even when added, it still remains just a plain model value type without the null union. I have no idea why this happens, neither I have the tools to debug this with the current types complexity of Data.
Eventually, a null check must be introduced to the queryTypes.ts to produce a proper query type:
https://github.com/mswjs/data/blob/d32f15461fc0ef915da6709de62e9e9156b8a234/src/query/queryTypes.ts#L88-L89