Skip to content

Commit f0747b6

Browse files
committed
fix(Text): make HintedStyles keys optional to match type guard semantics
1 parent 0a5c933 commit f0747b6

File tree

1 file changed

+7
-7
lines changed
  • renderers/react/src/components/content

1 file changed

+7
-7
lines changed

renderers/react/src/components/content/Text.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import MarkdownIt from 'markdown-it';
88
type UsageHint = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'caption' | 'body';
99

1010
interface HintedStyles {
11-
h1: Record<string, string>;
12-
h2: Record<string, string>;
13-
h3: Record<string, string>;
14-
h4: Record<string, string>;
15-
h5: Record<string, string>;
16-
body: Record<string, string>;
17-
caption: Record<string, string>;
11+
h1?: Record<string, string>;
12+
h2?: Record<string, string>;
13+
h3?: Record<string, string>;
14+
h4?: Record<string, string>;
15+
h5?: Record<string, string>;
16+
body?: Record<string, string>;
17+
caption?: Record<string, string>;
1818
}
1919

2020
function isHintedStyles(styles: unknown): styles is HintedStyles {

0 commit comments

Comments
 (0)