Skip to content

Commit 05000dd

Browse files
authored
Merge pull request #91 from dev-five-git/fix-type-checking-issue
Fix type checking issue
2 parents 2747b5e + 064476f commit 05000dd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/ten-snails-fail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/react": patch
3+
---
4+
5+
Fix TypographyKey type definition for better type checking

packages/react/src/types/props/text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ export interface DevupUiTextProps {
4040
}
4141

4242
// for skip type checking without .df
43-
type TypographyKey<T> = keyof T extends string ? keyof T : string
43+
type TypographyKey<T> = keyof T extends undefined ? string : keyof T

0 commit comments

Comments
 (0)