chore(frontend): comprehensive TypeScript quality improvements (#37625)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-02-06 16:16:57 -05:00
committed by GitHub
parent e9ae212c1c
commit fc5506e466
441 changed files with 14136 additions and 9956 deletions

View File

@@ -22,7 +22,11 @@ import roundDecimal from './roundDecimal';
export const EARTH_CIRCUMFERENCE_KM = 40075.16;
export const MILES_PER_KM = 1.60934;
export function kmToPixels(kilometers, latitude, zoomLevel) {
export function kmToPixels(
kilometers: number,
latitude: number,
zoomLevel: number,
): number {
// Algorithm from: http://wiki.openstreetmap.org/wiki/Zoom_levels
const latitudeRad = latitude * (Math.PI / 180);
// Seems like the zoomLevel is off by one

View File

@@ -21,7 +21,11 @@ export const LUMINANCE_RED_WEIGHT = 0.2126;
export const LUMINANCE_GREEN_WEIGHT = 0.7152;
export const LUMINANCE_BLUE_WEIGHT = 0.0722;
export default function luminanceFromRGB(r, g, b) {
export default function luminanceFromRGB(
r: number,
g: number,
b: number,
): number {
// Formula: https://en.wikipedia.org/wiki/Relative_luminance
return (
LUMINANCE_RED_WEIGHT * r +