`args` function can't receive coerced to array selection as argument
atassis opened this issue · comments
Taimuraz Kaitmazov commented
I have stated proper runnable query below.
r.table("test").getAll(
r.args(
r
.table("test")
.between(0, 1)
.map((i) => i("id"))
.coerceTo("array")
)
);
Typescript says next:
TS2345: Argument of type 'RDatum<any[]>' is not assignable to parameter of type 'RValue<string | number | boolean | object | any[] | null>[]'. Type 'RDatum<any[]>' is missing the following properties from type 'RValue<string | number | boolean | object | any[] | null>[]': pop, push, concat, join, and 16 more.
This is because of wrong types being set for args
method if an interface- it should receive RDatum[]
or something as another intersection