techfort / LokiJS

javascript embeddable / in-memory database
http:/techfort.github.io/LokiJS
MIT License
6.71k stars 478 forks source link

`compoundEval` is not correctly implemented #923

Open Losses opened 1 year ago

Losses commented 1 year ago

Prosperities value is passed to compoundEval here, the type signature of the value is ([keyof Document, isDesc] | keyof Document)[].

https://github.com/techfort/LokiJS/blob/25b9a33d57509717d43b4da06d92064f2b7a6c95/src/lokijs.js#L3364-L3369

But compoundEval only support [keyof Document, isDesc][]:

https://github.com/techfort/LokiJS/blob/25b9a33d57509717d43b4da06d92064f2b7a6c95/src/lokijs.js#L385

https://github.com/techfort/LokiJS/blob/25b9a33d57509717d43b4da06d92064f2b7a6c95/src/lokijs.js#L394

But do not support (keyof Document)[].