Enable Typescript noImplicitAny
(#33322)
Enable `noImplicitAny` and fix all issues. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
6fe4d1c038
commit
c7f4ca2653
63 changed files with 326 additions and 270 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue