build(ts): enable noUncheckedIndexedAccess and isolatedModules

This commit is contained in:
2026-02-20 01:50:09 -08:00
parent 06e8223d63
commit a4532a5fa0
45 changed files with 169 additions and 126 deletions

View File

@@ -180,7 +180,7 @@ export class MediaGenerator {
): Promise<Buffer> {
const { format, quality = 92, maxWidth, maxHeight } = options;
const ext = format === 'webp' ? 'webp' : format === 'png' ? 'png' : 'jpg';
const codecMap: Record<string, string> = {
const codecMap: Record<'jpg' | 'png' | 'webp', string> = {
jpg: 'mjpeg',
png: 'png',
webp: 'webp',