sudo-suhas / elastic-builder

A Node.js implementation of the elasticsearch Query DSL :construction_worker:
https://elastic-builder.js.org
MIT License
508 stars 75 forks source link

fix: export aggregation bases #189

Open kahoowkh opened 11 months ago

kahoowkh commented 11 months ago

Hi @sudo-suhas,

I got the following error when I try to import MetricsAggregationBase and create a new class CustomAggregation extending it.

class CustomAggregation extends elastic_builder_1.MetricsAggregationBase {
                                                       ^

TypeError: Class extends value undefined is not a constructor or null

I noticed the type definitions of the aggregation bases are exported in index.d.ts but the actual classes are not exported in index.js. I exported them in this PR, so the above can be fixed.

Could you please have a look and let me know what you think?