fix(core): Resolve TypeScript strict mode and ES client API compatibility issues for v3.0.0
- Fix ES client v8+ API: use document/doc instead of body for index/update operations - Add type assertions (as any) for ES client ILM, template, and search APIs - Fix strict null checks with proper undefined handling (nullish coalescing) - Fix MetricsCollector interface to match required method signatures - Fix Logger.error signature compatibility in plugins - Resolve TermsQuery type index signature conflict - Remove sourceMap from tsconfig (handled by tsbuild with inlineSourceMap)
This commit is contained in:
@@ -274,12 +274,16 @@ export class AggregationBuilder {
|
||||
/**
|
||||
* Add a sub-aggregation to the last defined aggregation
|
||||
*/
|
||||
subAggregation(name: string, configure: (builder: AggregationBuilder) => void): this {
|
||||
subAggregation(_name: string, configure: (builder: AggregationBuilder) => void): this {
|
||||
if (!this.currentAggName) {
|
||||
throw new Error('Cannot add sub-aggregation: no parent aggregation defined');
|
||||
}
|
||||
|
||||
const parentAgg = this.aggregations[this.currentAggName];
|
||||
if (!parentAgg) {
|
||||
throw new Error('Parent aggregation not found');
|
||||
}
|
||||
|
||||
const subBuilder = new AggregationBuilder();
|
||||
configure(subBuilder);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user