Fix TSLint nits

This commit is contained in:
Andreas Nedbal 2022-01-06 03:04:01 +01:00
parent 2796d72072
commit fb9d8bf947
3 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@ import Croppr from 'croppr';
const readImage = (file, callback) => callback((window.URL || window.webkitURL).createObjectURL(file));
export function profilePictureChangeHandler(event: Event) {
export function profilePictureChangeHandler(event: Event): void {
const input = event.target as HTMLInputElement;
const cropControls = document.querySelector('#profile-picture-crop-controls');
@ -32,7 +32,7 @@ export function profilePictureChangeHandler(event: Event) {
}
}
export function profileHeaderChangeHandler(event: Event) {
export function profileHeaderChangeHandler(event: Event): void {
const input = event.target as HTMLInputElement;
const cropControls = document.querySelector('#profile-header-crop-controls');

View File

@ -58,7 +58,7 @@ function createDeleteEvent(
}
}
export function muteDocumentHandler() {
export function muteDocumentHandler(): void {
const submit: HTMLButtonElement = document.getElementById('new-rule-submit') as HTMLButtonElement;
if (!submit || submit.classList.contains('js-initialized')) return;

View File

@ -15,7 +15,7 @@ const previewTheme = (): void => {
generateTheme(payload);
}
const generateTheme = (payload: object): void => {
const generateTheme = (payload: Record<string, string>): void => {
const themeAttributeMap = {
'primary_color': 'primary',
'primary_text': 'primary-text',
@ -88,7 +88,7 @@ export function themeDocumentHandler(): void {
color.addEventListener('input', () => {
clearTimeout(previewTimeout);
setTimeout(previewTheme, 1000);
previewTimeout = setTimeout(previewTheme, 1000);
});
});
}