fix(types): Prev limit wrong values (#9935)

**What**
The values are wrongly set which can lead to infinite depth iteration

**Note**
This will change on how we manage those cases in the future but currently it fixes an issue
This commit is contained in:
Adrien de Peretti
2024-11-05 15:14:06 +01:00
committed by GitHub
parent 275a835726
commit bbf4af1725
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/types": patch
---
fix(types): Prev limit wrong values

View File

@@ -82,7 +82,7 @@ type FilterValue<T> =
| FilterValue2<T>[]
| null
type PrevLimit = [never, 1, 2, 3]
type PrevLimit = [never, 0, 1, 2]
export type FilterQuery<T = any, Prev extends number = 3> = Prev extends never
? never