mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Fix return values of rethrowResult and retryResult
Bug: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/33242 To make the type definition consistent with both the implementation and api docs as indicated in the bug, we are updating the return values of `rethrowResult` and `retryResult` to return a `DecisionInfo` object. Additionally the `DecisionInfo` object will have it's `consistency` field made optional and a new optional field of `useCurrentHost` is added.
This commit is contained in:
7
types/cassandra-driver/index.d.ts
vendored
7
types/cassandra-driver/index.d.ts
vendored
@@ -87,7 +87,8 @@ export namespace policies {
|
||||
|
||||
interface DecisionInfo {
|
||||
decision: number;
|
||||
consistency: number;
|
||||
consistency?: number;
|
||||
useCurrentHost?: boolean;
|
||||
}
|
||||
|
||||
interface RequestInfo {
|
||||
@@ -115,8 +116,8 @@ export namespace policies {
|
||||
onReadTimeout(requestInfo: RequestInfo, consistency: types.consistencies, received: number, blockFor: number, isDataPresent: boolean): DecisionInfo;
|
||||
onUnavailable(requestInfo: RequestInfo, consistency: types.consistencies, required: number, alive: number): DecisionInfo;
|
||||
onWriteTimeout(requestInfo: RequestInfo, consistency: types.consistencies, received: number, blockFor: number, writeType: string): DecisionInfo;
|
||||
rethrowResult(): { decision: retryDecision };
|
||||
retryResult(consistency?: types.consistencies, useCurrentHost?: boolean): { decision: retryDecision, consistency: types.consistencies, useCurrentHost: boolean };
|
||||
rethrowResult(): DecisionInfo;
|
||||
retryResult(consistency?: types.consistencies, useCurrentHost?: boolean): DecisionInfo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user