From c3b26975685398f04adbd11b9500c09b9db775ab Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sat, 12 Oct 2024 14:11:32 -0400 Subject: [PATCH] Enable ts-strict for colorUtil.ts (#1239) --- src/utils/colorUtil.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/colorUtil.ts b/src/utils/colorUtil.ts index 162f30052..5d23107f3 100644 --- a/src/utils/colorUtil.ts +++ b/src/utils/colorUtil.ts @@ -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 }