Skip to content

Commit

Permalink
Enable ts-strict for colorUtil.ts (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Oct 12, 2024
1 parent dfcabd2 commit c3b2697
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/colorUtil.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-strict-ignore
import { memoize } from 'lodash'

type RGB = { r: number; g: number; b: number }
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit c3b2697

Please sign in to comment.