[Typescript] Enum `Aggregator` is undefined


I’m using forest-express-sequelize: 9.0.0 (and forest-express: 10.0.0)

The enum Aggregator available here is not usable, it return undefined.


import {
} from 'forest-express-sequelize';


console.log('Agg', Aggregator.AND);


console.log('Agg', forest_express_sequelize_1.Aggregator.AND);                                                         
TypeError: Cannot read properties of undefined (reading 'AND')

Is there a missing export in forest-sequelize-express?

Hey @Justin_Martin :wave:

This is definitely an issue on our end. In fact, this enum isn’t used anymore and our index.d.ts wasn’t in-sync with the current version of the code.

This enum will disappear in the next version of forest-express-sequelize and forest-express-mongoose, according to the following PR.

Sorry for the inconvenience, and let me know if that helps.

1 Like

Ok perfect, i also created a PR to type operator from Filter with an enum

fix(type): add FilterOperator enum by JustinMartinDev · Pull Request #1040 · ForestAdmin/forest-express-sequelize · GitHub

1 Like

Nice, thank you for this contribution. I’ll dispatch it to be reviewed shortly.

As a side note, and if you are interested, our new agent is fully written in typescript (Thus, all our types are always in-sync with reality). You can check it out here if you are interested.