Context
The TypeScript SDK's progress callback support adds progressCallback and feedbackConfig as trailing positional parameters to 34 methods (Engine: 4, Query: 5, AdminClient: 25). This matches the Python SDK's API exactly.
Problem
Positional parameters create ambiguity at call sites, especially for methods with existing optional trailing parameters:
// Is the 2nd arg a record key or a callback?
admin.traceOperationalCollection("events", recordKey?, progressCallback?, feedbackConfig?)
Adding a third feedback-related option later would require touching every signature again.
Proposed Change
Bundle into an options bag:
type CallOptions = {
progressCallback?: ProgressCallback;
feedbackConfig?: FeedbackConfig;
};
// Before:
checkIntegrity(progressCallback?, feedbackConfig?): IntegrityReport
// After:
checkIntegrity(options?: CallOptions): IntegrityReport
This is a breaking API change and would diverge from Python's positional-parameter convention. Should be evaluated for the next major version.
Files
typescript/packages/fathomdb/src/engine.ts
typescript/packages/fathomdb/src/query.ts
typescript/packages/fathomdb/src/admin.ts
Context
The TypeScript SDK's progress callback support adds
progressCallbackandfeedbackConfigas trailing positional parameters to 34 methods (Engine: 4, Query: 5, AdminClient: 25). This matches the Python SDK's API exactly.Problem
Positional parameters create ambiguity at call sites, especially for methods with existing optional trailing parameters:
Adding a third feedback-related option later would require touching every signature again.
Proposed Change
Bundle into an options bag:
This is a breaking API change and would diverge from Python's positional-parameter convention. Should be evaluated for the next major version.
Files
typescript/packages/fathomdb/src/engine.tstypescript/packages/fathomdb/src/query.tstypescript/packages/fathomdb/src/admin.ts