diff --git a/packages/design-system/lib/components/Icons/MaterialIcon/generated.tsx b/packages/design-system/lib/components/Icons/MaterialIcon/generated.tsx index f8254cd05..20f197a76 100644 --- a/packages/design-system/lib/components/Icons/MaterialIcon/generated.tsx +++ b/packages/design-system/lib/components/Icons/MaterialIcon/generated.tsx @@ -430,15 +430,16 @@ import YardOutlined from "./generated/YardOutlined" import YardFilled from "./generated/YardFilled" type SvgIcon = FunctionComponent> - -export const materialIcons: Record< +type IconMap = Record< string, Partial<{ outlined: { outlined: SvgIcon; filled?: SvgIcon } rounded: { outlined: SvgIcon; filled?: SvgIcon } sharp: { outlined: SvgIcon; filled?: SvgIcon } }> -> = { +> + +const _materialIcons = { accessibility: { outlined: { outlined: AccessibilityOutlined, filled: AccessibilityFilled }, }, @@ -985,6 +986,8 @@ export const materialIcons: Record< }, wifi: { outlined: { outlined: WifiOutlined, filled: WifiFilled } }, yard: { outlined: { outlined: YardOutlined, filled: YardFilled } }, -} +} satisfies IconMap -export type MaterialIconName = keyof typeof materialIcons +export const materialIcons = _materialIcons as IconMap + +export type MaterialIconName = keyof typeof _materialIcons diff --git a/scripts/material-symbols-update.mts b/scripts/material-symbols-update.mts index 0dd1afc3f..54e37d4ab 100644 --- a/scripts/material-symbols-update.mts +++ b/scripts/material-symbols-update.mts @@ -349,19 +349,22 @@ import type { FunctionComponent, SVGProps } from "react" ${imports.join("\n")} type SvgIcon = FunctionComponent> - -export const materialIcons: Record< +type IconMap = Record< string, Partial<{ outlined: { outlined: SvgIcon; filled?: SvgIcon } rounded: { outlined: SvgIcon; filled?: SvgIcon } sharp: { outlined: SvgIcon; filled?: SvgIcon } }> -> = { -${registryEntries.join("\n")} -} +> -export type MaterialIconName = keyof typeof materialIcons +const _materialIcons = { +${registryEntries.join("\n")} +} satisfies IconMap + +export const materialIcons = _materialIcons as IconMap + +export type MaterialIconName = keyof typeof _materialIcons `.trim() + "\n" await writeFile(OUT, content, "utf8")