Skip to content

Commit d4cf944

Browse files
committed
Fix TypographyKey type definition for better type checking
1 parent 7e54c1f commit d4cf944

File tree

1 file changed

+1
-1
lines changed
  • packages/react/src/types/props

1 file changed

+1
-1
lines changed

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)