Skip to content

Commit 0194423

Browse files
authored
fix: fixed HyphenationCallback type (#3019)
1 parent b2b01e0 commit 0194423

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.changeset/neat-goats-ring.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-pdf/types": patch
3+
---
4+
5+
Fixed HyphenationCallback type (confusing argument name, removed extra argument)

packages/types/font.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ interface FontInstance {
3333
sources: FontSource[];
3434
}
3535

36-
export type HyphenationCallback = (
37-
words: string,
38-
glyphString: { [key: string]: any },
39-
) => string[];
36+
export type HyphenationCallback = (word: string) => string[];
4037

4138
interface RegisteredFont {
4239
src: string;

0 commit comments

Comments
 (0)