fix(ts_web): resolve TypeScript nullability and event typing issues across web components

This commit is contained in:
2026-04-01 05:00:21 +00:00
parent b1c8a7446e
commit af1f660486
78 changed files with 429 additions and 399 deletions

View File

@@ -21,9 +21,9 @@ export function throttle<T extends (...args: any[]) => any>(
): (...args: Parameters<T>) => void {
let inThrottle: boolean;
return function executedFunction(...args: Parameters<T>) {
return (...args: Parameters<T>) => {
if (!inThrottle) {
func.apply(this, args);
func(...args);
inThrottle = true;
setTimeout(() => inThrottle = false, limit);
}

View File

@@ -7,7 +7,7 @@ export const demo = () => {
];
const generateGridItems = (count: number) => {
const items = [];
const items: ReturnType<typeof html>[] = [];
for (let i = 0; i < count; i++) {
const pdfUrl = samplePdfs[i % samplePdfs.length];
items.push(html`