Closed marcj closed 5 years ago
Ditto. I just tried running the first example from the readme in TypeScript
import sift from 'sift';
const result = ["hello", "sifted", "array!"].filter(
sift({ $in: ["hello", "world"] })
);
and got
Argument of type '{ $in: string[]; }' is not assignable to parameter of type 'SiftQuery<any[][]>'.
Type '{ $in: string[]; }' is not assignable to type 'ElemMatch<any[]>'.
Types of property 'toString' are incompatible.
Type '() => string' is not assignable to type 'SiftQuery<() => string>'.
Type '() => string' is not assignable to type 'ElemMatch<any>'.
Index signature is missing in type '() => string'.
Updated *d.ts
file here: https://github.com/crcn/sift.js/blob/master/index.d.ts.
Still need to add more tests, but this issue should be fixed by next week. 🙂
Fantastic, thanks!
Please release v8.2.0 this next week lol, I appreciate the fix!
Just pushed v8.2.0
to NPM.
Given following test
I get following Typescript errors:
I use typescript 3.3.3333