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:
@@ -11,6 +11,7 @@ import {
|
||||
createTransactionManager,
|
||||
type TransactionCallbacks,
|
||||
type ConflictInfo,
|
||||
type ConflictResolutionStrategy,
|
||||
} from '../../index.js';
|
||||
|
||||
interface BankAccount {
|
||||
@@ -270,7 +271,7 @@ async function main() {
|
||||
let conflictsDetected = 0;
|
||||
|
||||
const callbacks: TransactionCallbacks = {
|
||||
onConflict: async (conflict: ConflictInfo) => {
|
||||
onConflict: async (conflict: ConflictInfo): Promise<ConflictResolutionStrategy> => {
|
||||
conflictsDetected++;
|
||||
console.log(` ⚠ Conflict detected on ${conflict.operation.index}/${conflict.operation.id}`);
|
||||
return 'retry'; // Automatically retry
|
||||
|
||||
Reference in New Issue
Block a user