From 2e1d2a8126adc03a2c9daf5b8b96e01245ecaac2 Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Sun, 23 Aug 2026 10:49:01 -0700 Subject: [PATCH] CL-6845: Delete unused optional-props helpers in apps/web countProp/subtitleProp/metaProp/badgeProp had zero importers. --- apps/web/src/optional-props.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 apps/web/src/optional-props.ts diff --git a/apps/web/src/optional-props.ts b/apps/web/src/optional-props.ts deleted file mode 100644 index 75b573903..000000000 --- a/apps/web/src/optional-props.ts +++ /dev/null @@ -1,25 +0,0 @@ -// This workspace compiles with exactOptionalPropertyTypes, and the component -// library's optional props are declared without `| undefined` — so a prop -// that may be absent has to be omitted, not passed as undefined. These -// helpers build the omitting form once instead of forking every JSX call -// site into two branches. - -import type { ReactNode } from "react"; - -export function countProp(count: number | undefined): { count?: number } { - return count === undefined ? {} : { count }; -} - -export function subtitleProp(subtitle: string | undefined): { - subtitle?: string; -} { - return subtitle === undefined ? {} : { subtitle }; -} - -export function metaProp(meta: ReactNode | undefined): { meta?: ReactNode } { - return meta === undefined ? {} : { meta }; -} - -export function badgeProp(badge: ReactNode | undefined): { badge?: ReactNode } { - return badge === undefined ? {} : { badge }; -}