Commit 3eabe0d
fix(graphiql): type the theme custom properties instead of casting
GraphiQL/shared.tsx has no `@ts-strict-ignore`, unlike the two files its code
came from, so `tsc-strict` caught what the `as React.CSSProperties` cast in
useDashboardTheme had been hiding: the cast erased the custom-property keys,
making every `rootStyle["--font-size-*"]` read an implicit any.
Declared the type instead of asserting it, per the repo's TypeScript style.
Intersecting with CSSProperties keeps `style={rootStyle}` assignable at the
three call sites while the Record half types the indexed reads.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent a84882e commit 3eabe0d
1 file changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
74 | 92 | | |
75 | | - | |
| 93 | + | |
76 | 94 | | |
77 | 95 | | |
78 | 96 | | |
| |||
81 | 99 | | |
82 | 100 | | |
83 | 101 | | |
84 | | - | |
| 102 | + | |
85 | 103 | | |
86 | 104 | | |
87 | 105 | | |
| |||
0 commit comments