# \[Typescript\] Enum \`Aggregator\` is undefined

**URL:** https://community.forestadmin.com/t/typescript-enum-aggregator-is-undefined/5575
**Category:** Help me!
**Created:** [November 23, 2022, 11:51am UTC](https://community.forestadmin.com/t/typescript-enum-aggregator-is-undefined/5575 "2022-11-23T11:51:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Justin\_Martin](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/justin_martin/32/1028_2.png) [@Justin\_Martin](https://community.forestadmin.com/u/Justin_Martin)
#### Post date: [November 23, 2022, 11:51am UTC](https://community.forestadmin.com/t/typescript-enum-aggregator-is-undefined/5575/1 "2022-11-23T11:51:36Z")

</div>

Hello,

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

The enum `Aggregator` [available here](https://github.com/ForestAdmin/forest-express-sequelize/blob/b99f5e77e02acb96a9d46503f5fb907a6ab46d1a/types/index.d.ts#L216) is not usable, it return undefined.

`app.ts`:

```javascript
import {
  Aggregator
} from 'forest-express-sequelize';

[...]

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

```

console:

```javascript
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`?

---

<div class="post-metadata">

### Author: ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)
#### Post date: [November 23, 2022, 4:07pm UTC](https://community.forestadmin.com/t/typescript-enum-aggregator-is-undefined/5575/3 "2022-11-23T16:07:35Z")

</div>

Hey @Justin_Martin 👋

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](https://github.com/ForestAdmin/forest-express-sequelize/pull/1041/files).

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

---

<div class="post-metadata">

### Author: ![Justin\_Martin](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/justin_martin/32/1028_2.png) [@Justin\_Martin](https://community.forestadmin.com/u/Justin_Martin)
#### Post date: [November 23, 2022, 4:09pm UTC](https://community.forestadmin.com/t/typescript-enum-aggregator-is-undefined/5575/4 "2022-11-23T16:09:50Z")

</div>

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](https://github.com/ForestAdmin/forest-express-sequelize/pull/1040)

---

<div class="post-metadata">

### Author: ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)
#### Post date: [November 23, 2022, 4:20pm UTC](https://community.forestadmin.com/t/typescript-enum-aggregator-is-undefined/5575/5 "2022-11-23T16:20:38Z")

</div>

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](https://github.com/ForestAdmin/agent-nodejs) 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](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/quick-start).
