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
|
@ -255,12 +255,12 @@ export function loadElem(el: LoadableElement, src: string) {
|
|||
// it can't use other transparent polyfill patches because PaleMoon also doesn't support "addEventListener(capture)"
|
||||
const needSubmitEventPolyfill = typeof SubmitEvent === 'undefined';
|
||||
|
||||
export function submitEventSubmitter(e) {
|
||||
export function submitEventSubmitter(e: any) {
|
||||
e = e.originalEvent ?? e; // if the event is wrapped by jQuery, use "originalEvent", otherwise, use the event itself
|
||||
return needSubmitEventPolyfill ? (e.target._submitter || null) : e.submitter;
|
||||
}
|
||||
|
||||
function submitEventPolyfillListener(e) {
|
||||
function submitEventPolyfillListener(e: DOMEvent<Event>) {
|
||||
const form = e.target.closest('form');
|
||||
if (!form) return;
|
||||
form._submitter = e.target.closest('button:not([type]), button[type="submit"], input[type="submit"]');
|
||||
|
|
|
@ -4,7 +4,7 @@ const pngNoPhys = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA
|
|||
const pngPhys = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAEElEQVQI12OQNZcAIgYIBQAL8gGxdzzM0A==';
|
||||
const pngEmpty = 'data:image/png;base64,';
|
||||
|
||||
async function dataUriToBlob(datauri) {
|
||||
async function dataUriToBlob(datauri: string) {
|
||||
return await (await globalThis.fetch(datauri)).blob();
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ export type DayDataObject = {
|
|||
}
|
||||
|
||||
export function fillEmptyStartDaysWithZeroes(startDays: number[], data: DayDataObject): DayData[] {
|
||||
const result = {};
|
||||
const result: Record<string, any> = {};
|
||||
|
||||
for (const startDay of startDays) {
|
||||
result[startDay] = data[startDay] || {'week': startDay, 'additions': 0, 'deletions': 0, 'commits': 0};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue