You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-03 00:33:22 +03:00 
			
		
		
		
	Iterate PR
This commit is contained in:
		@@ -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;
 | 
					type ErrCodeMapFn = (errcode: string) => string;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export class DecryptionFailureTracker {
 | 
					export class DecryptionFailureTracker {
 | 
				
			||||||
@@ -73,7 +73,7 @@ export class DecryptionFailureTracker {
 | 
				
			|||||||
     * @param {function?} errorCodeMapFn The function used to map error codes to the
 | 
					     * @param {function?} errorCodeMapFn The function used to map error codes to the
 | 
				
			||||||
     * trackedErrorCode. If not provided, the `.code` of errors will be used.
 | 
					     * 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') {
 | 
					        if (!fn || typeof fn !== 'function') {
 | 
				
			||||||
            throw new Error('DecryptionFailureTracker requires tracking function');
 | 
					            throw new Error('DecryptionFailureTracker requires tracking function');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -505,7 +505,7 @@ export function bodyToHtml(content: IContent, highlights: string[], opts: IOpts
 | 
				
			|||||||
 * @param {object} [options] Options for linkifyString. Default: linkifyMatrix.options
 | 
					 * @param {object} [options] Options for linkifyString. Default: linkifyMatrix.options
 | 
				
			||||||
 * @returns {string} Linkified string
 | 
					 * @returns {string} Linkified string
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export function linkifyString(str: string, options = linkifyMatrix.options) {
 | 
					export function linkifyString(str: string, options = linkifyMatrix.options): string {
 | 
				
			||||||
    return _linkifyString(str, options);
 | 
					    return _linkifyString(str, options);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -516,7 +516,7 @@ export function linkifyString(str: string, options = linkifyMatrix.options) {
 | 
				
			|||||||
 * @param {object} [options] Options for linkifyElement. Default: linkifyMatrix.options
 | 
					 * @param {object} [options] Options for linkifyElement. Default: linkifyMatrix.options
 | 
				
			||||||
 * @returns {object}
 | 
					 * @returns {object}
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export function linkifyElement(element: HTMLElement, options = linkifyMatrix.options) {
 | 
					export function linkifyElement(element: HTMLElement, options = linkifyMatrix.options): HTMLElement {
 | 
				
			||||||
    return _linkifyElement(element, options);
 | 
					    return _linkifyElement(element, options);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,24 +30,24 @@ export default class EditorStateTransfer {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    constructor(private readonly event: MatrixEvent) {}
 | 
					    constructor(private readonly event: MatrixEvent) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    setEditorState(caret: Caret, serializedParts: SerializedPart[]) {
 | 
					    public setEditorState(caret: Caret, serializedParts: SerializedPart[]) {
 | 
				
			||||||
        this.caret = caret;
 | 
					        this.caret = caret;
 | 
				
			||||||
        this.serializedParts = serializedParts;
 | 
					        this.serializedParts = serializedParts;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    hasEditorState() {
 | 
					    public hasEditorState() {
 | 
				
			||||||
        return !!this.serializedParts;
 | 
					        return !!this.serializedParts;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    getSerializedParts() {
 | 
					    public getSerializedParts() {
 | 
				
			||||||
        return this.serializedParts;
 | 
					        return this.serializedParts;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    getCaret() {
 | 
					    public getCaret() {
 | 
				
			||||||
        return this.caret;
 | 
					        return this.caret;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    getEvent() {
 | 
					    public getEvent() {
 | 
				
			||||||
        return this.event;
 | 
					        return this.event;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user