chore(utils): types (#321)

This commit is contained in:
Alex Liu
2023-06-20 16:52:24 +08:00
committed by Benjamin Canac
parent 9cd73aa49d
commit e1548062c7
3 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ export function classNames (...classes: any[string]) {
return classes.filter(Boolean).join(' ')
}
export const hexToRgb = (hex) => {
export const hexToRgb = (hex: string) => {
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i
hex = hex.replace(shorthandRegex, function (_, r, g, b) {