1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-10-31 01:45:39 +03:00

Iterate PR

This commit is contained in:
Michael Telatynski
2021-06-22 22:23:09 +01:00
parent 6fd1dc7d18
commit e0ac200e27
3 changed files with 9 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ export class DecryptionFailure {
}
}
type Fn = (count: number, trackedErrCode: string) => void;
type TrackingFn = (count: number, trackedErrCode: string) => void;
type ErrCodeMapFn = (errcode: string) => string;
export class DecryptionFailureTracker {
@@ -73,7 +73,7 @@ export class DecryptionFailureTracker {
* @param {function?} errorCodeMapFn The function used to map error codes to the
* trackedErrorCode. If not provided, the `.code` of errors will be used.
*/
constructor(private readonly fn: Fn, private readonly errorCodeMapFn?: ErrCodeMapFn) {
constructor(private readonly fn: TrackingFn, private readonly errorCodeMapFn?: ErrCodeMapFn) {
if (!fn || typeof fn !== 'function') {
throw new Error('DecryptionFailureTracker requires tracking function');
}