Enable ts-strict for colorUtil.ts (#1239)

This commit is contained in:
Chenlei Hu
2024-10-12 14:11:32 -04:00
committed by GitHub
parent dfcabd2834
commit c3b2697568

View File

@@ -1,4 +1,3 @@
// @ts-strict-ignore
import { memoize } from 'lodash'
type RGB = { r: number; g: number; b: number }
@@ -35,6 +34,8 @@ function rgbToHsl({ r, g, b }: RGB): HSL {
case b:
h = (r - g) / d + 4
break
default:
throw new Error('NOT_REACHED')
}
h /= 6
}