Enable Typescript noImplicitAny (#33322)

Enable `noImplicitAny` and fix all issues.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind 2025-01-22 08:11:51 +01:00 committed by GitHub
parent 6fe4d1c038
commit c7f4ca2653
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 326 additions and 270 deletions

View file

@ -38,7 +38,7 @@ export function initStopwatch() {
}
let usingPeriodicPoller = false;
const startPeriodicPoller = (timeout) => {
const startPeriodicPoller = (timeout: number) => {
if (timeout <= 0 || !Number.isFinite(timeout)) return;
usingPeriodicPoller = true;
setTimeout(() => updateStopwatchWithCallback(startPeriodicPoller, timeout), timeout);
@ -103,7 +103,7 @@ export function initStopwatch() {
startPeriodicPoller(notificationSettings.MinTimeout);
}
async function updateStopwatchWithCallback(callback, timeout) {
async function updateStopwatchWithCallback(callback: (timeout: number) => void, timeout: number) {
const isSet = await updateStopwatch();
if (!isSet) {
@ -125,7 +125,7 @@ async function updateStopwatch() {
return updateStopwatchData(data);
}
function updateStopwatchData(data) {
function updateStopwatchData(data: any) {
const watch = data[0];
const btnEls = document.querySelectorAll('.active-stopwatch');
if (!watch) {