refactor(pdf): replace ts-pattern match chains with satisfies Record maps

Two match chains in sections.tsx are replaced with plain lookup maps typed
via `satisfies Record<CustomSectionType, ...>` which preserves compile-time
exhaustiveness without the ts-pattern dependency. Remove ts-pattern from
packages/pdf/package.json.

Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
Amruth Pillai
2026-07-04 19:52:13 +02:00
parent fcc10c6b31
commit cf738b9306
3 changed files with 52 additions and 54 deletions
+1 -2
View File
@@ -28,8 +28,7 @@
"node-html-parser": "^8.0.4",
"phosphor-icons-react-pdf": "^0.1.3",
"react": "^19.2.7",
"react-pdf-html": "^2.1.5",
"ts-pattern": "^5.9.0"
"react-pdf-html": "^2.1.5"
},
"devDependencies": {
"@react-pdf/types": "^2.11.1",